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 10 results.

A020882 Ordered hypotenuses (with multiplicity) of primitive Pythagorean triangles.

Original entry on oeis.org

5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 65, 73, 85, 85, 89, 97, 101, 109, 113, 125, 137, 145, 145, 149, 157, 169, 173, 181, 185, 185, 193, 197, 205, 205, 221, 221, 229, 233, 241, 257, 265, 265, 269, 277, 281, 289, 293, 305, 305, 313, 317, 325, 325, 337, 349, 353, 365, 365
Offset: 1

Views

Author

Keywords

Comments

The largest member 'c' of the primitive Pythagorean triples (a,b,c) ordered by increasing c.
These are numbers of the form a^2 + b^2 where gcd(b-a, 2*a*b)=1. - M. F. Hasler, Apr 04 2010
Equivalently, numbers of the form a^2 + b^2 where gcd(a,b) = 1 and a and b are not both odd. To avoid double-counting, require a > b > 0. - Franklin T. Adams-Watters, Mar 15 2015
The density of such points in a circle with radius squared = a(n) is ~ Pi * a(n). Restricting to a > b > 0 reduces this by a factor of 1/8; requiring gcd(a,b)=1 provides a factor of 6/Pi^2; and a, b not both odd is a factor of 2/3. (2/3, not 3/4, because the case a, b both even has already been eliminated.) Multiplying, a(n) * Pi * 1/8 * 6/Pi^2 * 2/3 is a(n) / (2 * Pi). But n is approximately this number of points, so a(n) ~ 2 * Pi * n. Conjectured by David W. Wilson, proof by Franklin T. Adams-Watters, Mar 15 2015
Permutations are in A094194, A088511, A121727, A119321, A113482 and A081804. Entries of A024409 occur here more than once. - R. J. Mathar, Apr 12 2010
The distinct terms of this sequence seem to constitute a subset of the sequence defined as a(n) = (-1)^n + 6*n for n >= 1. - Alexander R. Povolotsky, Mar 15 2015
The terms in this sequence are given by f(m,n) = m^2 + n^2 where m and n are any two integers satisfying m > 1, n < m, the greatest common divisor of m and n is 1, and m and n are both not odd. E.g., f(m,n) = f(2,1) = 2^2 + 1^2 = 4 + 1 = 5. - Agola Kisira Odero, Apr 29 2016

References

  • M. de Frénicle, "Méthode pour trouver la solutions des problèmes par les exclusions", in: "Divers ouvrages de mathématiques et de physique, par Messieurs de l'Académie royale des sciences", Paris, 1693, pp 1-44.

Crossrefs

Cf. A004613, A008846, A020883-A020886, A046086, A046087, A222946 (as a number triangle).

Programs

  • Mathematica
    t={};Do[Do[a=Sqrt[c^2-b^2];If[a>b,Break[]];If[IntegerQ[a]&&GCD[a,b,c]==1,AppendTo[t,c]],{b,c-1,3,-1}],{c,400}];t (* Vladimir Joseph Stephan Orlovsky, Jan 21 2012 *)
    f[c_] := Block[{a = 1, b, lst = {}}, While[b = Sqrt[c^2 - a^2]; a < b, If[ IntegerQ@ b && GCD[a, b, c] == 1, AppendTo[lst, a]]; a++]; lst]
    Join @@ Table[ConstantArray[n, Length@f@n], {n, 1, 400, 4}] (* Robert G. Wilson v, Mar 16 2014; corrected by Andrey Zabolotskiy, Oct 31 2019 *)
  • PARI
    {my( c=0, new=[]); for( b=1,99, for( a=1, b-1, gcd(b-a,2*a*b) == 1 && new=concat(new,a^2+b^2)); new=vecsort(new); for( j=1,#new, new[j] > (b+1)^2 & (new=vecextract(new, Str(j,".."))) & next(2); write("b020882.txt",c++," "new[j])); new=[])} \\ M. F. Hasler, Apr 04 2010

Formula

a(n) = sqrt((A120681(n)^2 + A120682(n)^2)/2). - Lekraj Beedassy, Jun 24 2006
a(n) = sqrt(A046086(n)^2 + A046087(n)^2). - Zak Seidov, Apr 12 2011
a(n) ~ 2*Pi*n. - observation by David W. Wilson, proved by Franklin T. Adams-Watters (cf. comments), Mar 15 2015
a(n) = sqrt(A180620(n)^2 + A231100(n)^2). - Rui Lin, Oct 09 2019

Extensions

Edited by N. J. A. Sloane, May 15 2010

A120681 Sum of legs of primitive Pythagorean triangles sorted first on hypotenuse, then long leg.

Original entry on oeis.org

7, 17, 23, 31, 41, 47, 49, 73, 71, 89, 79, 103, 113, 97, 119, 137, 119, 151, 127, 161, 193, 167, 161, 191, 217, 239, 217, 199, 257, 233, 263, 223, 289, 271, 311, 241, 281, 313, 329, 287, 343, 287, 329, 367, 391, 401, 353, 431, 409, 337, 383, 457, 359, 463, 479
Offset: 1

Views

Author

Lekraj Beedassy, Jun 24 2006

Keywords

Comments

The prime numbers congruent to +1 or -1 modulo 8 of this sequence appear exactly once. For a proof see the W. Lang link under A001132. - Wolfdieter Lang, Feb 17 2015

Crossrefs

Programs

  • Mathematica
    A[s_Integer] := With[{s6 = StringPadLeft[ToString[s], 6, "0"]}, Cases[ Import["https://oeis.org/A" <> s6 <> "/b" <> s6 <> ".txt", "Table"], {, }][[All, 2]]];
    A046086 = A@046086;
    A046087 = A@046087;
    a[n_] := A046087[[n]] + A046086[[n]];
    a /@ Range[10000] (* Jean-François Alcover, Mar 07 2020 *)

Formula

a(n) = A046087(n) + A046086(n).

Extensions

Edited and corrected by Ray Chandler, Apr 10 2010

A118962 Difference between short leg and hypotenuse in primitive Pythagorean triangles, sorted on hypotenuse (A020882), then on long leg (A046087).

Original entry on oeis.org

2, 8, 9, 18, 9, 25, 32, 25, 50, 32, 49, 25, 49, 72, 50, 32, 81, 49, 98, 81, 49, 121, 128, 98, 72, 50, 121, 162, 81, 128, 98, 169, 72, 121, 81, 200, 169, 128, 121, 225, 169, 242, 200, 162, 121, 128, 225, 98, 169, 288, 242, 121, 289, 162, 169, 128, 289, 338, 121, 225, 242
Offset: 1

Views

Author

Lekraj Beedassy, May 07 2006

Keywords

Comments

Entries take only values appearing in A096033.

Crossrefs

Formula

a(n) = A020882(n) - A046086(n) = A118961(n) + A120682(n). - Paul Curtz, Dec 11 2008

Extensions

Corrected and extended by Joshua Zucker, May 11 2006

A118961 Difference between long leg and hypotenuse in primitive Pythagorean triangles, sorted on hypotenuse (A020882), then on long leg (A046087).

Original entry on oeis.org

1, 1, 2, 1, 8, 2, 1, 8, 1, 9, 2, 18, 8, 1, 9, 25, 2, 18, 1, 8, 32, 2, 1, 9, 25, 49, 8, 1, 32, 9, 25, 2, 49, 18, 50, 1, 8, 25, 32, 2, 18, 1, 9, 25, 50, 49, 8, 81, 32, 1, 9, 72, 2, 49, 50, 81, 8, 1, 98, 32, 25, 49, 72, 2, 18, 1, 121, 9, 25, 49, 8, 98, 32, 81, 121, 1, 9, 2, 25, 18, 128, 49, 50
Offset: 1

Views

Author

Lekraj Beedassy, May 07 2006

Keywords

Comments

Entries take only values appearing in A096033.

Crossrefs

Formula

a(n) = A020882(n) - A046087(n) = A118962(n) - A120682(n). - Ray Chandler, Nov 24 2019

Extensions

More terms from Joshua Zucker, May 11 2006

A328971 Numerator of the fraction (hypotenuse - difference of legs) / (sum of legs - hypotenuse) of the n-th primitive Pythagorean triangle.

Original entry on oeis.org

2, 3, 5, 4, 7, 7, 5, 9, 6, 7, 9, 11, 11, 7, 8, 9, 11, 13, 8, 13, 15, 13, 9, 10, 11, 12, 15, 10, 17, 11, 12, 15, 13, 17, 19, 11, 17, 13, 19, 17, 19, 12, 13, 14, 21, 15, 19, 16, 21, 13, 14, 23, 19, 16, 23, 17, 21, 14, 25, 23, 16, 17, 25, 21, 23, 15, 19, 16, 17, 18, 23, 27, 25, 19, 20, 16, 17, 23, 18
Offset: 1

Views

Author

S. Brunner, Nov 01 2019

Keywords

Comments

a(n) / A328972(n) should contain all reduced fractions between 1 and sqrt(2) + 1 without duplicates.
a(n) is built from the difference between the length of the hypotenuse (A020882) and the difference between the two legs (A120682) of the n-th primitive Pythagorean triangle.
A328972(n) (denominators) is built from the difference between the sum of the length of the legs (A120681) and the hypotenuse of the n-th primitive Pythagorean triangle.
Then both numbers are divided by their GCD to get the reduced fraction.
All primitive Pythagorean triangles are sorted first on hypotenuse, then on long leg.

Examples

			For n=2 we need the 2nd primitive Pythagorean triangle:
5,12,13
^  ^    We calculate the difference between the two small numbers: 12-5=7.
      ^ And to get our numerator we subtract 7 from the hypotenuse length: 13-7=6.
^  ^    Then we calculate the sum of the two small numbers: 5+12=17.
      ^ We subtract 13 from this sum to get the denominator: 17-13=4.
This gives us the fraction 6/4, and in reduced form 3/2.
		

Crossrefs

Denominators: A328972.

A328972 Denominator of the fraction (hypotenuse - difference of legs) / (sum of legs - hypotenuse) of the n-th primitive Pythagorean triangle.

Original entry on oeis.org

1, 2, 3, 3, 3, 5, 4, 5, 5, 4, 7, 5, 7, 6, 5, 4, 9, 7, 7, 9, 7, 11, 8, 7, 6, 5, 11, 9, 9, 8, 7, 13, 6, 11, 9, 10, 13, 8, 11, 15, 13, 11, 10, 9, 11, 8, 15, 7, 13, 12, 11, 11, 17, 9, 13, 8, 17, 13, 11, 15, 11, 10, 13, 19, 17, 14, 8, 13, 12, 11, 19, 13, 17, 10, 9, 15, 14, 21, 13
Offset: 1

Views

Author

S. Brunner, Nov 01 2019

Keywords

Comments

A328971(n) / a(n) should contain all reduced fractions between 1 and sqrt(2) + 1 without duplicates.
A328971(n) (numerators) is built from the difference between the length of the hypotenuse (A020882) and the difference between the two legs (A120682) of the n-th primitive Pythagorean triangle.
a(n) is built from the difference between the sum of the length of the legs (A120681) and the hypotenuse of the n-th primitive Pythagorean triangle.
Then both numbers are divided by their GCD to get the reduced fraction.
All primitive Pythagorean triangles are sorted first on hypotenuse, then on long leg.

Examples

			For n=13 we need the 13th primitive Pythagorean triangle:
36,77,85
^  ^     We calculate the difference between the two small numbers: 77-36=41.
      ^  To get our numerator we subtract 41 from the hypotenuse length: 85-41=44.
^  ^     Then we calculate the sum of the two small numbers: 36+77=113.
      ^  We subtract 85 from this sum to get the denominator: 113-85=28.
This gives us the fraction 44/28 and in reduced form 11/7.
		

Crossrefs

Numerators: A328971.

A120644 Area common to integer-sided isosceles triangles (x,x,y) and (x,x,z=y+2d), sorted on x > z/2, d being positive.

Original entry on oeis.org

12, 60, 120, 168, 420, 420, 360, 1260, 660, 1848, 1008, 2640, 2772, 1092, 3120, 4680, 1980, 5460, 1680, 5148, 9240, 3432, 2448, 7140, 11220, 14280, 8580, 3420, 15912, 10032, 15960, 5460, 20748, 15708, 23940, 4620, 13260, 21840, 25080, 8160, 23712
Offset: 1

Views

Author

Lekraj Beedassy, Aug 17 2006, Aug 20 2006

Keywords

Comments

x=A020882(n); y=2*A046086(n); z=2*A046087(n); d=A120682(n). y is twice the height of the other triangle with z as base and conversely.
Take the n-th primitive Pythagorean triple (x, y, z) ordered by increasing z, then y. (1/x)^2 + (1/y)^2 = (z/w)^2, where a(n) = w. - Ivan N. Ianakiev, Jan 12 2020

Examples

			168 in the sequence refers to the area common to both triangle (25,25,14) and triangle (25,25,48).
		

Formula

a(n) = y*z/4 = A046086(n)*A046087(n) = 2*A120734(n).

A127923 Difference between squares of legs of primitive Pythagorean triangles, sorted (with multiplicity).

Original entry on oeis.org

7, 41, 119, 161, 239, 527, 721, 959, 1081, 1241, 1393, 1519, 2047, 3281, 3479, 3713, 4207, 4633, 4681, 4879, 5593, 6647, 6887, 7327, 8119, 9401, 9641, 10199, 11753, 12121, 12319, 12593, 16999, 19159, 19199, 19873, 20447, 22393, 23359, 24521, 24521
Offset: 1

Views

Author

Lekraj Beedassy, Feb 06 2007

Keywords

Comments

This is the sorted sequence of all products A120681(i)*A120682(i). - R. J. Mathar, Sep 24 2007
The sequence is conjectural (and may miss entries) because it is generated from a finite list of primitive Pythagorean triangles. The associated lengths in a^2+b^2=c^2 are (a,b)=(3,4), (21,20), (5,12), (15,8), (119,120), (7,24), (55,48), (65,72), (35,12), (45,28), (697,696), (9,40), (33,56), (105,88), (11,60), (63,16), (297,304), (77,36), (91,60), (39,80), (403,396), (133,156), (13,84), (207,224), (4059, 4060), (99,20), (171,140), (85,132), (117,44), (275,252), (15,112), (153,104), (51,140), (555,572), (95,168), (143,24), (17,144), (253, 204), (225,272), (165,52), (1755,1748), (429,460),... with gcd(a, b)=1 and |a^2-b^2| in the sequence. - R. J. Mathar, Sep 24 2007
Confirmed sequence is accurate and complete. Observe that both b-a and b+a must be in A058529. Running through the possible combinations of those values with products below 25000 that produce values of a and b that are legs of primitive Pythagorean triangles confirms list is correct. Note that terms of this sequence must also be in A058529. - Ray Chandler, Apr 11 2010
24521 appears twice in the sequence for (a,b)=(52,165) and (1748,1755). - Ray Chandler, Apr 11 2010

Crossrefs

Extensions

More terms from R. J. Mathar, Sep 24 2007
Removed "conjectural" from description by Ray Chandler, Apr 11 2010

A152910 Difference between legs of primitive Pythagorean triangles sorted first on hypotenuse, then short leg.

Original entry on oeis.org

1, 7, 7, 17, 1, 23, 31, 17, 49, 47, 23, 7, 71, 41, 41, 7, 79, 31, 97, 73, 17, 127, 119, 89, 47, 1, 113, 161, 119, 49, 73, 167, 103, 23, 199, 31, 161, 103, 89, 223, 241, 151, 191, 137, 71, 79, 217, 137, 17, 287, 233, 287, 49, 113, 119, 47, 337, 281, 23, 217, 193, 151, 97
Offset: 1

Views

Author

Paul Curtz, Dec 15 2008, Dec 19 2008

Keywords

Crossrefs

Cf. A058529 (gives range), A120682 (different order).

Extensions

Minor edits by Omar E. Pol, Jan 06 2009
Edited and extended by Ray Chandler, Apr 10 2010

A379596 a(n) is the least positive integer k for which k^2 + (k + n)^2 is a square.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 5, 24, 27, 30, 33, 36, 39, 10, 45, 48, 7, 54, 57, 60, 15, 66, 12, 72, 75, 78, 81, 20, 87, 90, 9, 96, 99, 14, 25, 108, 111, 114, 117, 120, 36, 30, 129, 132, 135, 24, 16, 144, 11, 150, 21, 156, 159, 162, 165, 40, 171, 174, 177, 180, 183, 18, 45
Offset: 1

Views

Author

Felix Huber, Feb 15 2025

Keywords

Comments

a(n) is also the smallest short leg of a Pythagorean triangle where the difference between the two legs is n.
A289398(n) is the least integer m > n for which (n^2 + m^2)/2 is a square. This is equivalent to the least positive integer k for which (n^2 + (n + 2*k)^2)/2 = k^2 + (n + k)^2 is a square. From m = n + 2*k follows a(n) = (A289398(n) - n)/2.

Examples

			a(1) = 3 because 3^2 + (3 + 1)^2 = 5^2 and there is no smaller positive integer k than 3 with that property.
a(28) = 20 because 20^2 + (20 + 28)^2 = 52^2 and there is no smaller positive integer k than 20 with that property.
		

Crossrefs

Programs

  • Maple
    A379596:=proc(n)
        local k;
        for k do
            if issqr(k^2+(k+n)^2) then
                return k
            fi
        od
    end proc;
    seq(A379596(n),n=1..63);
  • Mathematica
    s={};Do[k=0;Until[IntegerQ[Sqrt[k^2+(k+n)^2]],k++];AppendTo[s,k],{n,63}];s (* James C. McMahon, Mar 02 2025 *)
  • PARI
    a(n) = my(k=1); while (!issquare(k^2 + (k + n)^2), k++); k; \\ Michel Marcus, Feb 15 2025
    
  • Python
    from itertools import count
    from sympy.ntheory.primetest import is_square
    def A379596(n): return next(k for k in count(1) if is_square(k**2+(k+n)**2)) # Chai Wah Wu, Mar 02 2025

Formula

a(n) = (A289398(n) - n)/2.
Showing 1-10 of 10 results.