%I #10 Oct 16 2023 09:30:36
%S 2,3,5,149,10771,16575407,39516855101743,60095055821549024117399447,
%T 96668175211190122501174866643973679330023904660323
%N Lexicographically earliest sequence of distinct primes such that the sequence of ratios (number of divisors of n that are coprime to these primes)/(number of divisors of n) has an asymptotic mean 1/2.
%C The sequence of the number of divisors of n that are coprime to these primes is A366643.
%C Equivalently, a(n) is the lexicographically earliest sequence of distinct primes such that Product_{n>=1} (a(n)-1) * log(a(n)/(a(n)-1)) = 1/2.
%C The next term has 99 digits and is too large to be included in the data section.
%H Amiram Eldar, <a href="/A366642/b366642.txt">Table of n, a(n) for n = 1..13</a>
%e The asymptotic mean of (number of divisors of n that are coprime to 2)/A000005(n) = A001227(n)/A000005(n) is log(2) = 0.693... > 1/2. Therefore a(1) = 2.
%e The asymptotic mean of (number of divisors of n that are coprime to 2 and 3)/A000005(n) = A035218(n)/A000005(n) is 2*log(3/2)*log(2) = 0.562... > 1/2. Therefore a(2) = 3.
%e The asymptotic mean of (number of divisors of n that are coprime to 2, 3 and 5)/A000005(n) is 8*log(5/4)*log(3/2)*log(2) = 0.501... > 1/2. Therefore a(3) = 5.
%e The asymptotic mean of (number of divisors of n that are coprime to 2, 3, 5 and 7)/A000005(n) is 48*log(7/6)*log(5/4)*log(3/2)*log(2) = 0.464... < 1/2. Therefore a(4) is not 7.
%e The asymptotic mean of (number of divisors of n that are coprime to 2, 3, 5 and 149)/A000005(n) is 1184*log(149/148)*log(5/4)*log(3/2)*log(2) = 0.50002... > 1/2, and 149 is the least prime with this property. Therefore a(4) = 149.
%t g[x_] := -(x-1)*Log[1-1/x]; seq[len_] := Module[{s = {}, r = 1/2, p = 1}, Do[p = NextPrime[InverseFunction[g][r]]; AppendTo[s, p]; r /= g[p], {len}]; s]; seq[7]
%Y Cf. A000005, A001227, A035218, A366643.
%K nonn
%O 1,1
%A _Amiram Eldar_, Oct 15 2023