OFFSET
2,3
COMMENTS
The case n=1 makes no sense and is omitted. For even n, it seems that 2d < n except for n=4.
LINKS
T. D. Noe, Table of n, a(n) for n = 2..10000
EXAMPLE
a(5)=1 because (5-1) is the largest integer less than 5 such that the sum of their squares (16+25) is a prime number.
MATHEMATICA
maxN=100; Table[d = 1; While[! PrimeQ[n^2 + (n - d)^2], d++]; d, {n, 2, maxN}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
T. D. Noe, Apr 02 2002
STATUS
approved