OFFSET
1,1
COMMENTS
(-5,a(1)) and (A118120(n), a(n+1)) are solutions (x, y) to the Diophantine equation x^2+(x+17)^2 = y^2. (Offset 1 is assumed for A118120.)
lim_{n -> infinity} a(n)/a(n-3) = 3+2*sqrt(2).
lim_{n -> infinity} a(n)/a(n-1) = (19+6*sqrt(2))/17 for n mod 3 = {0, 2}.
lim_{n -> infinity} a(n)/a(n-1) = (387+182*sqrt(2))/17^2 for n mod 3 = 1.
For the generic case x^2+(x+p)^2=y^2 with p=2*m^2-1 a prime number in A066436, m>=2, the x values are given by the sequence defined by: a(n)=6*a(n-3)-a(n-6)+2p with a(1)=0, a(2)=2m+1, a(3)=6m^2-10m+4, a(4)=3p, a(5)=6m^2+10m+4, a(6)=40m^2-58m+21.Y values are given by the sequence defined by: b(n)=6*b(n-3)-b(n-6) with b(1)=p, b(2)=2*m^2+2m+1, b(3)=10m^2-14m+5, b(4)=5p, b(5)=10m^2+14m+5, b(6)=58m^2-82m+29. [From Mohamed Bouhamida, Sep 09 2009]
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,6,0,0,-1).
FORMULA
a(n) = 6*a(n-3)-a(n-6) for n > 6; a(1) = 13, a(2) = 17, a(3) = 25, a(4) = 53, a(5) = 85, a(6) = 137.
G.f.: x*(1-x)*(13+30*x+55*x^2+30*x^3+13*x^4)/(1-6*x^3+x^6).
EXAMPLE
MATHEMATICA
LinearRecurrence[{0, 0, 6, 0, 0, -1}, {13, 17, 25, 53, 85, 137}, 50] (* Harvey P. Dale, Feb 11 2015 *)
PROG
(PARI) {forstep(n=-5, 660000000, [1, 3], if(issquare(2*n*(n+17)+289, &k), print1(k, ", ")))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Feb 09 2009
EXTENSIONS
G.f. corrected, first and fourth comment and examples edited, cross-reference added by Klaus Brockhaus, Sep 22 2009
STATUS
approved