OFFSET
0,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..250
Index entries for linear recurrences with constant coefficients, signature (5,-3,-1).
FORMULA
a(n) = 5*a(n-1) - 3*a(n-2) - a(n-3). - Clark Kimberling, Aug 16 2012
G.f.: (-x^2-x+1)/[(1-x)(1-4x-x^2)].
a(n) = (3*Fibonacci(3*n+2) + 1)/4 = 1 + 3*Sum_{k=0..n} A001076(k). - Ehren Metcalfe, Apr 15 2019
MATHEMATICA
a[0] = 1;
a[n_] := Floor[a[n - 1]/FractionalPart[Sqrt[5]]]
Table[a[n], {n, 0, 60}]
(* Clark Kimberling, Aug 16 2012 *)
a[0]=1;
a[1]=4;
a[2]=16;
a[n_]:=Floor[a[n-1]^2/a[n-2]]+3
Table[a[n], {n, 0, 60}]
With[{c=Sqrt[5]-2}, NestList[Floor[#/c]&, 1, 30]] (* Harvey P. Dale, Jul 18 2018 *)
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; -1, -3, 5]^n*[1; 4; 16])[1, 1] \\ Charles R Greathouse IV, Jan 20 2017
(PARI) step(n)=2*n + sqrtint(5*n^2)
a(n)=if(n, step(a(n-1)), 1) \\ Charles R Greathouse IV, Jan 20 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved