login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

n-th prime appears n-th composite number times.
2

%I #15 Mar 01 2023 15:01:19

%S 2,2,2,2,3,3,3,3,3,3,5,5,5,5,5,5,5,5,7,7,7,7,7,7,7,7,7,11,11,11,11,11,

%T 11,11,11,11,11,13,13,13,13,13,13,13,13,13,13,13,13,17,17,17,17,17,17,

%U 17,17,17,17,17,17,17,17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19

%N n-th prime appears n-th composite number times.

%D T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.

%H Harvey P. Dale, <a href="/A111656/b111656.txt">Table of n, a(n) for n = 1..1000</a>

%H L. Panaitopol, <a href="http://emis.icm.edu.pl/journals/JIPAM/v2n3/027_01.html">Some Properties of the Series of Composed Numbers</a>, J. Inequalities in Pure and Applied Mathematics. 2(2): Article 38, 2000.

%H J. B. Rosser and L. Schoenfeld, <a href="https://doi.org/10.1215/ijm/1255631807">Approximate formulas for some functions of prime numbers</a>, Illinois J. Math. 6: 64-94 (1962).

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

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

%F A000040(n) appears A002808(n) times.

%t Module[{nn=20,cm,pr,len},cm=Select[Range[nn],CompositeQ];len = Length[ cm];Table[#[[1]],#[[2]]]&/@Thread[{Prime[Range[len]],cm}]]//Flatten (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 06 2018 *)

%Y Cf. A000040, A002808, A111653, A111654, A111655, A111657.

%K easy,nonn

%O 1,1

%A _Jonathan Vos Post_, Aug 12 2005