OFFSET
0,6
COMMENTS
Let k*(k+n)= c*c, gcd(n,k,c)=1 . Then primitive triples (n,k,c) are of the form : 1) n is prime. (n,k,c)=( p, (p*p-2*p+1)/4, (p*p-1)/4 ) 2) n=(c/t)*(c/t)- t*t, n is not a prime, t positive integer. (n,k,c)=( (c/t)*(c/t)- t*t, t*t, c ). [Ctibor O. Zizka, May 04 2009]
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..10000 (terms 0..2000 from Carmine Suriano)
EXAMPLE
a(7) = 9 because 9 (7+9) = 144 = 12^2.
MATHEMATICA
Do[k = 1; While[ !IntegerQ[ Sqrt[ k (k + n)]], k++ ]; Print[k], {n, 5, 75} ]
PROG
(Python)
from itertools import takewhile
from collections import deque
from sympy import divisors
def A067721(n): return ((a:=next(iter(deque((d for d in takewhile(lambda d:d<n, divisors(n**2)) if not (d-n**2//d)&3), 1)), 0))+(n**2//a-(n<<1) if a else 0)>>2) if n else 1 # Chai Wah Wu, Aug 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 05 2002
STATUS
approved