OFFSET
0,3
REFERENCES
J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996. Sequence can be seen in the circled numbers at foot of page 63.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
G.f.: x*(-1-2*x-x^2+2*x^3) / ( (x-1)^3*(1+x)^3 ). - R. J. Mathar, Aug 05 2021
a(n) = ((n^2 + 6*n + 1) - (n-1)^2*(-1)^n)/8. - Aaron J Grech, Aug 27 2024
MATHEMATICA
Riffle[#-2, #^2/4] & [Range[2, 100, 2]] (* Paolo Xausa, Aug 28 2024 *)
PROG
(Python)
def A346004(n): return ((n+1)//2)**2 if n % 2 else n # Chai Wah Wu, Jul 25 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jul 25 2021
STATUS
approved