OFFSET
0,2
COMMENTS
Zero together with partial sums of A195031.
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives multiples of 13 (cf. A008595). The vertices on the main diagonal are the numbers A195037 = (5+12)*A000217 = 17*A000217, where both 5 and 12 are the first two edges in the spiral. The distance "a" between nearest edges that are perpendicular to the initial edge of the spiral is 5, while the distance "b" between nearest edges that are parallel to the initial edge is 12, so the distance "c" between nearest vertices on the same axis is 13 because from the Pythagorean theorem we can write c = (a^2 + b^2)^(1/2) = sqrt(5^2 + 12^2) = sqrt(25 + 144) = sqrt(169) = 13. - Omar E. Pol, Oct 12 2011
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Ron Knott, Pythagorean triangles and Triples
Eric Weisstein's World of Mathematics, Pythagorean Triple
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
From Bruno Berselli, Oct 13 2011: (Start)
G.f.: x*(5 + 12*x)/((1 + x)^2*(1 - x)^3).
a(n) = (1/2)*((2*n + (-1)^n + 3)/4)*((34*n - 3*(-1)^n+3)/4) = (2*n*(17*n + 27) + (14*n - 3)*(-1)^n + 3)/16.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). (End)
E.g.f.: (1/16)*((3 + 88*x + 34*x^2)*exp(x) - (3 + 14*x)*exp(-x)). - Franck Maminirina Ramaharo, Nov 23 2018
MATHEMATICA
a[n_] := (2 n (17 n + 27) + (14 n - 3)*(-1)^n + 3)/16; Array[a, 50, 0] (* Amiram Eldar, Nov 23 2018 *)
PROG
(Magma) [(2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
(PARI) vector(50, n, n--; (2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16) \\ G. C. Greubel, Nov 23 2018
(Sage) [(2*n*(17*n+27)+(14*n-3)*(-1)^n+3)/16 for n in range(50)] # G. C. Greubel, Nov 23 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 12 2011
STATUS
approved