login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:51 EDT 2024. Contains 371967 sequences. (Running on oeis4.)