cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A259714 a(n) = Sum_{k=1..n-1}((k mod 5)*a(n-k)), a(1) = 1.

Original entry on oeis.org

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

Views

Author

Anders Hellström, Jul 03 2015

Keywords

Crossrefs

Cf. A088305 (sequence obtained without mod 5 in the formula).

Programs

  • 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 *)
  • 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;

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)