OFFSET
1,2
COMMENTS
Called optimal P-numbers in Tripathi link.
LINKS
A. Tripathi, On Pythagorean triples containing a fixed integer, Fib. Q., 46/47 (2008/2009), 331-340. See Theorem 11.
PROG
(PARI) nbpt(n) = {oddn = n/(2^valuation(n, 2)); f = factor(oddn); for (k=1, #f~, if ((f[k, 1] % 4) != 1, f[k, 2] = 0); ); n1 = factorback(f); if (n % 2, (numdiv(n^2)+numdiv(n1^2))/2 -1, (numdiv((n/2)^2)+numdiv(n1^2))/2 -1); }
lista(nn) = {last = -1; for (n=1, nn, if ((new = nbpt(n)) > last, print1(n, ", "); last = new; ); ); }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 08 2016
STATUS
approved