S000625


Least number k such that k^2 + n^2 is a square and gcd(k,n) = 1, or zero if no such square exists.

0, 0, 4, 3, 12, 0, 24, 15, 40, 0, 60, 5, 84, 0, 8, 63, 144, 0, 180, 21, 20, 0, 264, 7, 312, 0, 364, 45, 420, 0, 480, 255, 56, 0, 12, 77, 684, 0, 80, 9, 840, 0, 924, 117, 28, 0, 1104, 55, 1200, 0, 140, 165, 1404, 0, 48, 33, 176, 0, 1740, 11, 1860, 0, 16, 1023

1

S000625

Note that this plot is substantially different from the one in S000624. Note that s(2^n) = 4^(n-1) + 1. For all n of the form 4*m+2, s(n) = 0. Those n are listed in A111284.

T. D. Noe, Plot of 1000 terms

T. D. Noe, Table of 1000 terms

Eric W. Weisstein, MathWorld: Pythagorean Triple

(Mma) PerfectSquareQ[n_] := JacobiSymbol[n, 13] =!= -1 && JacobiSymbol[n, 19] =!= -1 && JacobiSymbol[n, 17] =!= -1 && JacobiSymbol[n, 23] =!= -1 && IntegerQ[Sqrt[n]]; nn = 100; Join[{0, 0}, Table[If[Mod[a - 2, 4] == 0, 0, s = Select[Range[nn^2], PerfectSquareQ[a^2 + #^2] && GCD[a, #] == 1 &, 1]; If[s == {}, 0, s[[1]]]], {a, 3, nn}]]

Cf. A111284S000624.

nonn

T. D. Noe, May 12 2015

© Tony D Noe 2014-2015