A068435 Consecutive prime powers without a prime between them.
8, 9, 25, 27, 121, 125, 2187, 2197, 32761, 32768
Offset: 1
Examples
8 = 2^3, 9 = 3^2, there is no prime between 8 and 9. 25 = 5^2, 27 = 3^3, there is no prime between 25 and 27.
Links
- David A. Corneth, PARI program to search for pairs where not both numbers are squares of primes
- Wikipedia, Legendre's conjecture
Crossrefs
Programs
-
Mathematica
With[{upto=33000},Select[Partition[Select[Range[upto],PrimePowerQ],2,1],NoneTrue[#,PrimeQ]&]] (* Paolo Xausa, Oct 29 2023 *)
-
PARI
ispp(x) = !isprime(x) && isprimepower(x); lista(nn=50000) = {my(prec = 0); for (i=1, nn, if (ispp(i), if (! prec, prec = i, if (primepi(i) == primepi(prec), print1(prec, ", ", i, ", ")); prec = i;);););} \\ Michel Marcus, Aug 24 2019
Comments