OFFSET
1,1
COMMENTS
LINKS
Colin Foster, Peripheral mathematical knowledge, For the Learning of Mathematics, vol. 31, #3 (November, 2011), pp. 24-28.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
From Wesley Ivan Hurt, Jun 07 2016: (Start)
G.f.: 3*x*(1+x+x^2+x^3+2*x^4)/((x-1)^2*(1+x+x^2+x^3)).
a(n) = 3*(6*n-5-i^(2*n)+(1+i)*i^(1-n)+(1-i)*i^(n-1))/4 where i=sqrt(-1).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
E.g.f.: 3*(4 + sin(x) - cos(x) + (3*x - 2)*sinh(x) + 3*(x - 1)*cosh(x))/2. - Ilya Gutkovskiy, Jun 07 2016
MAPLE
A203016:=n->3*(6*n-5-I^(2*n)+(1+I)*I^(1-n)+(1-I)*I^(n-1))/4: seq(A203016(n), n=1..100); # Wesley Ivan Hurt, Jun 07 2016
MATHEMATICA
3 Select[Range[100], MemberQ[{1, 2, 3, 4}, Mod[#, 6]] &] (* Wesley Ivan Hurt, Jun 07 2016 *)
PROG
(Magma) [3*n : n in [0..100] | n mod 6 in [1..4]]; // Wesley Ivan Hurt, Jun 07 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 27 2011
STATUS
approved