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 A334393 #33 Aug 13 2024 11:21:22 %S A334393 1,2,3,4,5,7,8,9,11,13,17,19,23,25,27,29,31,32,37,41,43,47,49,53,59, %T A334393 61,67,71,73,79,83,89,97,101,103,107,109,113,121,125,127,128,131,137, %U A334393 139,149,151,157,163,167,169,173,179,181,191,193,197,199,211,223,227,229,233,239,241,243,251 %N A334393 Numbers of the form p^q where p and q are either 1 or prime. %C A334393 First differs from A115975 at a(42). - _Omar E. Pol_, Apr 26 2020 %H A334393 Amiram Eldar, <a href="/A334393/b334393.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..218 from Kevin Foote) %t A334393 Select[Range[250], Length[(f = FactorInteger[#])] == 1 && ((e = f[[1, 2]]) == 1 || PrimeQ[e]) &] (* _Amiram Eldar_, Apr 27 2020 *) %o A334393 (PARI) isok(n) = if (n==1, return (1)); my(k=isprimepower(n)); (k==1) || isprime(k); \\ _Michel Marcus_, Apr 27 2020 %o A334393 (Python) %o A334393 from sympy import primepi, integer_nthroot, primerange %o A334393 def A334393(n): %o A334393 def f(x): return int(n-1+x-primepi(x)-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length()))) %o A334393 m, k = n, f(n) %o A334393 while m != k: %o A334393 m, k = k, f(k) %o A334393 return m # _Chai Wah Wu_, Aug 13 2024 %Y A334393 Union of A008578 and A053810. %Y A334393 Cf. A115975. %K A334393 nonn %O A334393 1,2 %A A334393 _Kevin Foote_, Apr 26 2020