OFFSET
1,1
COMMENTS
Ninth diagonal of A144562.
2*a(n) + 67 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
G.f.: (9*x^2-6*x-7)/(x-1)^3. - Bruno Berselli, Dec 07 2011
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Feb 22 2012
Sum_{n>=1} 1/a(n) = 1621/20097 + tan(sqrt(67)*Pi/2)*Pi/(2*sqrt(67)). - Amiram Eldar, Feb 25 2023
E.g.f.: (7 + 20*x + 2*x^2)*exp(x). - G. C. Greubel, May 27 2024
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {27, 51, 79}, 50] (* Vincenzo Librandi, Feb 22 2012 *)
PROG
(Magma) I:=[27, 51, 79]; [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 22 2012
(PARI) for(n=1, 40, print1(2*n^2 + 18*n + 7", ")); \\ Vincenzo Librandi, Feb 22 2012
(SageMath) [2*n^2+18*n+7 for n in range(1, 51)] # G. C. Greubel, May 27 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jan 12 2009
STATUS
approved