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 A060846 #22 Oct 04 2024 05:43:46 %S A060846 5,11,11,17,29,29,37,53,67,83,127,127,131,173,251,257,293,347,367,521, %T A060846 541,631,733,853,967,1031,1361,1373,1693,1861,2053,2203,2203,2213, %U A060846 2411,2819,3137,3491,3727,4099,4493,4919,5051,5333,6247,6563,6863,6899,7927 %N A060846 Smallest prime > the n-th nontrivial power of a prime. %H A060846 Amiram Eldar, <a href="/A060846/b060846.txt">Table of n, a(n) for n = 1..10000</a> %F A060846 a(n) = nextprime(A025475(n+1)) = A007918(A025475(n+1)) = Min{p| p>A025475(n+1)}. [corrected by _Michel Marcus_, Aug 24 2019] %e A060846 78125=5^7 is followed by 78137. %t A060846 NextPrime[Select[Range[10^4], !PrimeQ[#] && PrimePowerQ[#] &]] (* _Amiram Eldar_, Oct 04 2024 *) %o A060846 (PARI) ispp(x) = !isprime(x) && isprimepower(x); %o A060846 lista(nn) = apply(x->nextprime(x), select(x->ispp(x), [1..nn])); \\ _Michel Marcus_, Aug 24 2019 %o A060846 (Python) %o A060846 from sympy import primepi, integer_nthroot, nextprime %o A060846 def A060846(n): %o A060846 def bisection(f,kmin=0,kmax=1): %o A060846 while f(kmax) > kmax: kmax <<= 1 %o A060846 while kmax-kmin > 1: %o A060846 kmid = kmax+kmin>>1 %o A060846 if f(kmid) <= kmid: %o A060846 kmax = kmid %o A060846 else: %o A060846 kmin = kmid %o A060846 return kmax %o A060846 def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length()))) %o A060846 return nextprime(bisection(f,n,n)) # _Chai Wah Wu_, Sep 15 2024 %Y A060846 Cf. A025475, A000961, A001597, A001694, A007917, A007918, A013632, A013633, A049711, A060845, A068435, A246547. %K A060846 nonn %O A060846 1,1 %A A060846 _Labos Elemer_, May 03 2001