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.
%I A194156 #45 Aug 24 2024 09:45:07 %S A194156 13,23,47,113,199,283,467,887,1627,2803,4297,6397,10343,18461,29453, %T A194156 43067,67993,102679,155893,267961,395323,617819,926707,1513751, %U A194156 2160469,3278837,4991687,7115989,11113793,16310629,24417233,33888653,52100569,76020569 %N A194156 Prime number that appears the most often as the n-th prime factor of an integer in a factorization given in ascending order. %C A194156 a(1) = 2 and a(2) = 3. The table in Koninck's book has 5 and 7 tied for third place. %D A194156 J.-M. De Koninck, Those Fascinating Numbers, Amer. Math. Soc., 2009, page 56. %H A194156 Jon E. Schoenfield, <a href="/A194156/a194156.txt">Magma code</a> %F A194156 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 %e A194156 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. %e A194156 a(4) = 13 because in the factorization of a number with four or more prime factors, 13 is likeliest to be fourth. %t A194156 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 *) %o A194156 (Magma) // See link above. %Y A194156 Cf. A096294, A284411. %K A194156 nonn,nice %O A194156 4,1 %A A194156 _Alonso del Arte_, Aug 17 2011 %E A194156 Corrected and extended from a(19) onwards by _Jon E. Schoenfield_, who says (Start): %E A194156 a(13) was given as 2083, but should be 2803 (apparent typo). %E A194156 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)). %E A194156 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)