OFFSET
1,1
COMMENTS
Note that prime numbers on an axis are automatically an integer distance from 1.
EXAMPLE
a(1) = 227, a prime number: distance from 1 off-axis = (6,8,10) triangle.
PROG
(PARI) { uc(n) = k = (sqrtint(4*n-3)-1)\2; d=n-1-k*(k+1); if(k%2, c=[(k+1)\2-min(d, k+1), (k+1)\2-max(d-k-1, 0)], c=[-k\2+min(d, k+1), -k\2+max(d-k-1, 0)] ); c }
forprime(p=2, 10^5, t=uc(p); if( t[1]!=0 && t[2]!=0 && issquare(t[1]^2+t[2]^2), print1(p, ", "))) \\ Max Alekseyev
CROSSREFS
KEYWORD
nonn
AUTHOR
Donald S. McDonald, Jan 09 2003
EXTENSIONS
More terms from Max Alekseyev, Jan 28 2012
STATUS
approved