OFFSET
1,1
COMMENTS
Sixth diagonal of A144562.
2*a(n) + 28 is a square.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
From R. J. Mathar, Jan 05 2011: (Start)
a(n) = 2*A028881(n+3).
G.f.: -2*x*(2*x-3)*(x-3)/(x-1)^3. (End)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Feb 26 2012
From Amiram Eldar, Feb 25 2023: (Start)
Sum_{n>=1} 1/a(n) = 1/28 - cot(sqrt(7)*Pi)*Pi/(4*sqrt(7)).
Sum_{n>=1} (-1)^(n+1)/a(n) = 31/84 - cosec(sqrt(7)*Pi)*Pi/(4*sqrt(7)). (End)
E.g.f.: 2*exp(x)*(x^2 + 7*x + 2). - Elmo R. Oliveira, Nov 02 2024
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {18, 36, 58}, 50] (* Vincenzo Librandi, Feb 26 2012 *)
Table[2n^2+12n+4, {n, 50}] (* Harvey P. Dale, Sep 18 2019 *)
PROG
(Magma) I:=[18, 36, 58]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 26 2012
(PARI) for(n=1, 50, print1(2*n^2+12*n+4", ")); \\ Vincenzo Librandi, Feb 26 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 12 2009
STATUS
approved