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

A165236 Short legs of primitive Pythagorean Triples (a,b,c) such that 2*a+1, 2*b+1 and 2*c+1 are primes.

Original entry on oeis.org

20, 33, 44, 56, 68, 273, 303, 320, 380, 440, 483, 740, 1071, 1089, 1101, 1220, 1376, 1484, 1635, 1773, 1808, 1869, 1940, 1965, 2000, 2120, 2144, 2204, 2319, 2715, 2763, 3003, 3164, 3309, 3500, 3603, 3729, 3740, 3753, 3801, 4148, 4215, 4323, 4340, 4401
Offset: 1

Views

Author

Keywords

Comments

Only one instance of a enters the sequence if multiple solutions exist, like with (a,b,c) = (320,999,1049) and (a,b,c) = (320,25599,25601).
Subsequence of A009004. [R. J. Mathar, Mar 25 2010]

Examples

			(a,b,c) = (20,21,29), (33,56,65), (44,483,485), (56,783,785), (68,285,293), (273,4136,4145).
In the first case, for example, 2*20+1=41, 2*21+1 and 2*29+1 are all prime, which adds the half-leg 20 to the sequence.
		

Crossrefs

Programs

  • Mathematica
    amax=6*10^4;lst={};k=0;q=12!;Do[If[(e=((n+1)^2-n^2))>amax,Break[]];
    Do[If[GCD[m, n]==1,a=m^2-n^2;If[PrimeQ[2*a+1],b=2*m*n;If[PrimeQ[2*b+1],If[GCD[a, b]==1,If[a>b,{a,b}={b,a}];If[a>amax,Break[]];
    c=m^2+n^2;If[PrimeQ[2*c+1], k++;AppendTo[lst,a]]]]]];If[a>amax,Break[]],{m,n+1,12!,2}],{n,1,q, 1}];Union@lst

Extensions

Comments moved to examples and definition clarified by R. J. Mathar, Mar 25 2010

A165160 Short legs in primitive Pythagorean triangles with three side lengths of composite integers.

Original entry on oeis.org

16, 21, 24, 27, 33, 36, 44, 55, 56, 57, 60, 63, 64, 68, 75, 76, 77, 81, 84, 87, 88, 91, 92, 93, 96, 99, 100, 104, 105, 111, 115, 116, 117, 119, 120, 123, 124, 125, 128, 129, 132, 133, 135, 136, 140, 143, 144, 147, 152, 153, 155, 156, 160, 161, 164, 165, 168, 172
Offset: 1

Views

Author

Keywords

Comments

The sequence collects the numbers A such that A^2+B^2 = C^2, AA002808. If there are two or more triangles of this kind with the same A, like (A,B,C) = (33,544,545) and (A,B,C) = (33,56,65), only one instance of A is added to the sequence.

Examples

			(A,B,C) = (16,63,65) contributes A = 16 to the sequence. (A,B,C) = (21,220,221) contributes A = 21.
Further length triples are (24,143,145), (27,364,365), (33,56,65), (33,544,545), (36,77,85), (36,323,325), (44,117,125), (44,483,485), (55,1512,1513), (56,783,785), (57,176,185).
		

Crossrefs

Programs

  • Mathematica
    lst={}; Do[Do[If[IntegerQ[c=Sqrt[a^2+b^2]] && GCD[a,b,c]==1,If[ !PrimeQ[a] && !PrimeQ[b] && !PrimeQ[c], AppendTo[lst,a]]],{b,a+1,Floor[a^2/2],1}], {a,3,400,1}]; Union@lst

Extensions

Edited by R. J. Mathar, Oct 02 2009

A165260 Short legs of primitive Pythagorean triples which have a perimeter which is the average of a twin prime pair.

Original entry on oeis.org

3, 5, 15, 21, 24, 28, 36, 41, 59, 64, 89, 100, 101, 120, 131, 132, 141, 153, 155, 168, 180, 203, 204, 208, 209, 215, 220, 231, 244, 280, 288, 300, 309, 315, 336, 341, 348, 351, 395, 405, 408, 429, 448, 453, 455, 495, 520, 540, 551, 567, 568, 580, 592, 636, 648
Offset: 1

Views

Author

Keywords

Examples

			Triples (a,b,c) which satisfy the rules are (3,4,5), (5,12,13), (15,112,113), (21,220,221), (24,143,145), (28,195,197), (36,77,85), (41,840,841), (59,1740,1741), (64,1023,1025), (89,3960,3961), (100,2499,2501), ... 3+4+5=12 -> 11 and 13 are primes, 5+12+13=30 -> 29 and 31 are primes, ...
		

Crossrefs

Programs

  • Maple
    isA014574 := proc(n)
            return ( isprime(n-1) and isprime(n+1) ) ;
    end proc:
    isA165260 := proc(n)
            local d,bplc,b,c ;
            for d in numtheory[divisors](n^2) do
                    bplc := n^2/d ;
                    c := (d+bplc)/2 ;
                    b := (bplc-d)/2 ;
                    if type(c,'integer') and type(b,'integer') then
                    if c > b and b >= n then
                            if igcd(n,b,c) = 1 and  isA014574(n+b+c) then
                                    return true;
                            end if;
                    end if;
                    end if;
            end do:
            return false;
    end proc:
    for n from 3 to 600 do
            if isA165260(n) then
                    printf("%d,",n);
            end if;
    end do: # R. J. Mathar, Oct 29 2011
  • Mathematica
    amax=10^4;lst={};k=0;q=12!;Do[If[(e=((n+1)^2-n^2))>amax,Break[]];Do[If[GCD[m,n]==1,a=m^2-n^2;b=2*m*n;If[GCD[a,b]==1,If[a>b,{a,b}={b,a}];If[a>amax,Break[]];c=m^2+n^2;x=a+b+c;If[PrimeQ[x-1]&&PrimeQ[x+1],k++;AppendTo[lst,a]]]],{m,n+1,12!,2}],{n,1,q,1}];Union@lst

A165262 Sorted hypotenuses with no repeats of Primitive Pythagorean Triples (PPT) if sum of all 3 sides are averages of twin prime pairs.

Original entry on oeis.org

5, 13, 85, 113, 145, 197, 221, 241, 349, 457, 541, 569, 625, 821, 829, 841, 1025, 1037, 1093, 1157, 1241, 1433, 1465, 1621, 1741, 1769, 2029, 2069, 2249, 2353, 2441, 2465, 2501, 2669, 2725, 2801, 2809, 2825, 2873, 3029, 3077, 3221, 3293, 3305, 3389, 3889
Offset: 1

Views

Author

Keywords

Examples

			Triples begin 3,4,5; 5,12,13; 15,112,113; 21,220,221; 24,143,145; 28,195,197; 36,77,85; 41,840,841; 59,1740,1741; 64,1023,1025; 89,3960,3961; 100,2499,2501; ...
So with sorted hypotenuses:
  3 +  4 +  5 = 12, and 11 and 13 are twin primes;
  5 + 12 + 13 = 30, and 29 and 31 are twin primes; ...
		

Crossrefs

Programs

  • Mathematica
    amax=10^5; lst={}; k=0; q=12!; Do[If[(e=((n+1)^2-n^2))>amax,Break[]]; Do[If[GCD[m,n]==1,a=m^2-n^2; b=2*m*n; If[GCD[a,b]==1,If[a>b,{a,b}={b,a}]; If[a>amax,Break[]]; c=m^2+n^2; x=a+b+c; If[PrimeQ[x-1]&&PrimeQ[x+1],k++; AppendTo[lst,c]]]],{m,n+1,12!,2}],{n,1,q,1}]; Union@lst

A198454 Consider triples a<=b

Original entry on oeis.org

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

Views

Author

Charlie Marion, Oct 26 2011

Keywords

Comments

See A198453.

Examples

			2*3 + 2*3 = 3*4
3*4 + 5*6 = 6*7
4*5 + 9*10 = 10*11
5*6 + 6*7 = 8*9
5*6 + 14*15 = 15*16
6*7 + 9*10 = 11*12
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, New York, 1964, pp. 104-134.

Crossrefs

A009041 Ordered legs of Pythagorean triangles.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 11, 12, 12, 12, 12, 13, 14, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 23, 24, 24, 24, 24, 24, 24, 24, 25, 25, 26, 27, 27, 27, 28, 28, 28, 28, 29, 30, 30, 30, 30, 31, 32, 32, 32, 32, 33, 33, 33, 33, 34, 35, 35, 35, 35, 36
Offset: 1

Views

Author

Keywords

Comments

Order the set of all Pythagorean triangles. This is the sequence of the first leg.
Sorted union of A009004 and A009012 retaining duplicates. - Sean A. Irvine, Apr 18 2018

Examples

			First legs of (3,4,5), (4,3,5), (5,12,13), (6,8,10), (7,24,25), (8,6,10), (8,15,17), (9,12,15), (9,40,41), ... - _Michael Somos_, Mar 03 2004
		

Crossrefs

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).

A211176 Numbers n which are the hypotenuse of a Pythagorean triple with n' as a leg, where n' is the arithmetic derivative of n.

Original entry on oeis.org

125, 625, 23125, 142805, 210125, 371293, 7983625, 9370805, 25757525, 50062025, 120670225, 489766225, 881052625, 1471596725, 2307267625, 2489771125, 3145529225, 3474871553, 6975757441, 7977558641
Offset: 1

Views

Author

Paolo P. Lava, Feb 01 2013

Keywords

Comments

This sequence is a subsequence of A008846. - Ray Chandler, Jan 27 2017

Examples

			n = 23125, n' = 19125 and sqrt(n^2-n'^2) = 13000.
		

Crossrefs

Programs

  • Maple
    with(numtheory); ListA211176:= proc(q)local a,n,p;
    for n from 2 to q do a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]);
    if n<>a and type(sqrt(n^2-a^2),integer) then print(n); fi;
    od; end: ListA211176(10^9);

Formula

A002144(n)^A002365(n) and A002144(n)^A002366(n) are terms of the sequence for all n. - Ray Chandler, Jan 27 2017

Extensions

Name and Maple program corrected by Paolo P. Lava, Sep 30 2013
a(12)-a(16) from Donovan Johnson, Sep 30 2013
a(17)-a(18) from Ray Chandler, Jan 25 2017
a(19)-a(20) from Ray Chandler, Jan 27 2017

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.

A009070 Ordered sides of Pythagorean triangles.

Original entry on oeis.org

3, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 12, 12, 13, 13, 14, 15, 15, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 23, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 27, 27, 27, 28, 28, 28, 28, 29, 29, 30, 30, 30, 30, 30, 31, 32, 32, 32
Offset: 1

Views

Author

Keywords

Comments

Sorted union of A009000, A009004, and A009012, retaining duplicates. - Sean A. Irvine, Apr 19 2018

Crossrefs

Previous Showing 11-20 of 20 results.