A009000 Ordered hypotenuse numbers (squares are sums of 2 distinct nonzero squares).
5, 10, 13, 15, 17, 20, 25, 25, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 50, 50, 51, 52, 53, 55, 58, 60, 61, 65, 65, 65, 65, 68, 70, 73, 74, 75, 75, 78, 80, 82, 85, 85, 85, 85, 87, 89, 90, 91, 95, 97, 100, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120
Offset: 1
References
- W. L. Schaaf, Recreational Mathematics, A Guide To The Literature, "The Pythagorean Relationship", Chapter 6 pp. 89-99 NCTM VA 1963.
- W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 2, "The Pythagorean Relation", Chapter 6 pp. 108-113 NCTM VA 1972.
- W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 3, "Pythagorean Recreations", Chapter 6 pp. 62-6 NCTM VA 1973.
Links
- Zak Seidov and T. D. Noe, Table of n, a(n) for n = 1..10000 (Zak Seidov entered the first 1981 terms).
- Anonymous, Links to Pythagorean Theorem Proofs
- Henry Bottomley, Pythagoras's theorem (animated proof)
- Kangourou Math Website, L'animation du theoreme de Pythagore
- Ron Knott, Pythagorean Triples and Online Calculators
- Ron Knott, Right-angled Triangles and Pythagoras' Theorem
- I. Kobayashi et al., Pythagorean Theorem (Java Interactive Proofs, Applications and Explorations)
- Mathematical Database, Poster, 7 Ways to prove the Pythagorean Theorem
- B. Richmond, The Pythagorean Theorem
- M. Shepperd, Web Resources on Pythagoras' Theorem
- J. S. Silverman, A Friendly Introduction to Number Theory, Chapters 1 to 6 (see Chapters 2 and 3).
- G. Villemin's Almanach of Numbers, Triangles & Triplets de Pythagore
- Eric Weisstein's World of Mathematics, Pythagorean Triple
- Index entries for sequences related to sums of squares
Crossrefs
Programs
-
Maple
A009000:=proc(N) # To get all terms <= N local p,q,i,L; L:=[]; for p from 2 to floor(sqrt(N-1)) do for q to p-1 do if igcd(p,q)=1 and is(p-q,odd) then L:=[op(L),seq(i*(p^2+q^2),i=1..N/(p^2+q^2))]; fi od od; return op(sort(L)) end proc: A009000(120); # Felix Huber, Feb 10 2025
-
Mathematica
max = 120; hypotenuseQ[n_] := For[k = 1, True, k++, p = Prime[k]; Which[Mod[p, 4] == 1 && Divisible[n, p], Return[True], p > n, Return[False]]]; hypotenuses = Select[Range[max], hypotenuseQ]; red[c_] := {a, b, c} /. {ToRules[ Reduce[0 < a <= b && a^2 + b^2 == c^2, {a, b}, Integers]]}; A009000 = Flatten[red /@ hypotenuses, 1][[All, -1]] (* Jean-François Alcover, May 23 2012, after Max Alekseyev *) Sqrt[#]&/@Flatten[Table[Total/@Select[IntegerPartitions[n^2,{2}],Length[Union[#]]==2&&AllTrue[Sqrt[#],IntegerQ]&],{n,150}]] (* Harvey P. Dale, May 25 2025 *)
-
PARI
list(lim)=my(v=List(),m2,s2,h2,h); for(middle=4,lim-1, m2=middle^2; for(small=1,middle, s2=small^2; if(issquare(h2=m2+s2,&h), if(h>lim, break); listput(v, h)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 23 2017
-
PARI
list(lim) = {my(lh = List()); for(u = 2, sqrtint(lim), for(v = 1, u, if (u^2+v^2 > lim, break); if ((gcd(u,v) == 1) && (0 != (u-v)%2), for (i = 1, lim, if (i*(u^2+v^2) > lim, break); /* if (u^2 - v^2 < 2*u*v, w = [i*(u^2 - v^2), i*2*u*v, i*(u^2+v^2)], w = [i*2*u*v, i*(u^2 - v^2), i*(u^2+v^2)]); */ listput(lh, i*(u^2+v^2)););););); vecsort(Vec(lh));} \\ Michel Marcus, Apr 10 2021
-
Python
from math import isqrt def aupto(limit): s = [i*i for i in range(1, limit+1)] s2 = sorted(a+b for i, a in enumerate(s) for b in s[i+1:]) return [isqrt(k) for k in s2 if k in s] print(aupto(120)) # Michael S. Branicky, May 10 2021
Comments