cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A076600 a(n) = smallest k > n such that n^2 + k^2 is a square, or 0 if no such k exists.

Original entry on oeis.org

1, 0, 0, 4, 0, 12, 8, 24, 15, 12, 24, 60, 16, 84, 48, 20, 30, 144, 24, 180, 21, 28, 120, 264, 32, 60, 168, 36, 45, 420, 40, 480, 60, 44, 288, 84, 48, 684, 360, 52, 42, 840, 56, 924, 117, 60, 528, 1104, 55, 168, 120, 68, 165, 1404, 72, 132, 90, 76, 840, 1740, 63, 1860
Offset: 0

Views

Author

Zak Seidov, Oct 21 2002

Keywords

Examples

			a(3)=4 because 3^2 + 4^2 = 5^2; a(17)=144 because 17^2 + 144^2 = 145^2.
		

Programs

  • 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} ] ]
  • 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 */

Extensions

Edited by Robert G. Wilson v, Oct 23 2002