OFFSET
1,3
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
Ivan Shestakov and Natalia Zhukavets, The Malcev Poisson superalgebra of the free Malcev superalgebra on one odd generator, J. Algebra Appl. 5 (2006), 521-535.
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-1).
FORMULA
See Maple code.
a(n) = (1/4+i/4)*((-11+11*i)-i*(-i)^n+i^n)+2*n for n>3, where i=sqrt(-1). a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>7. G.f.: x*(x^6+x^5+x^4-x^3+2*x^2-x+1) / ((x-1)^2*(x^2+1)). - Colin Barker, Jul 24 2013
MAPLE
f:=proc(n) local k, r;
if n <= 2 then 1 elif n=3 then 2
else k:=floor(n/4); r:=n-4*k;
if r=0 then 8*k-5 elif r=1 then 8*k-4 elif r=2 then 8*k-2 else 8*k+1; fi;
fi;
end;
MATHEMATICA
LinearRecurrence[{2, -2, 2, -1}, {1, 1, 2, 3, 4, 6, 9}, 100] (* Paolo Xausa, Jun 26 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 29 2011
STATUS
approved