OFFSET
1,2
COMMENTS
When are both n+1 and 19*n+1 perfect squares? This gives the equation 19*x^2 - 18 = y^2.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..300
Index entries for linear recurrences with constant coefficients, signature (0,0,340,0,0,-1).
FORMULA
a(n) = 340*a(n-3) - a(n-6), a(1)=1, a(2)=39, a(3)=571, a(4)=911, a(5)=13299, a(6)=194141.
G.f.: x*(x+1)*(x^4 + 38*x^3 + 533*x^2 + 38*x + 1) / (x^6 - 340*x^3 + 1). - Colin Barker, Sep 01 2013
EXAMPLE
a(7) = 340*911 - 1 = 309739.
MATHEMATICA
LinearRecurrence[{0, 0, 340, 0, 0, -1}, {1, 39, 571, 911, 13299, 194141}, 50]
PROG
(Magma) I:=[1, 39, 571, 911, 13299, 194141]; [n le 6 select I[n] else 340*Self(n-3)-Self(n-6): n in [1..30]]; // Vincenzo Librandi, Nov 18 2011
(PARI) Vec(x*(x+1)*(x^4+38*x^3+533*x^2+38*x+1)/(x^6-340*x^3+1) + O(x^100)) \\ Colin Barker, Sep 01 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sture Sjöstedt, Nov 17 2011
STATUS
approved