login
Semiprimes (or biprimes): products of two primes.
(Formerly M3274 N1323)
1738

%I M3274 N1323 #240 Sep 11 2024 05:43:58

%S 4,6,9,10,14,15,21,22,25,26,33,34,35,38,39,46,49,51,55,57,58,62,65,69,

%T 74,77,82,85,86,87,91,93,94,95,106,111,115,118,119,121,122,123,129,

%U 133,134,141,142,143,145,146,155,158,159,161,166,169,177,178,183,185,187

%N Semiprimes (or biprimes): products of two primes.

%C Numbers of the form p*q where p and q are primes, not necessarily distinct.

%C These numbers are sometimes called semi-primes or 2-almost primes.

%C Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.

%C Complement of A100959; A064911(a(n)) = 1. - _Reinhard Zumkeller_, Nov 22 2004

%C 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.

%C For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.

%C Numbers that are divisible by exactly 2 prime powers (not including 1). - _Jason Kimberley_, Oct 02 2011

%C The (disjoint) union of A006881 and A001248. - _Jason Kimberley_, Nov 11 2015

%C 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

%C 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

%C For all n except n = 2, a(n) is a deficient number. - _Amrit Awasthi_, Sep 10 2024

%D Archimedeans Problems Drive, Eureka, 17 (1954), 8.

%D Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.

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

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H N. J. A. Sloane, <a href="/A001358/b001358.txt">Table of n, a(n) for n = 1..20000</a> (first 10000 terms from T. D. Noe)

%H Daniel A. Goldston, Sidney W. Graham, János Pintz and Cem Y. Yildirim, <a href="https://www.jstor.org/stable/40302739">Small gaps between primes or almost primes</a>, Transactions of the American Mathematical Society, Vol. 361, No. 10 (2009), pp. 5285-5330, <a href="https://arxiv.org/abs/math/0506067">arXiv preprint</a>, arXiv:math/0506067 [math.NT], 2005.

%H Richard K. Guy, <a href="/A002186/a002186.pdf">Letters to N. J. A. Sloane, June-August 1968</a>

%H Sh. T. Ishmukhametov and F. F. Sharifullina, <a href="http://kpfu.ru/portal/docs/F1021095055/e05_08.pdf">On distribution of semiprime numbers</a>, Izvestiya Vysshikh Uchebnykh Zavedenii. Matematika, 2014, No. 8, pp. 53-59. <a href="https://doi.org/10.3103/S1066369X14080052">English translation</a>, Russian Mathematics, Vol. 58, No. 8 (2014), pp. 43-48, <a href="https://www.researchgate.net/publication/272041598_On_distribution_of_semiprime_numbers">alternative link</a>.

%H Donovan Johnson, Jonathan Vos Post, and Robert G. Wilson v, <a href="/A001358/a001358_1.txt">Selected n and a(n)</a>. (2.5 MB)

%H Dixon Jones, <a href="http://www.jstor.org/stable/2689283">Quickie 593</a>, Mathematics Magazine, Vol. 47, No. 3, May 1974, p. 167.

%H Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, <a href="http://name.umdl.umich.edu/ABV2766.0001.001">vol. 1</a> and <a href="http://name.umdl.umich.edu/ABV2766.0002.001">vol. 2</a>, Leipzig, Berlin, B. G. Teubner, 1909. See Vol. 1, p. 211.

%H Xianmeng Meng, <a href="http://dx.doi.org/10.1016/j.jnt.2005.04.013">On sums of three integers with a fixed number of prime factors</a>, Journal of Number Theory, Vol. 114, No. 1 (2005), pp. 37-65.

%H Michael Penn, <a href="https://www.youtube.com/watch?v=EzdZd05StY4">What makes a number "good"?</a>, YouTube video, 2022.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Semiprime.html">Semiprime</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AlmostPrime.html">Almost Prime</a>.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Almost_prime">Almost prime</a>.

%H Robert G. Wilson v, <a href="/A001358/a001358.txt">Subsequences at various powers of 10.</a>

%H <a href="/index/Su#ssq">Index to sequences related to sums of cubes</a>

%H <a href="/index/Cor#core">Index entries for "core" sequences</a>

%F a(n) ~ n*log(n)/log(log(n)) as n -> infinity [Landau, p. 211], [Ayoub].

%F 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

%F A174956(a(n)) = n. - _Reinhard Zumkeller_, Apr 03 2010

%F a(n) = A088707(n) - 1. - _Reinhard Zumkeller_, Feb 20 2012

%F 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

%F 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

%F 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

%F a(n) = A078840(2,n). - _R. J. Mathar_, Jan 30 2019

%F A100484 UNION A046315. - _R. J. Mathar_, Apr 19 2023

%e From _Gus Wiseman_, May 27 2021: (Start)

%e The sequence of terms together with their prime factors begins:

%e 4 = 2*2 46 = 2*23 91 = 7*13 141 = 3*47

%e 6 = 2*3 49 = 7*7 93 = 3*31 142 = 2*71

%e 9 = 3*3 51 = 3*17 94 = 2*47 143 = 11*13

%e 10 = 2*5 55 = 5*11 95 = 5*19 145 = 5*29

%e 14 = 2*7 57 = 3*19 106 = 2*53 146 = 2*73

%e 15 = 3*5 58 = 2*29 111 = 3*37 155 = 5*31

%e 21 = 3*7 62 = 2*31 115 = 5*23 158 = 2*79

%e 22 = 2*11 65 = 5*13 118 = 2*59 159 = 3*53

%e 25 = 5*5 69 = 3*23 119 = 7*17 161 = 7*23

%e 26 = 2*13 74 = 2*37 121 = 11*11 166 = 2*83

%e 33 = 3*11 77 = 7*11 122 = 2*61 169 = 13*13

%e 34 = 2*17 82 = 2*41 123 = 3*41 177 = 3*59

%e 35 = 5*7 85 = 5*17 129 = 3*43 178 = 2*89

%e 38 = 2*19 86 = 2*43 133 = 7*19 183 = 3*61

%e 39 = 3*13 87 = 3*29 134 = 2*67 185 = 5*37

%e (End)

%p 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:

%p seq(A001358(n), n=1..120) ; # _R. J. Mathar_, Aug 12 2010

%t Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* _Zak Seidov_, Jun 14 2005 *)

%t Select[Range[200], PrimeOmega[#]==2&] (* _Harvey P. Dale_, Jul 17 2011 *)

%o (PARI) select( isA001358(n)={bigomega(n)==2}, [1..199]) \\ _M. F. Hasler_, Apr 09 2008; added select() Apr 24 2019

%o (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

%o (PARI) A1358=List(4); A001358(n)={while(#A1358<n, my(t=A1358[#A1358]); until(bigomega(t++)==2,); listput(A1358,t)); A1358[n]} \\ _M. F. Hasler_, Apr 24 2019

%o (Haskell)

%o a001358 n = a001358_list !! (n-1)

%o a001358_list = filter ((== 2) . a001222) [1..]

%o (Magma) [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // _Bruno Berselli_, Sep 09 2015

%o (Python)

%o from sympy import factorint

%o def ok(n): return sum(factorint(n).values()) == 2

%o print([k for k in range(1, 190) if ok(k)]) # _Michael S. Branicky_, Apr 30 2022

%o (Python)

%o from math import isqrt

%o from sympy import primepi, prime

%o def A001358(n):

%o def f(x): return int(n+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))

%o m, k = n, f(n)

%o while m != k:

%o m, k = k, f(k)

%o return m # _Chai Wah Wu_, Jul 23 2024

%Y Cf. A064911 (characteristic function).

%Y Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).

%Y Cf. A077554, A077555, A002024, A072966, A100592, A014673, A068318, A061299, A087718, A089994, A089995, A096916, A096932, A106550, A106554, A108541, A108542, A126663, A131284, A138510, A138511, A072931, A088183, A171963, A237040 (semiprimes of form n^3 + 1).

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

%Y These are the Heinz numbers of length-2 partitions, counted by A004526.

%Y The squarefree case is A006881 with odd/even terms A046388/A100484 (except 4).

%Y Including primes gives A037143.

%Y The odd/even terms are A046315/A100484.

%Y Partial sums are A062198.

%Y The prime factors are A084126/A084127.

%Y Grouping by greater factor gives A087112.

%Y The product/sum/difference of prime indices is A087794/A176504/A176506.

%Y Positions of even/odd terms are A115392/A289182.

%Y The terms with relatively prime/divisible prime indices are A300912/A318990.

%Y Factorizations using these terms are counted by A320655.

%Y The prime indices are A338898/A338912/A338913.

%Y Grouping by weight (sum of prime indices) gives A338904, with row sums A024697.

%Y The terms with even/odd weight are A338906/A338907.

%Y The terms with odd/even prime indices are A338910/A338911.

%Y The least/greatest term of weight n is A339114/A339115.

%Y Cf. A014342, A098350, A112141, A320732, A332765, A339003/A339004, A339116.

%K nonn,easy,nice,core

%O 1,1

%A _N. J. A. Sloane_, _R. K. Guy_

%E More terms from _James A. Sellers_, Aug 22 2000