OFFSET
0,1
COMMENTS
Sequence is identical to its fourth differences.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2).
FORMULA
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), n positive. For a(0)=3,a(1)=a(2)=4,a(3)=0.
From R. J. Mathar, Apr 02 2008: (Start)
O.g.f.: 1 + 2/(1 -2*x +2*x^2).
a(n) = 2*a(n-1) - 2*a(n-2) if n>2. (End)
E.g.f.: 1 + 2*sqrt(2)*exp(x)*sin(x + Pi/4). - G. C. Greubel, Feb 14 2021
MATHEMATICA
Join[{3}, LinearRecurrence[{2, -2}, {4, 4}, 50]] (* Harvey P. Dale, Mar 06 2014 *)
Table[If[n<2, n+3, 2*((1+I)^(n-1) + (1-I)^(n-1))], {n, 0, 40}] (* G. C. Greubel, Feb 14 2021 *)
PROG
(Sage)
def A132723(n): return n+3 if (n<2) else 2*( (1+i)^(n-1) + (1-i)^(n-1) )
[A132723(n) for n in (0..40)] # G. C. Greubel, Feb 14 2021
(Magma) [3] cat [n le 2 select 4 else 2*(Self(n-1) - Self(n-2)): n in [1..40]]; // G. C. Greubel, Feb 14 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Paul Curtz, Nov 16 2007
EXTENSIONS
More terms from R. J. Mathar, Apr 02 2008
STATUS
approved