Post History
J, 28 bytes [:}.@{.m&(+/ .*)&m=.2 1,:1 0 Try it online! Tacit matmul solve. x&u&y applies x to y n times.
Answer
J, 28 bytes [:}.@{.m&(+/ .*)&m=.2 1,:1 0 Try it online! Tacit matmul solve. x&u&y applies x to y n times.