OFFSET
0,1
LINKS
Ivan Panchenko, Table of n, a(n) for n = 0..1000
Eric Weisstein's World of Mathematics, Near-Square Prime.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 2*n + a(n-1) - 1 (with a(0)=5). - Vincenzo Librandi, Nov 13 2010
From Colin Barker, Apr 10 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (5-9*x+6*x^2)/(1-x)^3. (End)
From Amiram Eldar, Jul 13 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(5)*Pi*coth(sqrt(5)*Pi))/10.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(5)*Pi*cosech(sqrt(5)*Pi))/10. (End)
From Amiram Eldar, Feb 05 2024: (Start)
Product_{n>=0} (1 - 1/a(n)) = 2*sinh(2*Pi)/(sqrt(5)*sinh(sqrt(5)*Pi)).
Product_{n>=0} (1 + 1/a(n)) = sqrt(6/5)*sinh(sqrt(6)*Pi)/sinh(sqrt(5)*Pi). (End)
MATHEMATICA
Range[0, 50]^2+5 (* or *) LinearRecurrence[{3, -3, 1}, {5, 6, 9}, 60] (* Harvey P. Dale, Aug 04 2020 *)
PROG
(SageMath) [lucas_number1(3, n, -5) for n in range(0, 51)] # Zerinvary Lajos, May 16 2009
(PARI) a(n)=n^2+5 \\ Charles R Greathouse IV, Apr 10 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Apr 04 2006
STATUS
approved