OFFSET
0,1
LINKS
Muniru A Asiru, Table of n, a(n) for n = 0..2000
Patrick De Geest, Palindromic Quasi_Over_Squares of the form n^2+(n+X).
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 2*n + a(n-1)-2 (with a(1)=4). - Vincenzo Librandi, Aug 05 2010
Sum_{n>=0} 1/a(n) = Pi*tanh(Pi*sqrt(15)/2)/sqrt(15). - Amiram Eldar, Jan 18 2021
From Elmo R. Oliveira, Oct 28 2024: (Start)
G.f.: 2*(2 - 3*x + 2*x^2)/(1 - x)^3.
E.g.f.: (2*(2 + x) + x^2)*exp(x).
a(n) = 2*A152948(n+2). (End)
MAPLE
with (combinat):seq(fibonacci(3, n)+n+3, n=0..47); # Zerinvary Lajos, Jun 07 2008
MATHEMATICA
Table[n^2+n+4, {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Feb 17 2011 *)
LinearRecurrence[{3, -3, 1}, {4, 6, 10}, 50] (* or *) CoefficientList[ Series[ (-4+6*x-4*x^2)/(-1+x)^3, {x, 0, 50}], x] (* Harvey P. Dale, Dec 18 2021 *)
PROG
(PARI) a(n)=n^2+n+4 \\ Charles R Greathouse IV, Oct 07 2015
(GAP) List([0..50], n->n^2+n+4); # Muniru A Asiru, Jul 15 2018
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved