OFFSET
0,2
COMMENTS
The identity (12*n^2 + 1)^2 - (36*n^2 + 6)*(2*n)^2 = 1 can be written as a(n)^2 - A158479(n)*A005843(n)^2 = 1.
Sequence found by reading the line from 13, in the direction 13, 49, ..., in the square spiral whose vertices are the generalized octagonal numbers A001082. - Omar E. Pol, Jul 18 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Vincenzo Librandi, X^2-AY^2=1 [broken link]
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = A010014(n)/2. - Vladimir Joseph Stephan Orlovsky, May 18 2009
G.f: (13*x^2 + 10*x + 1)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 1 + A135453(n). - Omar E. Pol, Jul 18 2012
E.g.f.: (1 + 12*x + 12*x^2)*exp(x). - G. C. Greubel, Nov 06 2019
From Amiram Eldar, Jul 15 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + (Pi/sqrt(12))*coth(Pi/sqrt(12)))/2.
Sum_{n>=0} (-1)^n/a(n) = (1 + (Pi/sqrt(12))*csch(Pi/sqrt(12)))/2. (End)
From Amiram Eldar, Feb 05 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi/sqrt(12))*sinh(Pi/sqrt(6)).
Product_{n>=1} (1 - 1/a(n)) = (Pi/sqrt(12))*csch(Pi/sqrt(12)). (End)
EXAMPLE
a(1) = 12*1^2 + 1 = 13.
a(2) = 12*2^2 + 1 = 49.
a(3) = 12*3^2 + 1 = 109.
MAPLE
seq(12*n^2 +1, n=0..45); # G. C. Greubel, Nov 06 2019
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {13, 49, 109}, 40]
12*Range[40]^2 +1 (* G. C. Greubel, Nov 06 2019 *)
PROG
(Magma) I:=[13, 49, 109]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2) +Self(n-3): n in [1..50]];
(PARI) a(n)=12*n^2+1
(Sage) [12*n^2 +1 for n in (1..40)] # G. C. Greubel, Nov 06 2019
(GAP) List([1..40], n-> 12*n^2 + 1); # G. C. Greubel, Nov 06 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 20 2009
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Jun 12 2021
STATUS
approved