OFFSET
0,2
COMMENTS
Zero together with the partial sums of A195019.
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives A008587. The vertices on the main diagonal are the numbers A024966 = (3+4)*A000217 = 7*A000217, where both 3 and 4 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 3, while the distance "b" between nearest edges that are parallel to the initial edge is 4, so the distance "c" between nearest vertices on the same axis is 5 because from the Pythagorean theorem we can write c = (a^2+b^2)^(1/2) = sqrt(3^2+4^2) = sqrt(9+16) = sqrt(25) = 5.
Let an array have m(0,n)=m(n,0)=n*(n-1)/2 and m(n,n)=n*(n+1)/2. The first n+1 terms in row(n) are the numbers in the closed interval m(0,n) to m(n,n). The terms in column(n) are the same from m(n,0) to m(n,n). The first few antidiagonals are 0; 0,0; 1,1,1; 3,2,2,3; 6,4,3,4,6; 10,7,5,5,7,10. a(n) is the difference between the sum of the terms in the n+1 X n+1 matrices and those in the n X n matrices. - J. M. Bergot, Jul 05 2013 [The first five rows are: 0,0,1,3,6; 0,1,2,4,7; 1,2,3,5,8; 3,4,5,6,9; 6,7,8,9,10]
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*(3+4*x)/((1+x)^2*(1-x)^3).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) - a(n-2) = A047355(n+1). (End)
MATHEMATICA
With[{r = Range[50]}, Join[{0}, Accumulate[Riffle[3*r, 4*r]]]] (* or *)
LinearRecurrence[{1, 2, -2, -1, 1}, {0, 3, 7, 13, 21}, 100] (* Paolo Xausa, Feb 09 2024 *)
PROG
(Magma) [(2*n*(7*n+13)+(2*n-5)*(-1)^n+5)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 07 2011 - Sep 12 2011
STATUS
approved