OFFSET
4,1
COMMENTS
a(1) = 2 and a(2) = 3. The table in Koninck's book has 5 and 7 tied for third place.
REFERENCES
J.-M. De Koninck, Those Fascinating Numbers, Amer. Math. Soc., 2009, page 56.
LINKS
Jon E. Schoenfield, Magma code
FORMULA
a(n) = prime(k) k >= n, such that A096294(k-1, n-1)/A002110(k) >= A096294(i-1, n-1)/A002110(i) for i >= n, i <> k. - Peter Munn, Jul 31 2019
EXAMPLE
a(1) = 2 because, since a randomly chosen number has a 50% chance of being even, the first prime in the factorization of an integer is most likely to be 2.
a(4) = 13 because in the factorization of a number with four or more prime factors, 13 is likeliest to be fourth.
MATHEMATICA
a[n_] := a[n] = (ClearAll[ CurrPrimes, t]; d = 1.0; For[i = 1, i <= n, i++, CurrPrimes[i] = Prime[i]; d = d*CurrPrimes[i]; t[i] = 1.0]; Freq = t[n]/d; k = n; FreqMax1 = Freq; kAtFreqMax1 = k; While[ k <= kAtFreqMax1*2 , k = k+1; t[1] = t[1]*(CurrPrimes[1] - 1); CurrPrimes[1] = CurrPrimes[2]; For[i = 2, i <= n, i++, t[i] = t[i]*(CurrPrimes[i] - 1) + t[i-1]; CurrPrimes[i-1] = CurrPrimes[i]]; CurrPrimes[n] = NextPrime[ CurrPrimes[n-1]]; d = d*CurrPrimes[n]; Freq = t[n]/d; If[ Freq > FreqMax1 , FreqMax1 = Freq; kAtFreqMax1 = k]; If[ Mod[k, 100] == 0 || (CurrPrimes[n] == 16111) , k, CurrPrimes[n], Freq]; (*end while*)]; Prime[kAtFreqMax1] ); A194156 = Table[ Print["a(", n, ") = ", a[n]]; a[n], {n, 4, 30}] (* Jean-François Alcover, Dec 14 2011, translated from Jon E. Schoenfield's Magma code *)
PROG
(Magma) // See link above.
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Alonso del Arte, Aug 17 2011
EXTENSIONS
Corrected and extended from a(19) onwards by Jon E. Schoenfield, who says (Start):
a(13) was given as 2083, but should be 2803 (apparent typo).
a(17) was given as 16111, which is the most-frequently-appearing 17th prime factor among any primes *up to that point*, as well as for a considerable distance beyond it ... but (after a significant gap) there are larger primes that appear as the 17th prime factor with a slightly higher frequency; beyond 16111, new record highs occur at 18257, 18311, 18313, 18457, and 18461 (the last of which is the correct value for a(17)).
a(18) was given as 24251, but a similar situation applies there; it's the most-frequently-appearing 18th prime factor among any primes up to that point, but it's beaten out by 27109, which is the best until 29443, which is the best until 29453 (which is the correct value for a(18)). (End)
STATUS
approved