OFFSET
1,3
LINKS
Anders Hellström, Table of n, a(n) for n = 1..1000
FORMULA
Conjectures from Colin Barker, Jul 04 2015: (Start)
a(n) = a(n-1)+2*a(n-2)+3*a(n-3)+4*a(n-4)+a(n-5) for n>6.
G.f.: x*(x-1)*(x^4+x^3+x^2+x+1) / ((x+1)*(x^4+3*x^3+2*x-1)).
(End)
MATHEMATICA
f[n_] := Block[{k, a = {1}}, Do[AppendTo[a, Sum[Mod[k, 5] a[[i - k]], {k, 1, i - 1}]], {i, 2, n}]; a]; f@ 30 (* Michael De Vlieger, Jul 03 2015 *)
PROG
(PARI) main(size)=my(v=vector(size), n, s); v[1]=1; for(n=2, size, for(s=1, n-1, v[n] = v[n] + (s%5)*v[n-s] )); v;
CROSSREFS
KEYWORD
nonn
AUTHOR
Anders Hellström, Jul 03 2015
STATUS
approved