OFFSET
0,4
COMMENTS
Instead of the Fibonacci sequence this has the base Padovan sequence.
The a(n+1)/a(n) ratio approaches one.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
a(n) = a(n-2)+a(n-3)-floor(a(n-3)/2)-floor(a(n-4)/2).
Empirical g.f.: (x^3+1) / (x^6-x^5-x+1) = (x+1)*(x^2-x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)). - Colin Barker, Mar 23 2013
From Wesley Ivan Hurt, Mar 15 2015: (Start)
a(n) = a(n-1) + a(n-5) - a(n-6).
a(n) = floor( (2n+5)/5 ). (End)
MAPLE
MATHEMATICA
f[-2] = 0; f[-1] = 0; f[0] = 1; f[1] = 1;
f[n_] := f[n] = f[n - 2] + f[n - 3] - Floor[f[n - 3]/2] - Floor[f[n - 4]/2]
Table[f[n], {n, 0, 50}]
nxt[{a_, b_, c_, d_}]:={b, c, d, c+b-Floor[b/2]-Floor[a/2]}; NestList[nxt, {1, 1, 1, 2}, 70][[;; , 1]] (* Harvey P. Dale, Jul 30 2023 *)
PROG
(Magma) [Floor((2*n+5)/5) : n in [0..50]]; // Wesley Ivan Hurt, Mar 15 2015
(PARI) vector(100, n, (2*n+3)\5) \\ Derek Orr, Mar 21 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Nov 22 2010
STATUS
approved