OFFSET
0,1
COMMENTS
For n>3, the sequence gives the 6th diagonal of triangle in A055096.
Also, this is the case k=9 of the form (n + sqrt(k))^2 + (n - sqrt(k))^2. It is noted that a(n)*n = (n + sqrt(3))^3 + (n - sqrt(3))^3.
Equivalently, numbers m such that 2*m-36 is a square.
LINKS
FORMULA
a(n) = 2*A189834(n).
From Vincenzo Librandi, Mar 08 2015: (Start)
G.f.: 2*(9 - 17*x + 10*x^2)/(1 - x)^3.
a(n) = a(-n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Amiram Eldar, Mar 28 2023: (Start)
Sum_{n>=0} 1/a(n) = (1 + 3*Pi*coth(3*Pi))/36.
Sum_{n>=0} (-1)^n/a(n) = (1 + 3*Pi*cosech(3*Pi))/36. (End)
MATHEMATICA
f[n_] := 2 n^2 + 18; Array[f, 50, 0] (* Robert G. Wilson v, Mar 08 2015 *)
CoefficientList[Series[(18 - 34 x + 20 x^2) / (1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Mar 08 2015 *)
LinearRecurrence[{3, -3, 1}, {18, 20, 26}, 50] (* Harvey P. Dale, Aug 20 2021 *)
PROG
(Magma) [2*n^2+18: n in [0..50]]; // Vincenzo Librandi, Mar 08 2015
(PARI) vector(50, n, 2*n^2+18) \\ Derek Orr, Mar 09 2015
(Sage) [2*n^2+18 for n in (0..50)] # Bruno Berselli, Mar 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Avi Friedlich, Mar 08 2015
EXTENSIONS
Edited by Bruno Berselli, Mar 11 2015
STATUS
approved