OFFSET
1,3
COMMENTS
Numbers congruent to {0, 1, 16, 33} mod 48. - Charles R Greathouse IV, Apr 10 2012
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
From Colin Barker, Apr 10 2012: (Start)
G.f.: x^2*(1+15*x+17*x^2+15*x^3)/((1-x)^2*(1+x)*(1+x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. (End)
a(n) = 12*n-(35+3*i^(2*n))/2+(2+2*i)*i^(-n)+(2-2*i)*i^n where i=sqrt(-1). - Wesley Ivan Hurt, Jun 07 2016
MAPLE
A151981:=n->12*n-(35+3*I^(2*n))/2+(2+2*I)*I^(-n)+(2-2*I)*I^n: seq(A151981(n), n=1..100); # Wesley Ivan Hurt, Jun 07 2016
MATHEMATICA
Table[12n-(35+3*I^(2*n))/2+(2+2*I)*I^(-n)+(2-2*I)*I^n, {n, 80}] (* Wesley Ivan Hurt, Jun 07 2016 *)
PROG
(PARI) a(n)=n\4*48+[-15, 0, 1, 16][n%4+1] \\ Charles R Greathouse IV, Apr 10 2012
(Magma) [n : n in [0..800] | n mod 48 in [0, 1, 16, 33]]; // Wesley Ivan Hurt, Jun 07 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Aug 23 2009
STATUS
approved