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 37 results. Next

A078841 Main diagonal of the table of k-almost primes (A078840): a(n) = (n+1)-st integer that is an n-almost prime.

Original entry on oeis.org

1, 3, 9, 20, 54, 112, 240, 648, 1344, 2816, 5760, 12800, 26624, 62208, 129024, 270336, 552960, 1114112, 2293760, 4915200, 9961472, 20447232, 47775744, 96468992, 198180864, 411041792, 830472192, 1698693120, 3422552064, 7046430720
Offset: 0

Views

Author

Benoit Cloitre and Paul D. Hanna, Dec 10 2002

Keywords

Comments

A k-almost prime is a positive integer that has exactly k prime factors counted with multiplicity.

Examples

			a(0) = 1 since one is the multiplicative identity,
a(1) = 2nd 1-almost prime is the second prime number = A000040(2) = 3,
a(2) = 3rd 2-almost prime = 3rd semiprime = A001358(3) = 9 = {3*3}.
a(3) = 4th 3-almost prime = A014612(4) = 20 = {2*2*5}.
a(4) = 5th 4-almost prime = A014613(5) = 54 = {2*3*3*3},
a(5) = 6th 5-almost prime = A014614(6) = 112 = {2*2*2*2*7}, ....
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger@n; t = Table[{}, {40}]; Do[a = f[n]; AppendTo[ t[[a]], n]; t[[a]] = Take[t[[a]], 10], {n, 2, 148*10^8}]; Table[ t[[n, n + 1]], {n, 30}] (* Robert G. Wilson v, Feb 11 2006 *)
    AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[ Array[a,i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* Eric W. Weisstein, Feb 07 2006 *)
    AlmostPrime[k_, n_] := Block[{e = Floor[ Log[2, n] + k], a, b}, a = 2^e; Do[b = 2^p; While[ AlmostPrimePi[k, a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; AlmostPrime[1, 1] = 2; lst = {}; Do[ AppendTo[lst, AlmostPrime[n-1, n]], {n, 30}]; lst (* Robert G. Wilson v, Nov 13 2007 *)
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A078841(n):
        if n <= 1: return (n<<1)+1
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n)))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 23 2024

Formula

Conjecture: Lim as n->inf. of a(n+1)/a(n) = 2. - Robert G. Wilson v, Nov 13 2007

Extensions

a(14)-a(29) from Robert G. Wilson v, Feb 11 2006

A078842 Sums of the antidiagonals of the table of k-almost primes (A078840).

Original entry on oeis.org

1, 2, 7, 19, 44, 95, 195, 395, 794, 1583, 3172, 6334, 12665, 25313, 50596, 101180, 202326, 404635, 809227, 1618410, 3236766, 6473474, 12946903, 25893723, 51787365, 103574668, 207149213, 414298342, 828596584, 1657193052, 3314385970
Offset: 0

Views

Author

Benoit Cloitre and Paul D. Hanna, Dec 11 2002

Keywords

Comments

A k-almost prime is a positive integer that has exactly k prime factors counted with multiplicity.

Examples

			a(3) = 19 = 5 (3rd prime) + 6 (2nd 2-almost prime) + 8 (first 3-almost prime).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger@n; t = Table[{}, {40}]; Do[a = f[n]; AppendTo[t[[a]], n]; t[[a]] = Take[t[[a]], 10], {n, 2, 148*10^8}]; Plus @@@ Table[t[[n - k + 1, k]], {n, 30}, {k, n, 1, -1}] (* Or *)
    AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[ Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]] ]]]; (* Eric W. Weisstein Feb 07 2006 *)
    AlmostPrime[k_, n_] := Block[{e = Floor[Log[2, n]+k], a, b}, a = 2^e; Do[b = 2^p; While[ AlmostPrimePi[k, a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Table[ Sum[ AlmostPrime[k, n - k + 1], {k, n}], {n, 150}] (* Robert G. Wilson v, Feb 11 2006 *)

Formula

a(n) = Sum_{i=0..n-1} A078840(i+1, n-i).

Extensions

a(12)-a(30) from Robert G. Wilson v, Feb 11 2006

A001358 Semiprimes (or biprimes): products of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form p*q where p and q are primes, not necessarily distinct.
These numbers are sometimes called semiprimes or 2-almost primes.
Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.
Complement of A100959; A064911(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
The graph of this sequence appears to be a straight line with slope 4. However, the asymptotic formula shows that the linearity is an illusion and in fact a(n)/n ~ log(n)/log(log(n)) goes to infinity. See also the graph of A066265 = number of semiprimes < 10^n.
For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.
Numbers that are divisible by exactly 2 prime powers (not including 1). - Jason Kimberley, Oct 02 2011
The (disjoint) union of A006881 and A001248. - Jason Kimberley, Nov 11 2015
An equivalent definition of this sequence is a'(n) = smallest composite number which is not divided by any smaller composite number a'(1),...,a'(n-1). - Meir-Simchah Panzer, Jun 22 2016
The above characterization can be simplified to "Composite numbers not divisible by a smaller term." This shows that this is the equivalent of primes computed via Eratosthenes's sieve, but starting with the set of composite numbers (i.e., complement of 1 union primes) instead of all positive integers > 1. It's easy to see that iterating the method (using Eratosthenes's sieve each time on the remaining numbers, complement of the previously computed set) yields numbers with bigomega = k for k = 0, 1, 2, 3, ..., i.e., {1}, A000040, this, A014612, etc. - M. F. Hasler, Apr 24 2019
For all n except n = 2, a(n) is a deficient number. - Amrit Awasthi, Sep 10 2024
It is reasonable to assume that the "comforting numbers" which John T. Williams found in Chapter 3 of Milne's book "The House at Pooh Corner" are these semiprimes. Winnie-the-Pooh wonders whether he has 14 or 15 honey pots and concludes: "It's sort of comforting." To arrange a semiprime number of honey pots in a rectangular way, let's say on a shelf, with the larger divisor parallel to the wall, there is only one solution and this is for a simple mind like Winnie-the-Pooh comforting. - Ruediger Jehn, Dec 12 2024

Examples

			From _Gus Wiseman_, May 27 2021: (Start)
The sequence of terms together with their prime factors begins:
   4 = 2*2     46 = 2*23     91 = 7*13    141 = 3*47
   6 = 2*3     49 = 7*7      93 = 3*31    142 = 2*71
   9 = 3*3     51 = 3*17     94 = 2*47    143 = 11*13
  10 = 2*5     55 = 5*11     95 = 5*19    145 = 5*29
  14 = 2*7     57 = 3*19    106 = 2*53    146 = 2*73
  15 = 3*5     58 = 2*29    111 = 3*37    155 = 5*31
  21 = 3*7     62 = 2*31    115 = 5*23    158 = 2*79
  22 = 2*11    65 = 5*13    118 = 2*59    159 = 3*53
  25 = 5*5     69 = 3*23    119 = 7*17    161 = 7*23
  26 = 2*13    74 = 2*37    121 = 11*11   166 = 2*83
  33 = 3*11    77 = 7*11    122 = 2*61    169 = 13*13
  34 = 2*17    82 = 2*41    123 = 3*41    177 = 3*59
  35 = 5*7     85 = 5*17    129 = 3*43    178 = 2*89
  38 = 2*19    86 = 2*43    133 = 7*19    183 = 3*61
  39 = 3*13    87 = 3*29    134 = 2*67    185 = 5*37
(End)
		

References

  • Archimedeans Problems Drive, Eureka, 17 (1954), 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York (1974). See p. 211.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • John T. Williams, Pooh and the Philosophers, Dutton Books, 1995.

Crossrefs

Cf. A064911 (characteristic function).
Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r=1), this sequence (r=2), A014612 (r=3), A014613 (r=4), A014614 (r=5), A046306 (r=6), A046308 (r=7), A046310 (r=8), A046312 (r=9), A046314 (r=10), A069272 (r=11), A069273 (r=12), A069274 (r=13), A069275 (r=14), A069276 (r=15), A069277 (r=16), A069278 (r=17), A069279 (r=18), A069280 (r=19), A069281 (r=20).
These are the Heinz numbers of length-2 partitions, counted by A004526.
The squarefree case is A006881 with odd/even terms A046388/A100484 (except 4).
Including primes gives A037143.
The odd/even terms are A046315/A100484.
Partial sums are A062198.
The prime factors are A084126/A084127.
Grouping by greater factor gives A087112.
The product/sum/difference of prime indices is A087794/A176504/A176506.
Positions of even/odd terms are A115392/A289182.
The terms with relatively prime/divisible prime indices are A300912/A318990.
Factorizations using these terms are counted by A320655.
The prime indices are A338898/A338912/A338913.
Grouping by weight (sum of prime indices) gives A338904, with row sums A024697.
The terms with even/odd weight are A338906/A338907.
The terms with odd/even prime indices are A338910/A338911.
The least/greatest term of weight n is A339114/A339115.

Programs

  • Haskell
    a001358 n = a001358_list !! (n-1)
    a001358_list = filter ((== 2) . a001222) [1..]
    
  • Magma
    [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Bruno Berselli, Sep 09 2015
    
  • Maple
    A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a; end if; end do: end if; end proc:
    seq(A001358(n), n=1..120) ; # R. J. Mathar, Aug 12 2010
  • Mathematica
    Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* Zak Seidov, Jun 14 2005 *)
    Select[Range[200], PrimeOmega[#]==2&] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    select( isA001358(n)={bigomega(n)==2}, [1..199]) \\ M. F. Hasler, Apr 09 2008; added select() Apr 24 2019
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, sqrt(lim), t=p;forprime(q=p, lim\t, listput(v,t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 11 2011
    
  • PARI
    A1358=List(4); A001358(n)={while(#A1358M. F. Hasler, Apr 24 2019
    
  • Python
    from sympy import factorint
    def ok(n): return sum(factorint(n).values()) == 2
    print([k for k in range(1, 190) if ok(k)]) # Michael S. Branicky, Apr 30 2022
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A001358(n):
        def f(x): return int(n+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024

Formula

a(n) ~ n*log(n)/log(log(n)) as n -> infinity [Landau, p. 211], [Ayoub].
Recurrence: a(1) = 4; for n > 1, a(n) = smallest composite number which is not a multiple of any of the previous terms. - Amarnath Murthy, Nov 10 2002
A174956(a(n)) = n. - Reinhard Zumkeller, Apr 03 2010
a(n) = A088707(n) - 1. - Reinhard Zumkeller, Feb 20 2012
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)), where P is the prime zeta function. - Enrique Pérez Herrero, Jun 24 2012
sigma(a(n)) + phi(a(n)) - mu(a(n)) = 2*a(n) + 1. mu(a(n)) = ceiling(sqrt(a(n))) - floor(sqrt(a(n))). - Wesley Ivan Hurt, May 21 2013
mu(a(n)) = -Omega(a(n)) + omega(a(n)) + 1, where mu is the Moebius function (A008683), Omega is the count of prime factors with repetition, and omega is the count of distinct prime factors. - Alonso del Arte, May 09 2014
a(n) = A078840(2,n). - R. J. Mathar, Jan 30 2019
A100484 UNION A046315. - R. J. Mathar, Apr 19 2023
Conjecture: a(n)/n ~ (log(n)/log(log(n)))*(1-(M/log(log(n)))) as n -> oo, where M is the Mertens's constant (A077761). - Alain Rocchelli, Feb 02 2025

Extensions

More terms from James Sellers, Aug 22 2000

A014612 Numbers that are the product of exactly three (not necessarily distinct) primes.

Original entry on oeis.org

8, 12, 18, 20, 27, 28, 30, 42, 44, 45, 50, 52, 63, 66, 68, 70, 75, 76, 78, 92, 98, 99, 102, 105, 110, 114, 116, 117, 124, 125, 130, 138, 147, 148, 153, 154, 164, 165, 170, 171, 172, 174, 175, 182, 186, 188, 190, 195, 207, 212, 222, 230, 231, 236, 238, 242, 244
Offset: 1

Views

Author

Keywords

Comments

Sometimes called "triprimes" or "3-almost primes".
See also A001358 for product of two primes (sometimes called semiprimes).
If you graph a(n)/n for n up to 10000 (and probably quite a bit higher), it appears to be converging to something near 3.9. In fact the limit is infinite. - Franklin T. Adams-Watters, Sep 20 2006
Meng shows that for any sufficiently large odd integer n, the equation n = a + b + c has solutions where each of a, b, c is 3-almost prime. The number of such solutions is (log log n)^6/(16 (log n)^3)*n^2*s(n)*(1 + O(1/log log n)), where s(n) = Sum_{q >= 1} Sum_{a = 1..q, (a, q) = 1} exp(i*2*Pi*n*a/q)*mu(n)/phi(n)^3 > 1/2. - Jonathan Vos Post, Sep 16 2005, corrected & rewritten by M. F. Hasler, Apr 24 2019
Also, a(n) are the numbers such that exactly half of their divisors are composite. For the numbers in which exactly half of the divisors are prime, see A167171. - Ivan Neretin, Jan 12 2016

Examples

			From _Gus Wiseman_, Nov 04 2020: (Start)
Also Heinz numbers of integer partitions into three parts, counted by A001399(n-3) = A069905(n) with ordered version A000217, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). The sequence of terms together with their prime indices begins:
      8: {1,1,1}     70: {1,3,4}     130: {1,3,6}
     12: {1,1,2}     75: {2,3,3}     138: {1,2,9}
     18: {1,2,2}     76: {1,1,8}     147: {2,4,4}
     20: {1,1,3}     78: {1,2,6}     148: {1,1,12}
     27: {2,2,2}     92: {1,1,9}     153: {2,2,7}
     28: {1,1,4}     98: {1,4,4}     154: {1,4,5}
     30: {1,2,3}     99: {2,2,5}     164: {1,1,13}
     42: {1,2,4}    102: {1,2,7}     165: {2,3,5}
     44: {1,1,5}    105: {2,3,4}     170: {1,3,7}
     45: {2,2,3}    110: {1,3,5}     171: {2,2,8}
     50: {1,3,3}    114: {1,2,8}     172: {1,1,14}
     52: {1,1,6}    116: {1,1,10}    174: {1,2,10}
     63: {2,2,4}    117: {2,2,6}     175: {3,3,4}
     66: {1,2,5}    124: {1,1,11}    182: {1,4,6}
     68: {1,1,7}    125: {3,3,3}     186: {1,2,11}
(End)
		

References

  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition : Chelsea, New York (1974). See p. 211.

Crossrefs

Cf. A000040, A001358 (biprimes), A014613 (quadruprimes), A033942, A086062, A098238, A123072, A123073, A101605 (characteristic function).
Cf. A109251 (number of 3-almost primes <= 10^n).
Subsequence of A145784. - Reinhard Zumkeller, Oct 19 2008
Cf. A007304 is the squarefree case.
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), this sequence (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011
Cf. A253721 (final digits).
A014311 is a different ranking of ordered triples, with strict case A337453.
A046316 is the restriction to odds, with strict case A307534.
A075818 is the restriction to evens, with strict case A075819.
A285508 is the nonsquarefree case.
A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.

Programs

  • Haskell
    a014612 n = a014612_list !! (n-1)
    a014612_list = filter ((== 3) . a001222) [1..] -- Reinhard Zumkeller, Apr 02 2012
    
  • Maple
    with(numtheory); A014612:=n->`if`(bigomega(n)=3, n, NULL); seq(A014612(n), n=1..250) # Wesley Ivan Hurt, Feb 05 2014
  • Mathematica
    threeAlmostPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 3; Select[ Range@244, threeAlmostPrimeQ[ # ] &] (* Robert G. Wilson v, Jan 04 2006 *)
    NextkAlmostPrime[n_, k_: 2, m_: 1] := Block[{c = 0, sgn = Sign[m]}, kap = n + sgn; While[c < Abs[m], While[ PrimeOmega[kap] != k, If[sgn < 0, kap--, kap++]]; If[ sgn < 0, kap--, kap++]; c++]; kap + If[sgn < 0, 1, -1]]; NestList[NextkAlmostPrime[#, 3] &, 2^3, 56] (* Robert G. Wilson v, Jan 27 2013 *)
    Select[Range[244], PrimeOmega[#] == 3 &] (* Jayanta Basu, Jul 01 2013 *)
  • PARI
    isA014612(n)=bigomega(n)==3 \\ Charles R Greathouse IV, May 07 2011
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,lim\4, forprime(q=2,min(lim\(2*p),p), t=p*q; forprime(r=2,min(lim\t,q),listput(v,t*r)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jan 04 2013
    
  • Python
    from sympy import factorint
    def ok(n): f = factorint(n); return sum(f[p] for p in f) == 3
    print(list(filter(ok, range(245)))) # Michael S. Branicky, Aug 12 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A014612(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 17 2024
  • Scala
    def primeFactors(number: Int, list: List[Int] = List())
                                                          : List[Int] = {
      for (n <- 2 to number if (number % n == 0)) {
        return primeFactors(number / n, list :+ n)
      }
      list
    }
    (1 to 250).filter(primeFactors().size == 3) // _Alonso del Arte, Nov 04 2020, based on algorithm by Victor Farcic (vfarcic)
    

Formula

Product p_i^e_i with Sum e_i = 3.
a(n) ~ 2n log n / (log log n)^2 as n -> infinity [Landau, p. 211].
Tau(a(n)) = 2 * (omega(a(n)) + 1) = 2*A083399(a(n)), where tau = A000005 and omega = A001221. - Wesley Ivan Hurt, Jun 28 2013
a(n) = A078840(3,n). - R. J. Mathar, Jan 30 2019

Extensions

More terms from Patrick De Geest, Jun 15 1998

A014613 Numbers that are products of 4 primes.

Original entry on oeis.org

16, 24, 36, 40, 54, 56, 60, 81, 84, 88, 90, 100, 104, 126, 132, 135, 136, 140, 150, 152, 156, 184, 189, 196, 198, 204, 210, 220, 225, 228, 232, 234, 248, 250, 260, 276, 294, 296, 297, 306, 308, 315, 328, 330, 340, 342, 344, 348, 350, 351, 364, 372, 375, 376
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A033987, A114106 (number of 4-almost primes <= 10^n).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), this sequence (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011

Programs

  • Mathematica
    Select[Range[200], Plus @@ Last /@ FactorInteger[ # ] == 4 &] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2008 *)
    Select[Range[400], PrimeOmega[#] == 4&] (* Jean-François Alcover, Jan 17 2014 *)
  • PARI
    isA014613(n) = bigomega(n)==4 \\ Michael B. Porter, Dec 13 2009
    
  • Python
    from sympy import factorint
    def ok(n): return sum(factorint(n).values()) == 4
    print([k for k in range(377) if ok(k)]) # Michael S. Branicky, Nov 19 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A014613(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m*r))-c for a,k in enumerate(primerange(integer_nthroot(x,4)[0]+1)) for b,m in enumerate(primerange(k,integer_nthroot(x//k,3)[0]+1),a) for c,r in enumerate(primerange(m,isqrt(x//(k*m))+1),b)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 17 2024

Formula

Product p_i^e_i with Sum e_i = 4.
a(n) ~ 6n log n / (log log n)^3. - Charles R Greathouse IV, May 04 2013
a(n) = A078840(4,n). - R. J. Mathar, Jan 30 2019

Extensions

More terms from Patrick De Geest, Jun 15 1998

A014614 Numbers that are products of 5 primes (or 5-almost primes, a generalization of semiprimes).

Original entry on oeis.org

32, 48, 72, 80, 108, 112, 120, 162, 168, 176, 180, 200, 208, 243, 252, 264, 270, 272, 280, 300, 304, 312, 368, 378, 392, 396, 405, 408, 420, 440, 450, 456, 464, 468, 496, 500, 520, 552, 567, 588, 592, 594, 612, 616, 630, 656, 660, 675, 680, 684, 688, 696
Offset: 1

Views

Author

Keywords

Comments

Divisible by exactly 5 prime powers (not including 1).

Crossrefs

Cf. A046304, A114453 (number of 5-almost primes <= 10^n).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), this sequence (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011

Programs

  • Mathematica
    Select[Range[300], Plus @@ Last /@ FactorInteger[ # ] == 5 &] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2008 *)
  • PARI
    is(n)=bigomega(n)==5 \\ Charles R Greathouse IV, Mar 20 2013
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A014614(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m*r*s))-d for a,k in enumerate(primerange(integer_nthroot(x,5)[0]+1)) for b,m in enumerate(primerange(k,integer_nthroot(x//k,4)[0]+1),a) for c,r in enumerate(primerange(m,integer_nthroot(x//(k*m),3)[0]+1),b) for d,s in enumerate(primerange(r,isqrt(x//(k*m*r))+1),c)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 17 2024

Formula

Product p_i^e_i with sum e_i = 5.
a(n) ~ 24n log n/(log log n)^4. - Charles R Greathouse IV, Mar 20 2013
a(n) = A078840(5,n). - R. J. Mathar, Jan 30 2019

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu) and Patrick De Geest, Jun 15 1998

A046306 Numbers that are divisible by exactly 6 primes with multiplicity.

Original entry on oeis.org

64, 96, 144, 160, 216, 224, 240, 324, 336, 352, 360, 400, 416, 486, 504, 528, 540, 544, 560, 600, 608, 624, 729, 736, 756, 784, 792, 810, 816, 840, 880, 900, 912, 928, 936, 992, 1000, 1040, 1104, 1134, 1176, 1184, 1188, 1215, 1224, 1232, 1260, 1312, 1320
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

Also called 6-almost primes. Products of exactly 6 primes (not necessarily distinct). Any 6-almost prime can be represented in several ways as a product of two 3-almost primes A014612 and in several ways as a product of three semiprimes A001358. - Jonathan Vos Post, Dec 11 2004

Crossrefs

Cf. A046305, A120047 (number of 6-almost primes <= 10^n).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), A014614 (r = 5), this sequence (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20).

Programs

  • Mathematica
    Select[Range[500], Plus @@ Last /@ FactorInteger[ # ] == 6 &] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2008 *)
    Select[Range[1400],PrimeOmega[#]==6&] (* Harvey P. Dale, May 21 2012 *)
  • PARI
    is(n)=bigomega(n)==6 \\ Charles R Greathouse IV, Mar 21 2013
    
  • Python
    from math import isqrt, prod
    from sympy import primepi, primerange, integer_nthroot
    def A046306(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n-1+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,6)))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 23 2024

Formula

Product p_i^e_i with Sum e_i = 6.
a(n) ~ 120n log n / (log log n)^5. - Charles R Greathouse IV, May 06 2013
a(n) = A078840(6,n). - R. J. Mathar, Jan 30 2019

A046308 Numbers that are divisible by exactly 7 primes counting multiplicity.

Original entry on oeis.org

128, 192, 288, 320, 432, 448, 480, 648, 672, 704, 720, 800, 832, 972, 1008, 1056, 1080, 1088, 1120, 1200, 1216, 1248, 1458, 1472, 1512, 1568, 1584, 1620, 1632, 1680, 1760, 1800, 1824, 1856, 1872, 1984, 2000, 2080, 2187, 2208, 2268, 2352, 2368, 2376
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

Also called 7-almost primes. Products of exactly 7 primes (not necessarily distinct). - Jonathan Vos Post, Dec 11 2004
Also, positions of 7 in A001222. - Zak Seidov, Oct 14 2012

Crossrefs

Cf. A120048 (number of 7-almost primes <= 10^n).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), this sequence (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011

Programs

  • Mathematica
    Select[Range[900], Plus @@ Last /@ FactorInteger[ # ] == 7 &] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2008 *)
  • PARI
    is(n)=bigomega(n)==7 \\ Charles R Greathouse IV, Mar 21 2013
    
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A046308(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n-1+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,7)))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 23 2024

Formula

Product p_i^e_i with sum e_i = 7.
a(n) ~ 720n log n / (log log n)^6. - Charles R Greathouse IV, May 06 2013
a(n) = A078840(7,n). - R. J. Mathar, Jan 30 2019

A046310 Numbers that are divisible by exactly 8 primes counting multiplicity.

Original entry on oeis.org

256, 384, 576, 640, 864, 896, 960, 1296, 1344, 1408, 1440, 1600, 1664, 1944, 2016, 2112, 2160, 2176, 2240, 2400, 2432, 2496, 2916, 2944, 3024, 3136, 3168, 3240, 3264, 3360, 3520, 3600, 3648, 3712, 3744, 3968, 4000, 4160, 4374, 4416, 4536, 4704, 4736
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

Also called 8-almost primes. Products of exactly 8 primes (not necessarily distinct). Any 8-almost prime can be represented in several ways as a product of two 4-almost primes A014613 and in several ways as a product of four semiprimes A001358. - Jonathan Vos Post, Dec 11 2004
Odd terms are in A046321; first odd term is a(64)=6561=3^8. - Zak Seidov, Feb 08 2016

Crossrefs

Cf. A046309, A120049 (number of 8-almost primes <= 10^n).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), this sequence (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20).
Cf. A046321.

Programs

  • Maple
    A046310 := proc(n)
        option remember;
        if n = 1 then
            2^8 ;
        else
            for a from procname(n-1)+1 do
                if numtheory[bigomega](a) = 8 then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A046310(n),n=1..30) ; # R. J. Mathar, Dec 21 2018
  • Mathematica
    Select[Range[1600], Plus @@ Last /@ FactorInteger[ # ] == 8 &] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2008 *)
    Select[Range[5000],PrimeOmega[#]==8&]  (* Harvey P. Dale, Apr 19 2011 *)
  • PARI
    is(n)=bigomega(n)==8 \\ Charles R Greathouse IV, Mar 21 2013
    
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A046310(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n-1+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,8)))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 23 2024

Formula

Product p_i^e_i with Sum e_i = 8.
a(n) ~ 5040n log n / (log log n)^7. - Charles R Greathouse IV, May 06 2013
a(n) = A078840(8,n). - R. J. Mathar, Jan 30 2019

A083140 Sieve of Eratosthenes arranged as an array and read by antidiagonals in the up direction; n-th row has property that smallest prime factor is prime(n).

Original entry on oeis.org

2, 3, 4, 5, 9, 6, 7, 25, 15, 8, 11, 49, 35, 21, 10, 13, 121, 77, 55, 27, 12, 17, 169, 143, 91, 65, 33, 14, 19, 289, 221, 187, 119, 85, 39, 16, 23, 361, 323, 247, 209, 133, 95, 45, 18, 29, 529, 437, 391, 299, 253, 161, 115, 51, 20, 31, 841, 667, 551, 493, 377, 319, 203, 125, 57, 22
Offset: 2

Views

Author

Yasutoshi Kohmoto, Jun 05 2003

Keywords

Comments

A permutation of natural numbers >= 2.
The proportion of integers in the n-th row of the array is given by A005867(n-1)/A002110(n) = A038110(n)/A038111(n). - Peter Kagey, Jun 03 2019, based on comments by Jamie Morken and discussion with Tom Hanlon.
The proportion of the integers after the n-th row of the array is given by A005867(n)/A002110(n). - Tom Hanlon, Jun 08 2019

Examples

			Array begins:
   2   4   6   8  10  12  14  16  18  20  22  24 .... (A005843 \ {0})
   3   9  15  21  27  33  39  45  51  57  63  69 .... (A016945)
   5  25  35  55  65  85  95 115 125 145 155 175 .... (A084967)
   7  49  77  91 119 133 161 203 217 259 287 301 .... (A084968)
  11 121 143 187 209 253 319 341 407 451 473 517 .... (A084969)
  13 169 221 247 299 377 403 481 533 559 611 689 .... (A084970)
		

Crossrefs

Cf. A083141 (main diagonal), A083221 (transpose), A004280, A038179, A084967, A084968, A084969, A084970, A084971.
Arrays of integers grouped into rows by various criteria:
by greatest prime factor: A125624,
by lowest prime factor: this sequence (upward antidiagonals), A083221 (downward antidiagonals),
by number of distinct prime factors: A125666,
by number of prime factors counted with multiplicity: A078840,
by prime signature: A095904,
by ordered prime signature: A096153,
by number of divisors: A119586,
by number of 1's in binary expansion: A066884 (upward), A067576 (downward),
by distance to next prime: A192179.

Programs

  • Mathematica
    a = Join[ {Table[2n, {n, 1, 12}]}, Table[ Take[ Prime[n]*Select[ Range[100], GCD[ Prime[n] #, Product[ Prime[i], {i, 1, n - 1}]] == 1 &], 12], {n, 2, 12}]]; Flatten[ Table[ a[[i, n - i]], {n, 2, 12}, {i, n - 1, 1, -1}]]
    (* second program: *)
    rows = 12; Clear[T]; Do[For[m = p = Prime[n]; k = 1, k <= rows, m += p, If[ FactorInteger[m][[1, 1]] == p, T[n, k++] = m]], {n, rows}]; Table[T[n - k + 1, k], {n, rows}, {k, n}] // Flatten (* Jean-François Alcover, Mar 08 2016 *)

Extensions

More terms from Hugo Pfoertner and Robert G. Wilson v, Jun 13 2003
Showing 1-10 of 37 results. Next