OFFSET
0,4
COMMENTS
Row sums of number triangle A117901.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,4).
FORMULA
a(n) = 0^n/2 - (2^(2*n/3)/12)*( 2*cos((2*n+1)*Pi*n/3) + 2*sqrt(3)*sin((2*n+1)*Pi*n/3) -(2^(2/3) + 8)*cos(2*Pi*n/3) - 2^(1/6)*sqrt(6)*sin(2*Pi*n/3) + 2^(2/3) - 2 ).
MATHEMATICA
LinearRecurrence[{0, 0, 4}, {1, 0, -1, 2}, 50] (* G. C. Greubel, Oct 09 2021 *)
PROG
(Magma) [1] cat [n le 3 select (-1)^(n-1)*(n-1) else 4*Self(n-3): n in [1..50]]; // G. C. Greubel, Oct 09 2021
(Sage)
def A133851(n): return 4^(n/3) if (n%3==0) else 0
[A117902(n) for n in (0..50)] # G. C. Greubel, Oct 09 2021
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Apr 01 2006
STATUS
approved