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

A251728 Semiprimes p*q for which p <= q < p^2.

Original entry on oeis.org

4, 6, 9, 15, 21, 25, 35, 49, 55, 65, 77, 85, 91, 95, 115, 119, 121, 133, 143, 161, 169, 187, 203, 209, 217, 221, 247, 253, 259, 287, 289, 299, 301, 319, 323, 329, 341, 361, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 529, 533, 551, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2014

Keywords

Comments

Semiprimes p*q for which there exists r <= q such that r^k <= p <= q < r^(k+1), for some k >= 1, i.e., semiprimes whose both prime factors fit inside a semiopen range of two consecutive powers of some natural number r which itself is not greater than the larger prime factor. If such r exists, then it must be <= p (the smaller prime factor of n), which forces q to be less than p^2. On the other hand, when p <= q < p^2, then setting r = p and k = 1 satisfies the equation r^k <= p <= q < r^(k+1).
Assuming that A054272(n), the number of primes in interval [p(n), p(n)^2], is nondecreasing (implied for example if Legendre's or Brocard's conjecture is true), it follows that for any a(n), A003961(a(n)) is also in sequence. In other words, whenever prime(i)*prime(j) is in the sequence, then so is also prime(i+1)*prime(j+1).
From above would follow also that these are all the "settled semiprimes" that occur in a square array A083221 constructed from the sieve of Eratosthenes, from the level A251719 downward. Furthermore, this sequence would then be an infinite disjoint union of sequences of A003961-iterates starting from the initial values given in A251724.
See also the comments in the complementary sequence of semiprimes, A138511.
Composite numbers n with all prime factors greater than the cube root of n. - Doug Bell, Oct 27 2015
If "p <= q" in the definition were changed to "p < q" then the squares of primes (A001248) would be removed, yielding A138109. - Jon E. Schoenfield, Dec 27 2022

Crossrefs

An intersection of A251726 and A001358 (semiprimes).
Complement of A138511 in A001358.
A251724 after the initial 2 is a subsequence.

Programs

  • Haskell
    a251728 n = a251728_list !! (n-1)
    a251728_list = filter f [1..] where
                          f x = q < p ^ 2 && a010051' q == 1
                                where q = div x p; p = a020639 x
    -- Reinhard Zumkeller, Jan 06 2015
    
  • Mathematica
    fQ[n_] := Block[{pf = FactorInteger@ n, p, q}, p = pf[[1, 1]]; q = pf[[-1, 1]]; And[p <= q < p^2, PrimeOmega@ n == 2]]; Select[Range@ 720, fQ] (* Michael De Vlieger, Oct 27 2015 *)
  • PARI
    lista(nn) = forcomposite(n=1, nn, my(f = factor(n));if (#select(x->(x > n^(1/3)), f[,1]) == #f~, print1(n, ", "))); \\ Michel Marcus, Oct 27 2015
    
  • PARI
    list(lim)=my(v=List()); forprime(q=2,sqrtnint((lim\1)^2,3), forprime(p=sqrtint(q)+1,min(q,lim\q), listput(v,p*q))); Set(v) \\ Charles R Greathouse IV, Oct 27 2015
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A251728(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(min(x//p,p**2)) for p in primerange(s+1)))
        return bisection(f,n,n) # Chai Wah Wu, Mar 05 2025

Formula

For all n >= 1, A078898(a(n)) = A243055(a(n)) + 2.
Limit_{n->oo} n*log(a(n))/a(n) = log(2). - Alain Rocchelli, Nov 10 2022

A361373 Number of prime powers p^m <= n such that p | n.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Jun 17 2024

Keywords

Comments

Let p be prime. The term "prime power" p^m, m > 0, used here is that of A246655 = A000040 U A246547, the union of primes and perfect prime powers. Essentially, 1 is not considered a prime power.

Examples

			Let S = {k <= n : rad(k) | n} = row n of A162306
a(1) = 0 since S = {1} has 0 prime powers.
a(2) = 1 since S = {1, [2]} has 1 prime power.
a(4) = 2 since S = {1, [2, 4]} has 2 prime powers.
a(6) = 3 since S = {1, [2, 3, 4], 6} has 3 prime powers.
a(10) = 4 since S = {1, [2, 4, 5, 8], 10} has 4 prime powers.
a(12) = 5 since S = {1, [2, 3, 4], 6, [8, 9], 12} has 5 prime powers, etc.
		

Crossrefs

Programs

  • Maple
    a := n -> add(ilog[p](n), p in NumberTheory:-PrimeFactors(n)):
    seq(a(n), n = 1..92); # Peter Luschny, Jun 20 2024
  • Mathematica
    {0}~Join~Table[Total@ Map[Floor@ Log[#, n] &, FactorInteger[n][[All, 1]]], {n, 2, 120}]
  • PARI
    a(n) = if (n==1, 0, my(f=factor(n)[,1]); sum(k=1, #f, logint(n, f[k]))); \\ Michel Marcus, Jun 20 2024
    
  • Python
    from sympy import integer_log, primefactors
    def A361373(n): return sum(integer_log(n,p)[0] for p in primefactors(n)) # Chai Wah Wu, Sep 20 2024

Formula

a(n) = Sum_{p | n} floor(log n / log p).
a(n) = number of prime powers in row n of A162306.
a(n) < A000005(n), since A000005 counts 1.
a(n) < A010846(n), since A010846 counts 1.
Let tau = A000005, rad = A007947, rcf = A010846, and lpf = A020639.
a(p) = tau(p) - 1 = rcf(p) - 1 = 1 since S = row p of both A027750 and A162306 = {1, p} contains the prime power p.
a(p^m) = tau(p^m) - 1 = rcf(p^m) = 1 = m since S = row p^m of both A027750 and A162306 = {1, p, p^2, ..., p^m} contains the prime powers {p, p^2, ..., p^m}.
a(k) = tau(k) - 1 = 3 for squarefree composite k = p*q, p < q < p^2 in A138109 since S = row k of A162306 = {1, p, q, p^2, p*q} contains 3 prime powers {p, q, p^2}.
a(k) < tau(k) for k in A138511 and k in A126706 since m = lpf(k)^(-1 + floor(log k / log lpf(k))) is such that m < k but m does not divide k.

A380438 Integers k that are the product of 3 distinct primes, the smallest of which is larger than the 5th root of k: k = p*q*r, where p, q, r are primes and k^(1/5) < p < q < r.

Original entry on oeis.org

30, 105, 165, 195, 231, 385, 455, 595, 665, 715, 805, 935, 1001, 1015, 1045, 1085, 1105, 1235, 1265, 1295, 1309, 1435, 1463, 1495, 1505, 1547, 1595, 1615, 1645, 1705, 1729, 1771, 1855, 1885, 1955, 2015, 2035, 2065, 2093, 2135, 2185, 2233, 2255, 2261, 2345, 2365, 2387, 2405, 2431, 2465, 2485
Offset: 1

Views

Author

Matthew Goers, Jan 24 2025

Keywords

Comments

This subsequence of the sphenics (A007304) is similar to A362910 or A138109 for semiprimes. Ishmukhametov and Sharifullina defined semiprimes n = p*q where each prime is greater than n^(1/4) as strongly semiprime. This sequence defines sphenic numbers with an analogous 'strength' as a product of 3 distinct primes k = p*q*r where each prime is greater than k^(1/5), or, alternately, k < p^5.
The only even term is 30 = 2*3*5.
As there are many equivalent ways of expressing Ishmukhametov and Sharifullina's "strongly semiprime" criterion, it is not obvious how it should most appropriately be extended to measure an equivalent "strength" of numbers with more prime factors. Here we follow a comparison of the least prime factor, p, to the factored number, k; but we could instead compare the greatest prime factor, r, to k; or p to r; or measure the variance/standard deviation of the prime factors (more precisely, after twice taking the logarithm of each factor as is done in A379271). Furthermore, it looks clear that the comparison used here (p against k^(1/5)) could be shown to give a substantially lower density asymptotically within the sphenics than Ishmukhametov and Sharifullina's equivalent for semiprimes. - Peter Munn, Feb 18 2025 and May 13 2025

Examples

			231 = 3*7*11 and 231^(1/5) < 3, so 231 is in the sequence.
255 = 3*5*17 but 255^(1/5) > 3, so 255 is not in the sequence.
		

Crossrefs

Subsequence of A253567, A290965, A379271, and A007304.
A046301 is a subsequence (product of 3 successive primes).
Cf. A115957, A138109, A251728, A362910 (strong semiprimes), A380995.

Programs

  • Mathematica
    q[k_] := Module[{f = FactorInteger[k]}, f[[;; , 2]] == {1, 1, 1} && f[[1, 1]]^5 > k]; Select[Range[2500], q] (* Amiram Eldar, Feb 14 2025 *)
  • PARI
    isok(k) = my(f=factor(k)); (bigomega(f)==3) && (omega(f)==3) && (k < vecmin(f[,1])^5); \\ Michel Marcus, Jan 27 2025
    
  • PARI
    list(lim)=my(v=List()); forprime(p=2,sqrtnint(lim\=1,3), forprime(q=p+1,min(sqrtint(lim\p),p^2), forprime(r=q+2,min(lim\(p*q),p^4\q), listput(v,p*q*r)))); Set(v) \\ Charles R Greathouse IV, May 20 2025
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A380438(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(max(0,primepi(min(x//(p*q),p**4//q))-b) for a,p in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,q in enumerate(primerange(p+1,isqrt(x//p)+1),a+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 28 2025

A380995 Integers k that are the product of 3 distinct primes, the smallest of which is larger than the 4th root of k: k = p*q*r, where p, q, r are primes and k^(1/4) < p < q < r.

Original entry on oeis.org

385, 455, 595, 1001, 1309, 1463, 1547, 1729, 1771, 2093, 2233, 2261, 2387, 2431, 2717, 3289, 3553, 4147, 4199, 4301, 4433, 4807, 5083, 5291, 5423, 5681, 5797, 5863, 6061, 6149, 6409, 6479, 6721, 6851, 6919, 7163, 7337, 7429, 7579, 7657, 7667, 7733, 7843, 8041, 8177, 8437, 8569, 8671, 8723, 8789, 8987, 9061
Offset: 1

Views

Author

Matthew Goers, Feb 12 2025

Keywords

Comments

This subsequence of the sphenics (A007304) is similar to A362910 or A138109 for semiprimes. Ishmukhametov and Sharifullina defined semiprimes n = p*q where each prime is greater than n^(1/4) as strongly semiprime. This sequence lists sphenic numbers that are a product of 3 distinct primes k = p*q*r where each prime is greater than k^(1/4).
Sequence is intersection of A007304 (sphenics) and A088382 (numbers not exceeding the 4th power of their smallest prime factor).
No terms have 2 or 3 as a prime factor, as all sphenic numbers are greater than 2^4 = 16 and all odd sphenic numbers are greater than 3^4 = 81.
A380438 is the 'less strong' sequence of sphenic numbers k = p*q*r, where k^(1/5) < p < q < r.

Examples

			595 = 5*7*17 and 595^(1/4) < 5, so 595 is in the sequence.
665 = 5*7*19 but 665^(1/4) > 5, so 665 is not in the sequence.
		

Crossrefs

Cf. A007304 (sphenics), A088382, A380438, A115957, A362910 (strong semiprimes), A251728, A138109.
Subsequence of A253567, A290965.

Programs

  • Mathematica
    q[k_] := Module[{f = FactorInteger[k]}, f[[;; , 2]] == {1, 1, 1} && f[[1, 1]]^4 > k]; Select[Range[10^4], q] (* Amiram Eldar, Feb 14 2025 *)
  • PARI
    is(n) = my(f = factor(n)); f[,2] == [1,1,1]~ && f[1,1]^4 > n \\ David A. Corneth, Apr 24 2025
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A380995(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1		
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(max(0,primepi(min(x//(p*q),p**3//q))-b) for a,p in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,q in enumerate(primerange(p+1,isqrt(x//p)+1),a+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 28 2025
    

A384000 Smallest number k with n distinct prime factors such that A010846(k) = A024718(n) (a tight lower bound), or -1 if such k does not exist.

Original entry on oeis.org

1, 2, 6, 1001, 268801, 3433936673, 2603508937756211
Offset: 0

Views

Author

Michael De Vlieger, May 19 2025

Keywords

Comments

These numbers k have the smallest A010846(k) for a number with n distinct prime factors.
a(7) <= 1398483454696343742813089 = 1049 * 2819 * 3319 * 3433 * 3457 * 3463 * 3467.
a(8) <= 32829974457045619959776094471833047127947.

Examples

			Table of a(n), n = 0..6, showing prime decomposition and cardinality of row a(n) of A162306, c(n) = A010846(a(n)) = A024718(n).
n               a(n)   c(n)    prime factors of a(n)        a(n)
----------------------------------------------------------------------
0                  1     1     -
1                  2     2     2                            A000040(1)
2                  6     5     2,   3                       A138109(1)
3               1001    15     7,  11,  13                  A383177(1)
4             268801    50    13,  23,  29,  31             A383178(2)
5         3433936673   176    41,  83,  97, 101, 103        A383179(209)
6   2603508937756211   638   163, 373, 439, 457, 461, 463
Tables of terms m in r(a(n)) = row a(n) of A162306, writing instead only exponents i of prime power factors p^i | m for  each p | a(n), written in order of the prime base:
For n = 2, i.e., squarefree semiprime k in A138109 (that achieves the lower bound), we have the following ordered exponent combinations in a rank-2 table:
  00  10  20
  01  11
Thus row 6 of A162306 has the following elements:
   1   2   4
   3   6
For n = 3, i.e., sphenic k in A383177 (that achieves the lower bound), we have the following ordered exponent combinations in a rank-3 table:
  000 100 200 300     001 101 201     002
  010 110 210         011 111
  020 120
Thus row 1001 of A162306 has the following elements:
    1   7  49 343      13   91 637    169
   11  77 539         141 1001
  121 857
		

Crossrefs

A284522 Worst cases for Hart's one-line factorization (OLF) method with multiplier M = 1, see comments.

Original entry on oeis.org

6, 85, 259, 527, 1177, 1963, 2881, 6403, 6887, 12319, 23701, 40363, 65473, 93011, 144377, 181429, 273487, 337499, 426347, 557983, 702157, 851927, 1044413, 1295017, 1437599, 1763537, 2211119, 2556751, 2982503, 3553027, 3853327
Offset: 1

Views

Author

Keywords

Comments

Hart's algorithm begins with trial division to the cube root of the number and a check for squares, so numbers factored by these means are removed (leaving A138109). The remaining numbers are compared on the basis of the number of steps Hart's algorithm requires to factor them; new records are members of this sequence.

Examples

			OLF factors 6 on step 2: s = ceil(sqrt(2*6)) = 4, s^2 = 4 mod 6; 4 = 2^2, gcd(6, 4-2) = 2.
OLF factors 85 on step 3: s = ceil(sqrt(3*85)) = 16, s^2 = 1 mod 85; 1 = 1^2, gcd(85, 16-1) = 5.
OLF factors 259 on step 5: s = ceil(sqrt(5*259)) = 36, s^2 = 1 mod 259; 1 = 1^2, gcd(259, 36-1) = 7.
OLF factors 527 on step 8: s = ceil(sqrt(8*527)) = 65, s^2 = 9 mod 527; 9 = 3^2, gcd(527, 65-3) = 31.
OLF factors 1177 on step 9: s = ceil(sqrt(9*1177)) = 103, s^2 = 16 mod 1177; 16 = 4^2, gcd(1177, 103-4) = 11.
		

Crossrefs

Subsequence of A138109.

Programs

  • PARI
    listA138109(lim)=if(lim<6, return([])); my(v=List([6])); forprime(p=3, sqrtint(1+lim\=1)-1, forprime(q=p+2, min(p^2-2, lim\p), listput(v, p*q))); Set(v)
    g(n)=for(i=1, n, if(issquare((sqrtint(i*n-1)+1)^2%n), return(i)))
    list(lim)=my(u=Vecsmall(listA138109(lim)),v=List(),r,t); for(i=1,#u, t=g(u[i]); if(t>r, r=t; listput(v,u[i]))); u=0; Vec(v) \\ Charles R Greathouse IV, Mar 28 2017
    
  • PARI
    make(from,to)=my(v=List()); from=ceil(from); forprime(p=max(sqrtnint(from,3)+1,3),sqrtint(1+to\=1)-1, forprime(q=max(p+2,from/p),min(p^2-2,to\p), listput(v,p*q))); Set(v)
    g(n)=for(i=1, n, if(issquare((sqrtint(i*n-1)+1)^2%n), return(i)))
    list(lim)=my(u,v=List([6]),r,t,step=10^7); forstep(n=85,lim,step, u=make(n,min(n+step-1,lim)); for(i=1,#u,t=g(u[i]); if(t>r, r=t; listput(v,u[i]); print1(u[i]", ")))); Vec(v) \\ Charles R Greathouse IV, Apr 03 2017

A381250 a(n) = least k with n distinct prime factors such that floor(log_q(k)) = floor(log_p(k))-1, where p is the smallest prime factor of k, and q is any other distinct prime factor of k.

Original entry on oeis.org

1, 2, 6, 1001, 81719, 101007559, 84248643949, 78464111896111, 997804397813471821, 1314665322768473913751, 25030469300030639321689313, 93516019518175801382127421211, 1873482639168918364977596279806547, 60958708904928776821774364389940352443, 1089851191947047137351117158610882538395561
Offset: 0

Views

Author

Michael De Vlieger, Apr 21 2025

Keywords

Comments

Terms are squarefree.

Examples

			Let lpf = A020639, slpf = A119288, and gpf = A006530.
Table of a(n), n=0..12, listing the indices of the smallest, second smallest, and greatest prime factors, the latter 2 pertaining to n >= 2 and n >= 3, respectively.
                                           prime indices
 n                                  a(n)   lpf  slpf-gpf  prime factors
-------------------------------------------------------------------------
 0                                    1     0             -
 1                                    2     1             2
 2                                    6     1     2       2*3
 3                                 1001     4     5-6     7*11*13
 4                                81719     5     7-9     11*17*19*23
 5                            101007559     9    13-16    23*41*43*47*53
 6                          84248643949    12    19-23    etc.
 7                       78464111896111    17    25-30
 8                   997804397813471821    26    41-47
 9               1314665322768473913751    32    48-55
10           25030469300030639321689313    47    69-77
11        93516019518175801382127421211    56    83-92
12   1873482639168918364977596279806547    73   108-118
Let f(p,k) = floor(log_p k) and let w be the list of f(p,k) across the sorted list of distinct prime factors of k.
a(0) = 1 since 1 is the only number that does not have prime factors.
a(1) = 2 since prime numbers have just 1 prime factor, and 2 is the smallest prime.
a(2) = 6 since f(2,6) = 2 and f(3,6) = 1; 6 is the smallest squarefree semiprime.
a(3) = 1001 since w(1001) = {3,2,2} and is the smallest sphenic number with this property.
30 is not in the sequence since w(30) = {4,3,2}; 42 is not in since w(42) = {5,3,1}, etc.
a(4) = 81719 since w(81719) = {4,3,3,3} and is the smallest number with 4 distinct prime factors with this property, etc.
		

Crossrefs

Programs

  • Mathematica
    f[om_, lm_] := Block[{f, i, j, k, nn, p, q, w, z},
      i = Abs[om]; z = i - 1; j = z; nn = Abs[lm]; w = ConstantArray[1, i];
      Catch@ Do[
        While[Set[{k, p, q}, {Times @@ #, #[[1]], #[[2]]}] &@
          Map[Prime, Accumulate@ w]; k <= nn,
          If[And[q^i > k, p^(i + 1) > k], Throw[k]];
        j = z; w[[-j]]++];
        If[j == i, Break[], j++; w[[-j]]++;
        w = PadRight[w[[;; -j]], i, 1]], {ii, Infinity}] ];
    {1, 2}~Join~Table[f[n, 2^(11*n + 2)], {n, 2, 16}]
Showing 1-7 of 7 results.