OFFSET
1,3
COMMENTS
Extended to a(1) using the formula.
LINKS
Eric Weisstein's World of Mathematics, Cycle Graph
Eric Weisstein's World of Mathematics, Radio Number
Index entries for linear recurrences with constant coefficients, signature (1,0,0,2,-2,0,0,-1,1).
FORMULA
a(n) = (n - 2)/2 floor(n/4) + n - 1 for mod(n, 2) = 0.
a(n) = (n + 3) (n - 1)/8 for mod(n, 4) = 1.
a(n) = (n - 1)/2 (floor(n/4) + 2) for mod(n, 2) = 1.
G.f.: x^2*(-1-x-2*x^2-x^4+x^7) / ( (1+x)^2*(x^2+1)^2*(x-1)^3 ). - R. J. Mathar, Jun 02 2022
MATHEMATICA
Table[Piecewise[{{(n - 2)/2 Floor[n/4] + n - 1, Mod[n, 2] == 0}, {(n + 3) (n - 1)/8, Mod[n, 4] == 1}, {(n - 1)/2 (Floor[n/4] + 2), Mod[n, 2] == 1}}], {n, 20}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Jan 07 2021
STATUS
approved