OFFSET
1,1
COMMENTS
This is a simplified version of A328196.
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1,0,0,1,1).
FORMULA
If n is a multiple of 4 then a(n) = 5*t+1 where t = n/4;
if n is 2 mod 4 then a(n) = 5*t+4 where t = (n-2)/4;
if n is 1 mod 4 then a(n) = -(5*t-2) where t = (n-1)/4;
if n i s 3 mod 4 then a(n) = -(5*t+2) where t = (n-3)/4.
From Colin Barker, Nov 07 2019: (Start)
G.f.: x*(2 + 6*x + 2*x^2 + 4*x^3 + x^4) / ((1+x)*(1-x^4)).
a(n) = -a(n-1) + a(n-4) + a(n-5) for n>5.
(End)
MATHEMATICA
Differences[Table[Which[EvenQ[n], Floor[(5 n/2+1)/2], Mod[n, 4]==1, 10 (n-1)/4+1, True, 10 (n-3)/4+7], {n, 70}]] (* Harvey P. Dale, Apr 06 2021 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 06 2019
STATUS
approved