Linear integer function generator

Kakoune, 62 keystrokes

<a-l>"ndd<a-l>S 
"hddQxy<a-p><a-p>_S 
a*<c-r>h+<a-;> <backspace><esc><a-h>|bc
k<a-i>ndd<a-j>Q:ex<tab> <c-r>nq
K<a-x>d%<a-s><a-h>w<a-l>d<a-j>

(note the trailing spaces on line 1 and 2)

Assumes the input in the following format, with the cursor at the start of the buffer:

number of items
kernel separated with spaces in reverse
seed separated by spaces

Gives the output as the numbers space separated.

Here is a video of the solution in action, with a few minor human errors :)

asciicast


Wolfram Language (Mathematica), 16 bytes

LinearRecurrence

Try it online!

Given the OP's background, I suppose this isn't too much of a surprise.


Haskell, 54 bytes

(flip take.).g
g(x:r)k=x:g(r++[sum(zipWith(*)k$x:r)])k

Try it online! The function g takes the seed and the kernel as input and builds the sequence as an infinite list. The first line is an anonymous function taking the seed, the kernel and the length as input, passing the former two arguments to g and truncating the infinite sequence to the given length.