A379541 Prime numbers such that the next greatest prime power is also prime.
2, 5, 11, 17, 19, 29, 37, 41, 43, 53, 59, 67, 71, 73, 83, 89, 97, 101, 103, 107, 109, 131, 137, 139, 149, 151, 157, 163, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 257, 263, 269, 271, 277, 281, 293, 307, 311, 313, 317, 331, 347, 349, 353
Offset: 1
Keywords
Examples
After 13 the next prime power is 16, which is not prime, so 13 is not in the sequence. After 19 the next prime power is 23, which is prime, so 19 is in the sequence.
Crossrefs
Programs
-
Mathematica
nextpripow[n_]:=NestWhile[#1+1&,n+1,!PrimePowerQ[#1]&]; Select[Range[100],PrimeQ[#]&&PrimeQ[nextpripow[#]]&]