login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A259714
a(n) = Sum_{k=1..n-1}((k mod 5)*a(n-k)), a(1) = 1.
1
1, 1, 3, 8, 21, 50, 129, 327, 827, 2089, 5290, 13386, 33868, 85693, 216836, 548660, 1388269, 3512737, 8888292, 22490049, 56906580, 143990771, 364339983, 921889753, 2332658401, 5902327520, 14934664284, 37789193522, 95618028007, 241942376384
OFFSET
1,3
LINKS
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
Cf. A088305 (sequence obtained without mod 5 in the formula).
Sequence in context: A193045 A238831 A322059 * A096770 A007835 A152086
KEYWORD
nonn
AUTHOR
Anders Hellström, Jul 03 2015
STATUS
approved