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.

Previous Showing 11-20 of 23 results. Next

A054436 Smallest area of a Pythagorean triangle with n as length of a leg.

Original entry on oeis.org

6, 6, 30, 24, 84, 24, 54, 120, 330, 30, 546, 336, 60, 96, 1224, 216, 1710, 150, 210, 1320, 3036, 84, 750, 2184, 486, 294, 6090, 240, 7440, 384, 726, 4896, 210, 270, 12654, 6840, 1014, 180, 17220, 840, 19866, 726, 540, 12144, 25944, 336, 4116, 3000, 1734, 1014
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Crossrefs

Programs

  • Maple
    readlib(issqr): for a from 3 to 80 do for b from 1 by 1 while not issqr(a^2+b^2) do od: printf("%d, ",a*b/2) od: # C. Ronaldo
  • Mathematica
    a[n_] := For[k = 1, True, k++, If[IntegerQ[Sqrt[n^2+k^2]], Return[n k/2]]];
    a /@ Range[3, 100] (* Jean-François Alcover, Feb 14 2020 *)

Formula

a(n) = n*A055527(n)/2.

A379830 a(n) is the number of Pythagorean triples (u, v, w) for which w - u = n where u < v < w.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 2, 2, 1, 0, 1, 0, 1, 0, 2, 0, 4, 0, 1, 0, 1, 0, 2, 3, 1, 2, 1, 0, 1, 0, 5, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 1, 2, 1, 0, 2, 4, 7, 0, 1, 0, 4, 0, 2, 0, 1, 0, 1, 0, 1, 2, 5, 0, 1, 0, 1, 0, 1, 0, 8, 0, 1, 3, 1, 0, 1, 0, 2, 6, 1, 0, 1, 0, 1, 0
Offset: 0

Views

Author

Felix Huber, Jan 07 2025

Keywords

Comments

The difference between the hypotenuse and the short leg of a primitive Pythagorean triple (p^2 - q^2, 2*p*q, p^2 + q^2) (where p > q are coprimes and not both odd) is d = max(2*q^2, (p - q)^2). For every of these primitive Pythagorean triples whose d divides n, there is a Pythagorean triple with w - u = n. Therefore d <= n and it follows that 1 <= q <= sqrt(n/2) and q + 1 <= p <= q + sqrt(n), which means that there is a finite number of Pythagorean triples with w - u = n.

Examples

			The a(18) = 4 Pythagorean triples are (27, 36, 45), (16, 30, 34), (40, 42, 58), (7, 24, 25) because 45 - 27 = 34 - 16 = 58 - 40 = 25 - 7 = 18.
See also linked Maple program "Pythagorean triples for which w - u = n".
		

Crossrefs

Programs

  • Maple
    A379830:=proc(n)
        local a,p,q;
        a:=0;
        for q to isqrt(floor(n/2)) do
            for p from q+1 to q+isqrt(n) do
                if igcd(p,q)=1 and (is(p,even) or is(q,even)) and n mod max((p-q)^2,2*q^2)=0 then
                    a:=a+1
                fi
            od
        od;
        return a
    end proc;
    seq(A379830(n),n=0..87);

A056137 Number of ways in which n can be the longer leg (middle side) of an integer-sided right triangle.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 0, 2, 0, 1, 0, 1, 2, 0, 0, 3, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 4, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Crossrefs

Formula

a(n) = A046079(n) - A056138(n) = A046081(n) - A046080(n) - A056138(n).

A088978 Number of Pythagorean triangles having the n-th prime prime(n) as one of their sides.

Original entry on oeis.org

0, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1
Offset: 1

Views

Author

Lekraj Beedassy, Oct 31 2003

Keywords

Comments

Primitive Pythagorean triples are given parametrically by (M^2 - N^2)^2 + (2MN)^2 = (M^2 + N^2)^2. Odd primes are uniquely representable (ignoring signs) as M^2 - N^2, but only primes of the form 4k + 1 are uniquely representable as M^2 + N^2. Since 2MN is composite for MN > 1, an odd prime can be a side of one or two Pythagorean triangles. Thus, except for a(1) = 0, a(n) is 2 for prime(n) of the form 4k + 1, and 1 otherwise. - Chris Boyd, Jan 25 2016

Crossrefs

Cf. A046081.

Programs

  • Magma
    [0] cat [(4-NthPrime(n) mod 4+1)/2: n in [2..100]]; // Vincenzo Librandi, Jan 26 2016
  • Maple
    0, seq((4-ithprime(i) mod 4 + 1)/2, i=2..1000); # Robert Israel, Jan 25 2016
  • Mathematica
    Table[(4 - Mod[Prime@ n, 4] + 1)/2, {n, 105}] /. Rational -> 0 (* _Michael De Vlieger, Jan 26 2016 *)
  • PARI
    a088978(n) = my(p=prime(n)); if(p==2,0,if((p-1)%4==0,2,1))
    for(i=1,105,print1(a088978(i),", ")) \\ Chris Boyd, Jan 25 2016
    

Extensions

Corrected and extended by Ray Chandler, Nov 01 2003

A269929 Records for the numbers of Pythagorean triples to which an integer belongs.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 10, 14, 23, 32, 38, 41, 53, 68, 71, 95, 113, 122, 158, 159, 203, 206, 221, 284, 287, 338, 341, 365, 368, 473, 476, 479, 608, 611, 662, 665, 743, 854, 1016, 1097, 1421, 1430, 1826, 1835, 1988, 2231, 2369, 2564, 2636, 3050, 3293, 3314, 4265, 4274, 5480, 5966, 6695, 7109, 7667, 7910, 9125, 9134
Offset: 1

Views

Author

Michel Marcus, Mar 08 2016

Keywords

Crossrefs

Programs

  • PARI
    nbpt(n) = {oddn = n/(2^valuation(n, 2)); f = factor(oddn); for (k=1, #f~, if ((f[k,1] % 4) != 1, f[k,2] = 0);); n1 = factorback(f); if (n % 2, (numdiv(n^2)+numdiv(n1^2))/2 -1, (numdiv((n/2)^2)+numdiv(n1^2))/2 -1);}
    lista(nn) = {last = -1; for (n=1, nn, if ((new = nbpt(n)) > last, print1(new, ", "); last = new;););}

Formula

a(n) = A046081(A269928(n)).

Extensions

More terms from Jinyuan Wang, Mar 15 2019

A328949 Number of non-primitive Pythagorean triples with n as a leg or the hypotenuse.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 0, 2, 0, 1, 3, 2, 0, 2, 0, 3, 2, 1, 0, 5, 2, 2, 2, 2, 0, 5, 0, 3, 2, 2, 3, 5, 0, 1, 3, 6, 0, 4, 0, 2, 6, 1, 0, 8, 1, 4, 3, 3, 0, 3, 3, 5, 2, 2, 0, 10, 0, 1, 5, 4, 4, 4, 0, 3, 2, 5, 0, 10, 0, 2, 7, 2, 2, 5, 0, 9, 3, 2, 0, 9, 4, 1, 3, 5, 0, 8, 3, 2, 2, 1, 3, 11, 0, 2, 5, 7
Offset: 1

Views

Author

Rui Lin, Nov 01 2019

Keywords

Comments

Pythagorean triples including primitive ones and non-primitive ones. For a certain n, it may be a leg or the hypotenuse in either a primitive Pythagorean triple, or a non-primitive Pythagorean triple, or both.
This sequence is the count of n as a leg or the hypotenuse in non-primitive Pythagorean triples.

Examples

			For n=10, 10 is a leg in (10,24,26) and the hypotenuse in (6,8,10), so a(10)=A328708(10)+A328712(10)=1+1=2. And 10 is not a leg or the hypotenuse in any primitive Pythagorean triple, a(10)=A046081(10)-A024363(10)=2-0=2.
		

References

  • A. Beiler, Recreations in the Theory of Numbers. New York: Dover Publications, pp. 116-117, 1966.

Crossrefs

Programs

  • Mathematica
    a[n_] := Count[{x, y} /. Solve[(x^2 + y^2 == n^2 || x^2 - y^2 == n^2) && x > y > 0, {x, y}, Integers], p_ /; GCD @@ p > 1]; Array[a, 100] (* Giovanni Resta, Nov 01 2019 *)

Formula

a(n) = A328708(n) + A328712(n).
a(n) = A046081(n) - A024363(n).

A006593 Least number which is side of n Pythagorean triples.

Original entry on oeis.org

3, 5, 16, 12, 15, 125, 24, 40, 75, 48, 80, 72, 84, 60, 65536, 192, 144, 524288, 384, 640, 9375, 168, 120, 300, 1536, 520, 576, 3072, 975, 2147483648, 336, 240, 1171875, 1500, 1040, 137438953472, 504, 360, 600, 672, 420, 4608, 50000, 780, 3456, 196608, 9216
Offset: 1

Views

Author

Keywords

Comments

First occurrence of n in A046081. - Lekraj Beedassy, Oct 31 2003

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 114.
  • Jean Meeus, Letter to N. J. A. Sloane, Dec 26 1974
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A046081.

Extensions

Corrected and extended by Ray Chandler, Mar 05 2004

A056138 Number of ways in which n can be the shorter leg (shortest side) of an integer-sided right triangle.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 2, 1, 3, 3, 1, 1, 4, 2, 1, 3, 3, 1, 3, 1, 3, 4, 1, 3, 5, 1, 1, 4, 5, 1, 3, 1, 3, 5, 1, 1, 7, 2, 2, 4, 3, 1, 3, 3, 5, 4, 1, 1, 9, 1, 1, 5, 4, 4, 4, 1, 3, 4, 3, 1
Offset: 1

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Crossrefs

Programs

  • PARI
    a(n)=my(b);sum(c=n+2,n^2\2+1,issquare(c^2-n^2,&b) && nCharles R Greathouse IV, Jul 07 2013

Formula

a(n) = A046079(n) - A056137(n) = A046081(n) - A046080(n) - A056137(n).

A269928 Integers n that belong to more Pythagorean triples than preceding integers.

Original entry on oeis.org

1, 3, 5, 12, 15, 24, 40, 48, 60, 120, 240, 360, 420, 720, 840, 1560, 1680, 2520, 3360, 5040, 8400, 9240, 10920, 15120, 18480, 21840, 27720, 32760, 36960, 43680, 55440, 65520, 109200, 110880, 120120, 166320, 196560, 221760, 240240, 360360, 480480, 720720, 1113840
Offset: 1

Views

Author

Michel Marcus, Mar 08 2016

Keywords

Comments

Called optimal P-numbers in Tripathi link.

Crossrefs

Programs

  • PARI
    nbpt(n) = {oddn = n/(2^valuation(n, 2)); f = factor(oddn); for (k=1, #f~, if ((f[k,1] % 4) != 1, f[k,2] = 0);); n1 = factorback(f); if (n % 2, (numdiv(n^2)+numdiv(n1^2))/2 -1, (numdiv((n/2)^2)+numdiv(n1^2))/2 -1);}
    lista(nn) = {last = -1; for (n=1, nn, if ((new = nbpt(n)) > last, print1(n, ", "); last = new;););}

A374845 The numbers p or 2p with p prime and p = 3 mod 4, in ascending order.

Original entry on oeis.org

3, 6, 7, 11, 14, 19, 22, 23, 31, 38, 43, 46, 47, 59, 62, 67, 71, 79, 83, 86, 94, 103, 107, 118, 127, 131, 134, 139, 142, 151, 158, 163, 166, 167, 179, 191, 199, 206, 211, 214, 223, 227, 239, 251, 254, 262, 263, 271, 278, 283, 302, 307, 311, 326, 331, 334, 347, 358, 359, 367, 379, 382, 383, 398
Offset: 1

Views

Author

Manfred Boergens, Jul 22 2024

Keywords

Comments

Numbers appearing exactly once in a Pythagorean triple and as the smallest number in this triple.
Subsequence of A292762.
Inserting 4 as second term gives A374846.

Crossrefs

Programs

  • Mathematica
    t={}; Do[If[(PrimeQ[n]&&Mod[n, 4] == 3)||(PrimeQ[n/2]&&Mod[n/2, 4] == 3), t=Join[t,{n}]], {n, 470}]; t
    (* Positions of the ones in  A046081, omitting position = 4;  based on program by Jean-François Alcover *)
    a[1] = 0; a[n_] := Module[{f}, f = Select[FactorInteger[n], Mod[#[[1]], 4] == 1 &][[All, 2]]; (DivisorSigma[0, If[OddQ[n], n, n/2]^2] - 1)/2 + (Times @@ (2*f + 1) - 1)/2]; arr = Array[a, nmax]; fl = Flatten[Position[arr, 1]]; Delete[fl, 2]
Previous Showing 11-20 of 23 results. Next