OFFSET
0,2
COMMENTS
Zero together with partial sums of A195033.
The only primes in the sequence are 41 and 83 since a(n) = (1/2)*((2*n+(-1)^n+3)/4)*((82*n-43*(-1)^n+43)/4). - Bruno Berselli, Oct 12 2011
The spiral contains infinitely many Pythagorean triples in which the hypotenuses on the main diagonal are the positives multiples of 29 (Cf. A195819). The vertices on the main diagonal are the numbers A195038 = (21+20)*A000217 = 41*A000217, where both 21 and 20 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 21, while the distance "b" between nearest edges that are parallel to the initial edge is 20, so the distance "c" between nearest vertices on the same axis is 29 because from the Pythagorean theorem we can write c = (a^2+b^2)^(1/2) = sqrt(21^2+20^2) = sqrt(441+400) = sqrt(841) = 29. - 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 12 2011: (Start)
G.f.: x*(21+20*x)/((1+x)^2*(1-x)^3).
a(n) = (2*n*(41*n+83)-(2*n+43)*(-1)^n+43)/16.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5).
a(n)-a(-n-2) = A142150(n+1). (End)
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {0, 21, 41, 83, 123}, 50] (* Harvey P. Dale, May 02 2012 *)
PROG
(Magma) [(2*n*(41*n+83)-(2*n+43)*(-1)^n+43)/16: n in [0..50]]; // Vincenzo Librandi, Oct 14 2011
(PARI) concat(0, Vec(x*(21+20*x)/((1+x)^2*(1-x)^3) + O(x^60))) \\ Michel Marcus, Mar 08 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 12 2011
STATUS
approved