OFFSET
0,1
COMMENTS
This is the case k=2 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2.
Equivalently, numbers m such that 2*m - 8 is a square.
LINKS
FORMULA
G.f.: 2*(2 - 3*x + 3*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 2*A059100(n).
a(n) = a(n-1) + 4n - 2. - Bob Selcoe, Mar 25 2020
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(2)*Pi*coth(sqrt(2)*Pi))/8.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(2)*Pi*cosech(sqrt(2)*Pi))/8. (End)
E.g.f.: 2*exp(x)*(2 + x + x^2). - Stefano Spezia, Aug 07 2024
MATHEMATICA
Table[2 n^2 + 4, {n, 0, 50}]
PROG
(PARI) vector(50, n, n--; 2*n^2+4)
(Sage) [2*n^2+4 for n in (0..50)]
(Magma) [2*n^2+4: n in [0..50]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Avi Friedlich, Mar 08 2015
EXTENSIONS
Edited by Bruno Berselli, Mar 13 2015
STATUS
approved