A028875 a(n) = n^2 - 5.
-5, -4, -1, 4, 11, 20, 31, 44, 59, 76, 95, 116, 139, 164, 191, 220, 251, 284, 319, 356, 395, 436, 479, 524, 571, 620, 671, 724, 779, 836, 895, 956, 1019, 1084, 1151, 1220, 1291, 1364, 1439, 1516, 1595, 1676, 1759, 1844, 1931, 2020, 2111, 2204, 2299, 2396
Offset: 0
Links
- G. C. Greubel, 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).
Crossrefs
Cf. A028877 (subset of primes).
Programs
-
Magma
[n^2-5: n in [0..50]]; // Wesley Ivan Hurt, May 22 2014
-
Maple
A028875:=n->n^2-5; seq(A028875(n), n=0..100); # Wesley Ivan Hurt, Nov 13 2013
-
Mathematica
Range[0, 49]^2 - 5 (* Alonso del Arte, Aug 27 2013 *)
-
PARI
a(n)=n^2-5 \\ Charles R Greathouse IV, Oct 07 2015
Formula
From R. J. Mathar, Apr 28 2008: (Start)
G.f.: x^3*(4 - x - x^2)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
a(n) = 2*n + a(n-1) + 5, with n>0, a(0)=4. - Vincenzo Librandi, Aug 05 2010
a(-n) = a(n). - Michael Somos, May 26 2014
E.g.f.: (x^2 + x - 5)*exp(x). - G. C. Greubel, Aug 19 2017
From Amiram Eldar, Nov 04 2020: (Start)
Sum_{n>=0} 1/a(n) = -(1 + sqrt(5)*Pi*cot(sqrt(5)*Pi))/10.
Sum_{n>=0} (-1)^n/a(n) = -(1 + sqrt(5)*Pi*cosec(sqrt(5)*Pi))/10. (End)
From Amiram Eldar, Feb 05 2024: (Start)
Product_{n>=0} (1 - 1/a(n)) = sqrt(6/5)*sin(sqrt(6)*Pi)/sin(sqrt(5)*Pi).
Product_{n>=3} (1 + 1/a(n)) = sqrt(5)*Pi/(6*sin(sqrt(5)*Pi)). (End)
Comments