OFFSET
0,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1).
FORMULA
a(n)=Perrin(n+5)-2
a(n)=r1^(n+5)+r2^(n+5)+r3^(n+5)-2, where r1, r2, r3 are three roots of x^3-x-1=0.
G.f.: (3 - x^2)/(1 - x^2 - x^3)/(1-x) = (3 - x^2) / (1 - x - x^2 + x^4). a(n) = a(n-1) + a(n-2) - a(n-4) for n > 2. - Franklin T. Adams-Watters, Aug 05 2011.
EXAMPLE
For n=2, a(2)=Perrin(0)+Perrin(1)+Perrin(2)=3+0+2=5.
MAPLE
perrin[0]:=3: perrin[1]:=0: perrin[2]:=2: a[0]:=3: a[1]:=3: a[2]:=5: for n from 0 to 100 do perrin[n]:=perrin[n-2]+perrin[n-3]: a[n]:=a[n-1]+perrin[n]: end do;
MATHEMATICA
LinearRecurrence[{0, 1, 1}, {3, 0, 2}, {6, 52}] - 2 (* Alonso del Arte, Aug 05 2011, based on Harvey P. Dale's program for A001608 *)
LinearRecurrence[{1, 1, 0, -1}, {3, 3, 5, 8}, 47] (* Ray Chandler, Aug 03 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Francesco Daddi, Aug 04 2011
STATUS
approved