A158493 a(n) = 20*n^2 + 1.
1, 21, 81, 181, 321, 501, 721, 981, 1281, 1621, 2001, 2421, 2881, 3381, 3921, 4501, 5121, 5781, 6481, 7221, 8001, 8821, 9681, 10581, 11521, 12501, 13521, 14581, 15681, 16821, 18001, 19221, 20481, 21781, 23121, 24501, 25921, 27381, 28881, 30421, 32001, 33621, 35281
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..10000
- Vincenzo Librandi, X^2-AY^2=1, Math Forum, 2007. [Wayback Machine link]
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Magma
I:=[1, 21, 81]; [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 21 2012
-
Mathematica
LinearRecurrence[{3, -3, 1}, {1, 21, 81}, 50] (* Vincenzo Librandi, Feb 21 2012 *) 20*Range[0,50]^2+1 (* Harvey P. Dale, Aug 06 2025 *)
-
PARI
for(n=0, 40, print1(20*n^2 + 1", ")); \\ Vincenzo Librandi, Feb 21 2012
Formula
From Vincenzo Librandi, Feb 21 2012: (Start)
G.f.: -(1 + 18*x + 21*x^2)/(x-1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Amiram Eldar, Mar 06 2023: (Start)
Sum_{n>=0} 1/a(n) = (coth(Pi/(2*sqrt(5)))*Pi/(2*sqrt(5)) + 1)/2.
Sum_{n>=0} (-1)^n/a(n) = (cosech(Pi/(2*sqrt(5)))*Pi/(2*sqrt(5)) + 1)/2. (End)
From Elmo R. Oliveira, Jan 25 2025: (Start)
E.g.f.: exp(x)*(1 + 20*x + 20*x^2).
a(n) = A212656(2*n). (End)
Extensions
Edited by N. J. A. Sloane, Oct 12 2009
Comments