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.

User: Felix Huber

Felix Huber's wiki page.

Felix Huber has authored 148 sequences. Here are the ten most recent ones:

A386944 Long legs of Pythagorean triples of the form (u^2 - v^2, 2*u*v, u^2 + v^2), ordered by increasing hypotenuse (A386943).

Original entry on oeis.org

8, 16, 24, 30, 32, 36, 48, 48, 42, 60, 70, 64, 80, 72, 96, 96, 90, 84, 108, 120, 100, 112, 126, 120, 110, 140, 135, 128, 160, 154, 168, 160, 144, 144, 192, 198, 192, 180, 182, 216, 224, 168, 216, 240, 196, 200, 234, 224, 252, 189, 240, 210, 286, 288, 220, 280, 280
Offset: 1

Author

Felix Huber, Aug 24 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The nonprimitive Pythagorean triple (6, 8, 10) is of the form (u^2 - v^2, 2*u*v, u^2 + v^2): From u = 3 and v = 1 follows u^2 - v^2 = 8 (long leg), 2*u*v = 6 (short leg), u^2 - v^2 = 10 (hypotenuse). Therefore, 8 is a term.
		

Crossrefs

Programs

  • Maple
    A386944:=proc(N) # To get all hypotenuses <= N
        local i,l,u,v;
        l:=[];
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                if gcd(u,v)>1 or is(u-v,even) then
                    l:=[op(l),[u^2+v^2,max(2*u*v,u^2-v^2),min(2*u*v,u^2-v^2)]]
                fi
            od
        od;
        l:=sort(l);
        return seq(l[i,2],i=1..nops(l));
    end proc;
    A386944(296);

Formula

a(n) = sqrt(A386943(n)^2 - A386945(n)^2).
{A046084(n)} = {a(n)} union {A046087(n)} union {A386308(n)}.

A386945 Short legs of Pythagorean triples of the form (p^2 - q^2, 2*p*q, p^2 + q^2), ordered by increasing hypotenuse (A386943).

Original entry on oeis.org

6, 12, 10, 16, 24, 27, 14, 20, 40, 32, 24, 48, 18, 54, 28, 40, 56, 80, 45, 22, 75, 66, 32, 64, 96, 48, 72, 96, 36, 72, 26, 78, 108, 130, 56, 40, 80, 112, 120, 63, 30, 160, 90, 44, 147, 150, 88, 132, 64, 180, 128, 176, 48, 34, 192, 96, 102, 144, 170, 192, 125, 72
Offset: 1

Author

Felix Huber, Aug 24 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The nonprimitive Pythagorean triple (6, 8, 10) is of the form (u^2 - v^2, 2*u*v, u^2 + v^2): From u = 3 and v = 1 follows u^2 - v^2 = 8 (long leg), 2*u*v = 6 (short leg), u^2 - v^2 = 10 (hypotenuse). Therefore, 6 is a term.
		

Crossrefs

Programs

  • Maple
    A386945:=proc(N) # To get all hypotenuses <= N
        local i,l,u,v;
        l:=[];
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                if gcd(u,v)>1 or is(u-v,even) then
                    l:=[op(l),[u^2+v^2,max(2*u*v,u^2-v^2),min(2*u*v,u^2-v^2)]]
                fi
            od
        od;
        l:=sort(l);
        return seq(l[i,3],i=1..nops(l));
    end proc;
    A386945(296);

Formula

a(n) = sqrt(A386943(n)^2 - A386944(n)^2).
{A046083(n)} = {a(n)} union {A046086(n)} union {A386309(n)}.

A386309 Short legs of Pythagorean triples that do not have the form (u^2 - v^2, 2*u*v, u^2 + v^2) ordered by increasing hypotenuse (A386307), where u and v are positive integers.

Original entry on oeis.org

9, 15, 18, 21, 15, 30, 24, 33, 36, 39, 25, 42, 45, 21, 30, 51, 40, 60, 35, 57, 60, 48, 63, 66, 36, 69, 56, 72, 27, 35, 78, 50, 81, 84, 55, 100, 87, 90, 42, 93, 60, 84, 99, 65, 102, 80, 120, 105, 49, 70, 33, 111, 60, 88, 114, 117, 99, 75, 48, 120, 140, 96, 123, 45
Offset: 1

Author

Felix Huber, Aug 19 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The Pythagorean triple (9, 12, 15) does not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), because 15 is not a sum of two nonzero squares. Therefore 12 is a term.
		

Crossrefs

Subsequence of A046083.

Programs

  • Maple
    A386309:=proc(N) # To get all terms with hypotenuses <= N
        local i,l,m,u,v,r,x,y,z;
        l:={};
        m:={};
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                x:=min(2*u*v,u^2-v^2);
                y:=max(2*u*v,u^2-v^2);
                z:=u^2+v^2;
                m:=m union {[z,y,x]};
                if gcd(u,v)=1 and is(u-v,odd) then
                    l:=l union {seq([i*z,i*y,i*x],i=1..N/z)}
                fi
            od
        od;
        r:=l minus m;
        return seq(r[i,3],i=1..nops(r));
    end proc;
    A386309(1000);

Formula

a(n) = sqrt(A386307(n)^2 - A386308(n)^2).
{A046083(n)} = {a(n)} union {A046086(n)} union {A386945(n)}.

A386307 Ordered hypotenuses of Pythagorean triples that do not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), where u and v are positive integers.

Original entry on oeis.org

15, 25, 30, 35, 39, 50, 51, 55, 60, 65, 65, 70, 75, 75, 78, 85, 85, 87, 91, 95, 100, 102, 105, 110, 111, 115, 119, 120, 123, 125, 130, 130, 135, 140, 143, 145, 145, 150, 150, 155, 156, 159, 165, 169, 170, 170, 174, 175, 175, 182, 183, 185, 185, 187, 190, 195, 195
Offset: 1

Author

Felix Huber, Aug 13 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2) is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.
A101930(n) gives the total number of Pythagorean triples <= 10^n. The percentage of triangles in this sequence increases continuously:
number of terms <= h total number of
h in this sequence hypotenuses <= h percentage
10 0 2 0.0 %
100 21 52 40.4 %
1000 514 881 58.3 %
10000 8629 12471 69.2 %
100000 122431 161436 75.8 %

Examples

			The Pythagorean triple (9, 12, 15) does not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), because 15 is not a sum of two nonzero squares. Therefore 15 is a term.
		

Crossrefs

Programs

  • Maple
    A386307:=proc(N) # To get all hypotenuses <= N
        local i,l,m,u,v,r,x,y,z;
        l:={};
        m:={};
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                x:=min(2*u*v,u^2-v^2);
                y:=max(2*u*v,u^2-v^2);
                z:=u^2+v^2;
                m:=m union {[z,y,x]};
                if gcd(u,v)=1 and is(u-v,odd) then
                    l:=l union {seq([i*z,i*y,i*x],i=1..N/z)}
                fi
            od
        od;
        r:=l minus m;
        return seq(r[i,1],i=1..nops(r));
    end proc;
    A386307(1000);

Formula

a(n) = sqrt(A386308(n)^2 + A386309(n)^2).
{A009000(n)} = {a(n)} union {A020882(n)} union {A386943(n)}.

A386308 Long legs of Pythagorean triples that do not have the form (u^2 - v^2, 2*u*v, u^2 + v^2) ordered by increasing hypotenuse (A386307), where u and v are positive integers.

Original entry on oeis.org

12, 20, 24, 28, 36, 40, 45, 44, 48, 52, 60, 56, 60, 72, 72, 68, 75, 63, 84, 76, 80, 90, 84, 88, 105, 92, 105, 96, 120, 120, 104, 120, 108, 112, 132, 105, 116, 120, 144, 124, 144, 135, 132, 156, 136, 150, 126, 140, 168, 168, 180, 148, 175, 165, 152, 156, 168, 180
Offset: 1

Author

Felix Huber, Aug 19 2025

Keywords

Comments

In the form (u^2 - v^2, 2*u*v, u^2 + v^2), u^2 + v^2 is the hypotenuse, max(u^2 - v^2, 2*u*v) is the long leg and min(u^2 - v^2, 2*u*v) is the short leg.

Examples

			The Pythagorean triple (9, 12, 15) does not have the form (u^2 - v^2, 2*u*v, u^2 + v^2), because 15 is not a sum of two nonzero squares. Therefore 12 is a term.
		

Crossrefs

Subsequence of A046084.

Programs

  • Maple
    A386308:=proc(N) # To get all terms with hypotenuses <= N
        local i,l,m,u,v,r,x,y,z;
        l:={};
        m:={};
        for u from 2 to floor(sqrt(N-1)) do
            for v to min(u-1,floor(sqrt(N-u^2))) do
                x:=min(2*u*v,u^2-v^2);
                y:=max(2*u*v,u^2-v^2);
                z:=u^2+v^2;
                m:=m union {[z,y,x]};
                if gcd(u,v)=1 and is(u-v,odd) then
                    l:=l union {seq([i*z,i*y,i*x],i=1..N/z)}
                fi
            od
        od;
        r:=l minus m;
        return seq(r[i,2],i=1..nops(r));
    end proc;
    A386308(1000);

Formula

a(n) = sqrt(A386307(n)^2 - A386309(n)^2).
{A046084(n)} = {a(n)} union {A046087(n)} union {A386944(n)}.

A386538 a(n) is the maximum possible area of a polygon within a circle of radius n, where both the center and the vertices lie on points of a unit square grid.

Original entry on oeis.org

0, 2, 8, 24, 42, 74, 104, 138, 186, 240, 304, 362, 424, 512, 594, 690, 776, 880, 986, 1104, 1232, 1346, 1490, 1624, 1762, 1930, 2088, 2256, 2418, 2594, 2784, 2962, 3170, 3368, 3584, 3810, 4008, 4248, 4466, 4730, 4976, 5210, 5474, 5736, 6024, 6306, 6570, 6864, 7154
Offset: 0

Author

Felix Huber, Aug 05 2025

Keywords

Comments

a(n) > 99% of the circle area for n >= 50.
Conjecture: The maximum possible area of a polygon within the circle would be the same if only the vertices but not the center were fixed on grid points.
All terms are even.

Examples

			See linked illustration of the term a(4) = 42.
		

Programs

  • Maple
    A386538:=proc(n)
        local x,y,p,s;
        p:=4*n;
        s:={};
        for x to n do
            y:=floor(sqrt(n^2-x^2));
            p:=p+4*y;
            s:=s union {y}
        od;
        return p-2*nops(s)
    end proc;
    seq(A386538(n),n=0..48);
  • Mathematica
    a[n_] := Module[{p=4n},s = {}; Do[ y = Floor[Sqrt[n^2 - x^2]];p = p + 4*y;s = Union[s, {y}],{x,n} ];p - 2*Length[s]];Array[a,49,0] (* James C. McMahon, Aug 19 2025 *)

Formula

a(n) = A386539(A000217(n)) = A386539(n,n) for n >= 1.
a(n) <= A066643(n).

A386539 Triangle read by rows: T(n,k) is the maximum possible area of a polygon within a ellipse with integer axis n and k, where n >= k >= 1 and both the center and the vertices lie on points of a unit square grid.

Original entry on oeis.org

2, 4, 8, 6, 14, 24, 8, 20, 28, 42, 10, 26, 38, 56, 74, 12, 32, 48, 66, 82, 104, 14, 38, 58, 80, 100, 122, 138, 16, 40, 64, 88, 114, 134, 164, 186, 18, 46, 74, 98, 132, 152, 186, 212, 240, 20, 52, 84, 112, 150, 174, 208, 232, 266, 304, 22, 58, 94, 126, 160, 196, 226, 262, 296, 324, 362
Offset: 1

Author

Felix Huber, Aug 05 2025

Keywords

Comments

The axes of the ellipse are assumed to be aligned with the coordinate axes.
Conjecture: The maximum possible area of a polygon within the ellipse would be the same if only the vertices but not the center were fixed on grid points.
All terms are even.

Examples

			The triangle T(n,k) begins:
   n\k  1   2   3   4   5   6   7   8   9  10  11 ...
   1:   2
   2:   4   8
   3:   6  14  24
   4:   8  20  28  42
   5:  10  26  38  56  74
   6:  12  32  48  66  82 104
   7:  14  38  58  80 100 122 138
   8:  16  40  64  88 114 134 164 186
   9:  18  46  74  98 132 152 186 212 240
  10:  20  52  84 112 150 174 208 232 266 304
  11:  22  58  94 126 160 196 226 262 296 324 362
 ...
See linked illustration of the term T(5,3) = 38.
		

Crossrefs

Programs

  • Maple
    T386539:=proc(n,k)
        local x,y,p,s;
        p:=2*(n+k);
        s:={0};
        for x to n-1 do
            y:=floor(k*sqrt(1-x^2/n^2));
            p:=p+4*y;
            s:=s union {y}
        od;
        return p-2*nops(s)
    end proc;
    seq(seq(T386539(n,k),k=1..n),n=1..25);
  • Mathematica
    T[n_, k_] := Module[{p=2*(n+k)},s = {0};Do[ y = Floor[k*Sqrt[1 - x^2/n^2]];p = p + 4*y;s = Union[s, {y}],{x,n-1}];p - 2*Length[s]];Flatten[Table[T[n, k], {n, 1, 11}, {k, 1, n}]] (* James C. McMahon, Aug 19 2025 *)

Formula

a(A000217(n)) = T(n,n) = A386538(n).
a(n) < Pi*n*k.

A386916 Nonprimes k such that sopfr(k) = rad(k), where sopfr(k) is sum of the prime factors of k (counting multiplicity), and rad(k) is the product of its distinct prime factors.

Original entry on oeis.org

18750, 22500, 24000, 27000, 28800, 30720, 32400, 34560, 36450, 38880, 43740, 201684, 345744, 388962, 526848, 592704, 666792, 903168, 1016064, 1143072, 1285956, 1376256, 1548288, 1741824, 1959552, 2204496, 2480058, 7730448, 8696754, 33732864, 35644128, 37949472
Offset: 1

Author

Felix Huber, Aug 13 2025

Keywords

Comments

Nonprimes k such that A001414(k) = A007947(k).
The nonprimes k in this sequence share the property sopfr(k) = rad(k) with the primes.
From Felix Huber and David A. Corneth, Aug 13 2025: (Start)
Terms have at least three distinct prime factors.
Proof: If a term had exactly 0 distinct prime factors then it is 1 but 1 is not a term.
If a term had exactly one distinct prime divisor then it is of the form p^m where p is prime. If m = 1 then it is excluded as it is prime. If m > 1 then sopfr(p^m) = m*p > p = rad(p^m) contradicting equality between sopfr(p^m) and rad(p^m).
If a term had exactly two distinct prime factors, p and q, then there would have to be positive integers x and y satisfying p*q = x*p + y*q, or equivalently, p*(q - x) = y*q. Since q divides neither p nor q - x, this is impossible; therefore, no term with exactly two distinct prime factors exists.
Terms with three and more distinct prime factors do exist completing the proof. (End)
Proper subset of A126706. - Michael De Vlieger, Aug 13 2025

Examples

			18750 = 2*3*5^5 is a term because 2 + 3 + 5 + 5 + 5 + 5 + 5 = 2*3*5 = 30.
1285956 = 2^2*3^8*7^2 is a term because 2 + 2 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 7 + 7 = 2*3*7 = 42.
18537438215625 = 3*5^5*7^11 is a term because 3 + 5*5 + 11*7 = 3*5*7 = 105.
		

Crossrefs

Subsequence of A018252.

Programs

  • Maple
    A386916:=proc(n)
        option remember;
        local k,i;
        if n=1 then
            18750
        else
            for k from procname(n-1)+1 do
                if not isprime(k) and NumberTheory:-Radical(k)=add(i[1]*i[2],i in ifactors(k)[2]) then
                    return k
                fi
            od
        fi;
    end proc;
    seq(A386916(n),n=1..10);
  • Mathematica
    q[k_] := !PrimeQ[k] && Module[{f = FactorInteger[k]},Plus @@ Times @@@f == Times @@ f[[;;, 1]]]; Select[Range[2, 10^6], q] (* Amiram Eldar, Aug 13 2025 *)
  • PARI
    is(n) = {my(f = factor(n)); if(#f~ < 3, return(0)); prod(i = 1, #f~, f[i, 1]) == sum(i = 1, #f~, f[i,1]*f[i,2])} \\ David A. Corneth, Aug 13 2025

A385998 Numbers that are divisible by an equal number of distinct primes and squares.

Original entry on oeis.org

2, 3, 5, 7, 11, 12, 13, 17, 18, 19, 20, 23, 24, 28, 29, 31, 37, 40, 41, 43, 44, 45, 47, 50, 52, 53, 54, 56, 59, 61, 63, 67, 68, 71, 73, 75, 76, 79, 83, 88, 89, 92, 97, 98, 99, 101, 103, 104, 107, 109, 113, 116, 117, 124, 127, 131, 135, 136, 137, 139, 147, 148, 149
Offset: 1

Author

Felix Huber, Aug 05 2025

Keywords

Comments

The smallest term such that number of distinct primes = number of squares = k is:
k = 1: 2,
k = 2: 12,
k = 3: 240,
k = 4: 1260.

Examples

			12 is divisible by 2 distinct primes (2, 3) and by 2 squares (1, 4).
		

Crossrefs

Supersequence of A000040.

Programs

  • Maple
    c:=(n,d)->igcd(n,d)=d and igcd(n/d,d)=d:
    b:=n->nops(select(k->c(n,k),[seq(1..n)])):
    A385998:=proc(n)
        option remember;
        local k;
        if n=1 then
            2
        else
            for k from procname(n-1)+1 do
                if b(k)=NumberTheory:-Omega(k,'distinct') then
                    return k
                fi
            od
        fi;
    end proc;	
    seq(A385998(n),n=1..63);
  • Mathematica
    q[k_] := Module[{e = FactorInteger[k][[;; , 2]]}, k > 1 && Length[e] == Times @@ (1 + Floor[e/2])]; Select[Range[150], q] (* Amiram Eldar, Aug 05 2025 *)
  • PARI
    isok(m) = my(d=divisors(m)); #select(isprime, d) == #select(issquare, d); \\ Michel Marcus, Aug 05 2025

A385997 a(n) is the smallest k such that the sum of the first k primes has exactly n prime factors, counting multiplicity.

Original entry on oeis.org

1, 3, 5, 9, 17, 11, 103, 119, 475, 237, 2661, 1481, 3045, 1567, 22019, 34907, 24995, 28173, 4915, 269225, 214183, 927571, 1085315, 9724983, 2567053, 4620383, 8827803, 38175467, 37167809, 98773463, 153124063, 257222427, 370283099, 24322477, 592786617
Offset: 1

Author

Felix Huber, Jul 27 2025

Keywords

Comments

a(n) is the smallest k such that A001222(A007504(k)) = A102862(k) = n.
a(34) = 24322477. - Robert Israel, Jul 29 2025

Examples

			a(2) = 3, because the sum of the first three primes 2 + 3 + 5 = 10 = 2*5 has exactly 2 prime factors. The sums of the first 1 or 2 primes (2 or 2 + 3 = 5) have only one prime factor.
a(5) = 17, because the sum of the first 17 primes (440 = 2^3*5*11) has exactly 5 prime factors. The sums of the first 1, 2, ..., 16 primes have either fewer or more than 5 prime factors.
		

Crossrefs

Programs

  • Maple
    M:= 29: # for a(1) .. a(M)
    V:= Vector(M):
    t:= 0: p:= 1: count:= 0:
    for i from 1 while count < M do
      p:= nextprime(p);
      t:= t + p;
      v:= numtheory:-bigomega(t);
      if v <= M and V[v] = 0 then V[v]:= i; count:= count+1 fi
    od:
    convert(V,list); # Robert Israel, Jul 29 2025
  • Mathematica
    a[n_]:=Module[{k=1,ps=0},Until[PrimeOmega[ps]==n,ps=ps+Prime[k];k++];k-1];Array[a,20] (* James C. McMahon, Aug 05 2025 *)
  • Python
    from itertools import count
    from sympy import factorint, nextprime
    def A385997(n):
        p, c = 2, 0
        for k in count(1):
            c += p
            if sum(factorint(c).values())==n:
                return k
            p = nextprime(p) # Chai Wah Wu, Aug 08 2025

Extensions

a(23)-a(30) from Robert Israel, Jul 29 2025
a(31) from Sean A. Irvine, Aug 05 2025
a(32)-a(34) from Chai Wah Wu, Aug 08 2025
a(35) from Chai Wah Wu, Sep 01 2025