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.

Showing 1-10 of 19 results. Next

A342491 a(n) = f(x)+f(y)+f(z), where (x,y,h) is the n-th Pythagorean triple listed in (A046083, A046084, A009000), and f(m)=A176774(m) is the smallest polygonality of m.

Original entry on oeis.org

12, 14, 23, 12, 28, 29, 27, 20, 38, 52, 27, 22, 11, 47, 20, 49, 53, 16, 69, 81, 17, 47, 59, 59, 34, 41, 93, 32, 76, 33, 34, 121, 76, 93, 88, 33, 37, 39, 101, 102, 83, 27, 90, 52, 73, 183, 75, 37, 45, 130, 105, 15, 155, 83, 120, 54, 106, 133, 129, 15, 123, 42, 225
Offset: 1

Views

Author

Michel Marcus, Mar 14 2021

Keywords

Comments

Inspired by (A245646, A245647, A245648), for which a(n) = 12.
Examples of lower terms: 11 for (21, 28, 35), 10 for (64, 120, 136) and 9 for (8778, 10296, 13530).

Examples

			a(1) = 12 because (3, 4, 5) are (3-, 4-, 5-) gonal numbers, and 3+4+5=12.
		

Crossrefs

Cf. A213188 (see 2nd comment).

Programs

  • PARI
    tp(n) = my(k=3); while( !ispolygonal(n,k), k++); k; \\ A176774
    f(v) = vecsum(apply(tp, v));
    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, middle, small]);););); v = vecsort(Vec(v)); apply(f, v);} \\ adapted from A009000

Formula

a(n) = f(A046083(n)) + f(A046084(n)) + f(A009000(n)) where f is A176774.

A382931 Numbers k for which the Pythagorean triangle (A046083(k), A046084(k), A009000(k)) has an integer altitude.

Original entry on oeis.org

7, 19, 36, 51, 69, 88, 99, 106, 126, 147, 163, 187, 196, 208, 227, 240, 250, 273, 293, 314, 342, 361, 384, 392, 409, 434, 455, 459, 483, 504, 507, 525, 549, 552, 579, 599, 627, 649, 679, 702, 711, 718, 724, 744, 752, 775, 802, 829, 854, 879, 894, 908, 935, 960
Offset: 1

Views

Author

Felix Huber, Apr 11 2025

Keywords

Comments

Let (a, b, c) be a primitive Pythagorean triple. Since gcd(a, b, c) = 1, all and only the Pythagorean triples (k*c*a, k*c*b, k*c^2) have an integer altitude h = (k*c*a*k*c*b)/(k*c^2) = k*a*b, where k is a positive integer.

Examples

			7 is in the sequence because the pythagorean triangle (A046083(7), A046084(7), A009000(7)) = (15, 20, 25) has the integer altitude 15*20/25 = 12.
		

Crossrefs

Programs

  • Maple
    A382931:=proc(H) # All hypotenuses <= H.
        local a,b,c,k,p,q,L,M;
        L:=[];
        M:=[];
        for p from 2 to floor(sqrt(H-1)) do
            for q to min(p-1,floor(sqrt(H-p^2))) do
                if gcd(p,q)=1 and is(p-q,odd) then
                    a:=p^2-q^2;
                    b:=2*p*q;
                    c:=p^2+q^2;
                    for k to iquo(H,c) do
                        L:=[op(L),[k*c,k*max(a,b),k*a*b/c]]
                    od
                fi
            od
        od;
        L:=sort(L);
        for k to nops(L) do
            if is(L[k,3],integer) then
               M:=[op(M),k]
            fi
        od;
        return op(M)
    end proc;
    A382931(1075);

A382932 a(n) is the altitude of the Pythagorean triangle (A046083(A382931(n)), A046084(A382931(n)), A009000(A382931(n))).

Original entry on oeis.org

12, 24, 36, 48, 60, 72, 60, 84, 96, 108, 120, 132, 120, 144, 156, 120, 168, 180, 192, 204, 216, 228, 240, 180, 252, 264, 276, 240, 288, 300, 168, 312, 324, 240, 336, 348, 360, 372, 384, 396, 420, 300, 408, 360, 420, 432, 444, 456, 468, 480, 360, 492, 504, 516
Offset: 1

Views

Author

Felix Huber, Apr 13 2025

Keywords

Comments

All terms are divisible by 12. Proof: (Start)
Let (a, b, c) be a primitive Pythagorean triple. Since gcd(a, b, c) = 1, all and only the Pythagorean triples (k*c*a, k*c*b, k*c^2) have an integer altitude h = (k*c*a*k*c*b)/(k*c^2) = k*a*b, where k is a positive integer.
With a = p^2 - q^2 and b = 2*p*q follows h = 2*k*p*q*(p^2 - q^2) = k*2*p*q*(p + q)*(p - q), where p > q > 0, gcd(p,q) = 1 and p or q is even.
It is to show that p*q*(p + q)*(p - q) is divisible by 6. Since p or q is divisible by 2, it remains to show that p*q*(p + q)*(p - q) is divisible by 3.
If 3 is a divisor of p or q, p*q is divisible by 3. If p mod 3 = 1 and q mod 3 = 2 or p mod 3 = 2 and q mod 3 = 1, then p + q is divisible by 3. If p mod 3 = q mod 3 = 1 or p mod 3 = q mod 3 = 2, then p - q is divisible by 3.
It follows that all terms are divisible by 12. (End)

Examples

			a(1) = 12 because the Pythagorean triangle (A046083(A382931(1)), A046084(A382931(1)), A009000(A382931(1))) = (A046083(7), A046084(7), A009000(7)) = (15, 20, 25) has the integer altitude 15*20/25 = 12.
		

Crossrefs

Programs

  • Maple
    A382932:=proc(H) # All hypotenuses <= H.
        local a,b,c,k,p,q,L,M;
        L:=[];
        M:=[];
        for p from 2 to floor(sqrt(H-1)) do
            for q to min(p-1,floor(sqrt(H-p^2))) do
                if gcd(p,q)=1 and is(p-q,odd) then
                    a:=p^2-q^2;
                    b:=2*p*q;
                    c:=p^2+q^2;
                    for k to iquo(H,c) do
                        L:=[op(L),[k*c,k*max(a,b),k*a*b/c]]
                    od
                fi
            od
        od;
        L:=sort(L);
        for k to nops(L) do
            if is(L[k,3],integer) then
               M:=[op(M),L[k,3]]
            fi
        od;
        return op(M)
    end proc;
    A382932(1075);

Formula

A344083 a(n) = f(x)+f(y)+f(z), where (x,y,h) is the n-th Pythagorean triple listed in (A046083, A046084, A009000), and f(m)=A176775(m) is the index of m as k-gonal number for the smallest possible k.

Original entry on oeis.org

6, 9, 7, 11, 9, 9, 12, 10, 9, 10, 9, 11, 18, 10, 16, 9, 9, 20, 9, 7, 18, 9, 18, 15, 11, 14, 7, 12, 10, 13, 12, 7, 12, 15, 12, 17, 14, 18, 13, 9, 13, 14, 15, 10, 9, 7, 9, 21, 12, 10, 15, 23, 7, 9, 12, 20, 9, 18, 17, 28, 14, 16, 7, 21, 18, 24, 21, 21, 20, 16, 25
Offset: 1

Views

Author

Michel Marcus, May 09 2021

Keywords

Comments

6 is the minimum possible value, and A176775(3,4,5) gives this minimum.
Conjecture: there are no other Pythagorean triples that give this minimum. In other words, it is the only triple with 3 A090467 terms.

Crossrefs

Programs

  • PARI
    tp(n) = my(k=3); while( !ispolygonal(n,k), k++); k; \\ A176774
    itp(n) = my(m=tp(n)); (m-4+sqrtint((m-4)^2+8*(m-2)*n)) / (2*m-4); \\ A176775
    f(v) = vecsum(apply(itp, v));
    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, middle, small]);););); v = vecsort(Vec(v)); apply(f, v);}

A009000 Ordered hypotenuse numbers (squares are sums of 2 distinct nonzero squares).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The largest member 'c' of the Pythagorean triples (a,b,c) ordered by increasing c.
If c^2 = a^2 + b^2 (a < b < c) then c^2 = (n^2 + m^2)/2 with n = b - a, m = b + a. - Zak Seidov, Mar 03 2011
Numbers n such that A083025(n) > 0, i.e., n is divisible by at least one prime of the form 4k+1. - Max Alekseyev, Oct 24 2008
A number appears only once in the sequence if and only if it is divisible by exactly one prime of the form 4k+1 with multiplicity one (cf. A084645). - Jean-Christophe Hervé, Nov 11 2013
If c^2 = a^2 + b^2 with a and b > 0, then a <> b: the sum of 2 equal squares cannot be a square because sqrt(2) is not rational. - Jean-Christophe Hervé, Nov 11 2013

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.

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

A046083 The smallest member 'a' of the Pythagorean triples (a,b,c) ordered by increasing c.

Original entry on oeis.org

3, 6, 5, 9, 8, 12, 15, 7, 10, 20, 18, 16, 21, 12, 15, 24, 9, 27, 30, 14, 24, 20, 28, 33, 40, 36, 11, 39, 33, 25, 16, 32, 42, 48, 24, 45, 21, 30, 48, 18, 51, 40, 36, 13, 60, 39, 54, 35, 57, 65, 60, 28, 20, 48, 40, 63, 56, 60, 66, 36, 15, 69, 80, 45, 56, 72, 22, 27, 75, 44, 35
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    maxHypo = 125; 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[maxHypo], hypotenuseQ]; red[c_] := {a, b, c} /. {ToRules[ Reduce[0 < a <= b && a^2 + b^2 == c^2, {a, b}, Integers]]}; Sort[Flatten[red /@ hypotenuses , 1], Last[#1] < Last[#2] &][[All, 1]] (* Jean-François Alcover, Oct 23 2012 *)

A009012 Ordered long legs of Pythagorean triangles.

Original entry on oeis.org

4, 8, 12, 12, 15, 16, 20, 21, 24, 24, 24, 28, 30, 32, 35, 36, 36, 40, 40, 42, 44, 45, 45, 48, 48, 48, 52, 55, 56, 56, 60, 60, 60, 60, 63, 63, 64, 68, 70, 72, 72, 72, 72, 75, 76, 77, 80, 80, 80, 84, 84, 84, 84, 88, 90, 90, 91, 92, 96, 96, 96, 99, 100, 104, 105, 105, 105, 105, 108
Offset: 1

Views

Author

Keywords

Crossrefs

Very similar to A046084!.

A009023 Long legs of Pythagorean triangles.

Original entry on oeis.org

4, 8, 12, 15, 16, 20, 21, 24, 28, 30, 32, 35, 36, 40, 42, 44, 45, 48, 52, 55, 56, 60, 63, 64, 68, 70, 72, 75, 76, 77, 80, 84, 88, 90, 91, 92, 96, 99, 100, 104, 105, 108, 110, 112, 116, 117, 120, 124, 126, 128, 132, 135, 136, 140, 143, 144, 147, 148, 150, 152, 153, 154, 156
Offset: 1

Views

Author

Keywords

Comments

A227481(a(n)) > 1. - Reinhard Zumkeller, Oct 11 2013
This is A009012 (sorted A046084) without duplicates. - Andrey Zabolotskiy, Dec 27 2017
Does a(n)/n converge to some limit? - Benoit Cloitre, Oct 18 2009
For n = {52000, 72000, 100000}, n/a(n) = {0.499, 0.50175, 0.50428}. - Alex Ratushnyak, Jan 17 2019

References

  • Wacław Sierpiński, Pythagorean triangles, Dover books. [Benoit Cloitre, Oct 17 2009]

Crossrefs

Cf. A074235 (complement), A009012, A046084, A227481.

Programs

  • Haskell
    a009023 n = a009023_list !! (n-1)
    a009023_list = filter ((> 1) . a227481) [1..]
    -- Reinhard Zumkeller, Oct 11 2013

A380073 Long legs of Pythagorean triangles having legs that add up to a square ordered by increasing hypotenuse.

Original entry on oeis.org

28, 40, 112, 160, 156, 204, 252, 360, 340, 345, 448, 640, 561, 744, 624, 700, 816, 1000, 861, 1008, 1440, 1360, 1380, 1173, 1624, 1372, 1645, 1581, 1404, 1729, 1836, 1960, 1792, 2560, 2244, 2268, 2976, 2496, 3240, 2800, 3060, 3105, 3264, 3577, 3285, 4000, 3816
Offset: 1

Views

Author

Felix Huber, Jan 18 2025

Keywords

Comments

Corresponding hypotenuses in A380072, short legs in A380074.
Subsequence of A046084 and supersequence of A089548.

Examples

			28 is in the sequence because 21^2 + 28^2 = 35^2 and 21 + 28 = 7^2.
		

Crossrefs

Programs

  • Maple
    # Calculates the first 10001 terms
    A380073:=proc(M)
        local i,m,p,q,r,v,w,L,F;
        L:=[];
        m:=M^2+2*M+2;
        for p from 2 to M do
            for q to p-1 do
                if gcd(p,q)=1 and (is(p,even) or is(q,even)) then
                    r:=1;
                    for i in ifactors(p^2-q^2+2*p*q)[2] do
                        if is(i[2],odd) then
                            r:=r*i[1]
                        fi
                    od;
                    w:=r*(p^2+q^2);
                    if w<=m then
                        v:=r*max(p^2-q^2,2*p*q);
                        L:=[op(L),seq([i^2*w,i^2*v],i=1..floor(sqrt(m/w)))]
                    fi
                fi
            od
        od;
        F:=[];
        for i in sort(L) do
            F:=[op(F),i[2]]
        od;
        return op(F)
    end proc;
    A380073(4330);

A057099 Middle side of a Pythagorean triangle (ordered by the product of the sides).

Original entry on oeis.org

4, 8, 12, 12, 15, 16, 24, 24, 20, 21, 24, 40, 35, 30, 28, 36, 32, 48, 60, 36, 48, 45, 40, 63, 45, 44, 84, 42, 60, 48, 72, 80, 56, 70, 60, 52, 56, 72, 112, 55, 99, 60, 77, 64, 75, 84, 96, 80, 68, 120, 63, 72, 144, 120, 96, 76, 105, 90, 72, 80, 143, 126, 120, 90, 84, 108, 91
Offset: 1

Views

Author

Henry Bottomley, Aug 01 2000

Keywords

Examples

			a(1)=4 since 3*4*5=60 is smallest possible positive product
		

Crossrefs

Programs

  • Mathematica
    maxShortLeg = 66; terms = 67;
    r[a_] := {a, b, c} /. {ToRules[Reduce[a <= b < c && a^2+b^2 == c^2, {b, c}, Integers]]};
    abc = r /@ Complement[Range[maxShortLeg], {1, 2, 4}] // Flatten[#, 1]&;
    SortBy[abc, Times @@ # &][[;; terms, 2]] (* Jean-François Alcover, Nov 21 2019 *)

Formula

a(n) =A057096(n)/(A057098(n)*A057100(n)) =sqrt(A057100(n)^2-A057098(n)^2)
Showing 1-10 of 19 results. Next