OFFSET
1,2
COMMENTS
This sequence is computed with g(1e9,19) in the PARI program.
A Pellian equation (Pell's equation). - Benoit Cloitre, Feb 03 2006
The corresponding values of y of this Pell equation are in A174765. - Vincenzo Librandi, Dec 21 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Tanya Khovanova, Recursive Sequences
John Robertson, Home page.
Index entries for linear recurrences with constant coefficients, signature (340,-1).
FORMULA
a(n) = 340*a(n-1) - a(n-2) for n >= 3; a(1)=1, a(2)=170. - Benoit Cloitre, Feb 03 2006
G.f.: x*(1-170x)/(1-340x+x^2). - Philippe Deléham, Nov 18 2008
a(n) = A167774(n-1)/9. - Hugo Pfoertner, Feb 11 2024
EXAMPLE
(170^2 - 1)/19 = 39^2.
MATHEMATICA
LinearRecurrence[{340, -1}, {1, 170}, 30] (* Vincenzo Librandi, Dec 21 2011 *)
PROG
(PARI) g(n, k) = for(y=0, n, x=k*y^2+1; if(issquare(x), print1(floor(sqrt(x))", ")))
(PARI) a(n)=real((170+39*quadgen(4*19))^n) /* Michael Somos, Feb 15 2006 */
(PARI) a=vector(12); a[1]=1; a[2]=170; for(i=3, #a, a[i]=340*a[i-1]-a[i-2]); a \\ Benoit Cloitre
(Magma) I:=[1, 170]; [n le 2 select I[n] else 340*Self(n-1)-Self(n-2): n in [1..40]]; // Vincenzo Librandi, Dec 21 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Cino Hilliard, Feb 01 2006
EXTENSIONS
More terms from Benoit Cloitre, Feb 03 2006
Offset changed from 0 to 1 and g.f. adapted by Vincenzo Librandi, Dec 21 2011
STATUS
approved