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

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

A110209 1 + sum of first n 3-almost primes.

Original entry on oeis.org

1, 9, 21, 39, 59, 86, 114, 144, 186, 230, 275, 325, 377, 440, 506, 574, 644, 719, 795, 873, 965, 1063, 1162, 1264, 1369, 1479, 1593, 1709, 1826, 1950, 2075, 2205, 2343, 2490, 2638, 2791, 2945, 3109, 3274, 3444, 3615, 3787, 3961, 4136, 4318, 4504, 4692
Offset: 0

Views

Author

Jonathan Vos Post, Sep 06 2005

Keywords

Comments

First differences are the sequence of 3-almost primes (A014612). Hence a(n) is the least positive sequence whose first differences are the sequence of 3-almost primes. Primes in this sequence include: a(1) = a(4) = 59, a(17) = 719, a(21) = 1063, a(27) = 1709, a(35) = 2791, a(37) = 3109, . Semiprimes in this sequence include: a(1) = 3^2, a(2) = 21 = 3 * 7, a(3) = 39 = 3 * 13, a(5) = 86 = 2 * 43, a(12) = 377 = 13 * 29, a(20) = 965 = 5 * 193, a(24) = 1369 = 37^2, a(34) = 2638 = 2 * 1319, a(38) = 3274 = 2 * 1637, a(41) = 3787 = 7 * 541, a(42) = 3961 = 17 * 223, a(47) = 4882 = 2 * 2441. 3-almost primes in this sequence include: a(1) = 2^3, a(6) = 114 = 2 * 3 * 19, a(8) = 186 = 2 * 3 * 31, a(9) = 230 = 2 * 5 * 23, a(10) = 275 = 5^2 * 11, a(11) = 325 = 5^2 * 13, a(14) = 506 = 2 * 11 * 23, a(15) = 574 = 2 * 7 * 41, a(18) = 795 = 3 * 5 * 53, a(19) = 873 + 3^2 * 97, a(22) = 1162 = 2 * 7 * 83, a(25) = 1479 = 3 * 17 * 29, a(28) = 1826 = 2 * 11 * 83, a(30) = 2075 = 5^2 * 83, a(32) = 2343 = 3 * 11 * 71, a(36) = 2945 = 5 * 19 * 31, a(40) = 3615 = 3 * 5 * 241, a(44) = 4318 = 2 * 17 * 127. Note also the powers a(7) = 144 = 12^2.

Crossrefs

Formula

a(0) = 1; for n>0, a(n) = 1 + A086062(n).

A114425 Product of the first n 3-almost primes (A014612).

Original entry on oeis.org

8, 96, 1728, 34560, 933120, 26127360, 783820800, 32920473600, 1448500838400, 65182537728000, 3259126886400000, 169474598092800000, 10676899679846400000, 704675378869862400000, 47917925763150643200000
Offset: 1

Views

Author

Jonathan Vos Post, Feb 13 2006

Keywords

Comments

3-almost prime analog of primorial (A002110). The semiprime analog of primorial is A112141. Equivalent for product of what A086062 is for sum. Bigomega(a(n)) = the number of not necessarily distinct prime factors of a(n) = A001222(a(n)) = A008585(n) = 3*n.

Examples

			a(5) = 933120 = 8 * 12 * 18 * 20 * 27 = the product of the first 5 values of the 3-almost primes = 2^8 * 3^6 * 5, which has 3*5 = 15 prime factors (with multiplicity).
a(20) = 137199755075271237225676800000000 = 8 * 12 * 18 * 20 * 27 * 28 * 30 * 42 * 44 * 45 * 50 * 52 * 63 * 66 * 68 * 70 * 75 * 76 * 78 * 92 = 2^26 * 3^15 * 5^8 * 7^4 * 11, which has 20*3 = 60 prime factors (with multiplicity).
		

Crossrefs

Programs

  • Mathematica
    FoldList[Times,Select[Range[70],PrimeOmega[#]==3&]] (* Harvey P. Dale, Apr 26 2020 *)

Formula

a(n) = Prod[from i = 1 to n] A014612(i).

A217018 Partial sums of 3-almost primes which are again 3-almost primes, i.e., have exactly 3 not necessarily distinct prime factors.

Original entry on oeis.org

8, 20, 964, 1825, 2074, 2637, 3614, 3786, 4503, 5283, 5495, 6414, 6652, 7138, 7383, 9485, 9764, 10330, 10615, 11191, 12427, 12749, 13074, 15475, 16195, 16930, 18446, 19233, 20855, 22108, 22959, 23387, 28273, 28747, 29222, 30676, 32695, 34798, 35871
Offset: 1

Views

Author

M. F. Hasler, Sep 23 2012

Keywords

Comments

Bigomega=3 analog of the semiprime version A092190. In sequence A086062 it was asked whether there are infinitely many such numbers.

Programs

  • PARI
    A217018(n,list=0,N=0,S=0)={until(!n--,until(bigomega(S+=N)==3,until(bigomega(N++)==3,));list&print1(S","));S} \\ - M. F. Hasler, Sep 29 2012

Formula

A217018 = A086062 intersect A014612.

A382831 a(n) is the n-th n-almost-prime that is a partial sum of the sequence of n-almost-primes.

Original entry on oeis.org

2, 10, 964, 1804, 7820, 48120, 830817, 4895208, 11308160, 162802560, 394129476, 3763612800, 19823090472, 1018716103620, 9744542956800, 3989325082624, 329306801920000, 2978224618328064, 11804664377696256, 128906665137012736
Offset: 1

Views

Author

Robert Israel, Apr 28 2025

Keywords

Examples

			The first three members of A086062 that are 3-almost-primes are 8 = 2^3, 20 = 2^2 * 5 = 8 + 12, and 964 = 2^2 * 241 = 8 + 12 + 18 + ... + 92, so a(3) = 964.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) uses priqueue;
      local pq,t,s,x,p,i,count;
      initialize(pq);
      insert([-2^n,2$n],pq);
      s:= 0; count:= 0:
      do
        t:= extract(pq);
        x:= -t[1];
        s:= s + x;
        if numtheory:-bigomega(s) = n  then count:= count+1; if count = n then return s fi fi;
        p:= nextprime(t[-1]);
        for i from n+1 to 2 by -1 while t[i] = t[-1] do
              insert([t[1]*(p/t[-1])^(n+2-i), op(t[2..i-1]), p$(n+2-i)], pq)
        od;
      od
    end proc:
    map(f, [$1..20]);

A216686 Numbers n such that n appears in the partial sums of the m-almost primes, where m=bigomega(n).

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 16, 17, 20, 32, 40, 41, 58, 64, 80, 128, 160, 185, 197, 219, 254, 256, 281, 320, 377, 512, 589, 640, 843, 917, 964, 1024, 1247, 1280, 1652, 1707, 1804, 1825, 2048, 2074, 2157, 2519, 2560, 2637, 2642, 2727, 2771, 3614, 3755, 3786, 4046, 4096, 4227
Offset: 1

Views

Author

Gerasimov Sergey, Sep 13 2012

Keywords

Comments

A013918 is a subsequence. - Zak Seidov, Sep 17 2012
Or: Numbers n equal to the sum of the first k numbers x having bigomega(x)=bigomega(n), for some k. - M. F. Hasler, Sep 23 2012

Examples

			2 is in the sequence because 2 appears in A007504.
4 is in the sequence because 4 appears in A062198.
5 is in the sequence because 5 appears in A007504.
6 is not in the sequence because 6 is not in A062198.
8 is in the sequence because 8 appears in A086062,
10 is in the sequence because 10 appears in A062198.
		

Crossrefs

Programs

  • Maple
    alm := proc(n,m) # n-th m-almost prime
        option remember;
        if n =1 then
            2^m ;
        else
            for a from procname(n-1,m)+1 do
                if numtheory[bigomega](a) = m then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    almP := proc(n,m) #n-th partial sum of the m-almost primes
        add(alm(i,m),i=1..n) ;
    end proc:
    isA216686 := proc(n) # is n in the sequence?
        local m ,k,ps;
        m := numtheory[bigomega](n) ;
        for k from 1 do
            ps := almP(k,m) ;
            if ps = n then
                return true;
            elif ps > n then
                return false;
            end  if;
        end do:
    end proc:
    for n from 1 to 4300 do
        if isA216686(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Sep 14 2012
  • PARI
    is_A216686(n)={ my(m=bigomega(n),t); while(n>0, while(bigomega(t++)!=m,); n-=t); !n}  \\ - M. F. Hasler, Sep 23 2012

Extensions

Corrected by R. J. Mathar, Sep 14 2012
Showing 1-6 of 6 results.