OFFSET
0,4
LINKS
Ivan Neretin, Table of n, a(n) for n = 0..10000
EXAMPLE
a(3)=4 because 3^2 + 4^2 = 5^2; a(17)=144 because 17^2 + 144^2 = 145^2.
MATHEMATICA
f[ n_ ] := Block[ {k = n + 1}, While[ ! IntegerQ[ Sqrt[ n^2 + k^2 ] ], k++ ]; k ]; Join[ {1, 0, 0, 4, 0}, Table[ f[ n ], {n, 5, 61} ] ]
PROG
(PARI) a(n)=for(m=n+1, n^2\2+1, if(issquare(m^2+n^2), return(m))); 0 /* Michael Somos, Mar 03 2004 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zak Seidov, Oct 21 2002
EXTENSIONS
Edited by Robert G. Wilson v, Oct 23 2002
STATUS
approved