OFFSET
1,1
COMMENTS
The identity (128*n^2+32*n+1)^2 - (4*n^2+n)*(64*n+8)^2 = 1 can be written as a(n)^2 - A007742(n)*A157336(n)^2 = 1 (see also second part of the comment in A157336). - Vincenzo Librandi, Jan 29 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Vincenzo Librandi, X^2-AY^2=1
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: x*(x^2 + 94*x + 161)/(1-x)^3. - Vincenzo Librandi, Jan 29 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Jan 29 2012
a(n) = 2*A017077(n)^2 - 1. - Bruno Berselli, Jan 29 2012
E.g.f.: (1 + 160*x + 128*x^2)*exp(x) - 1. - G. C. Greubel, Feb 01 2018
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {161, 577, 1249}, 50] (* Vincenzo Librandi, Jan 29 2012 *)
PROG
(Magma) I:=[161, 577, 1249]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jan 29 2012
(PARI) for(n=1, 40, print1(128*n^2 + 32*n + 1", ")); \\ Vincenzo Librandi, Jan 29 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 27 2009
STATUS
approved