A379155 Numbers k such that there is a unique prime between the k-th and (k+1)-th prime powers (A246655).
2, 3, 5, 7, 9, 10, 13, 15, 17, 18, 22, 23, 26, 27, 31, 32, 40, 42, 43, 44, 52, 53, 67, 68, 69, 70, 77, 78, 85, 86, 90, 91, 116, 117, 119, 120, 135, 136, 151, 152, 169, 170, 186, 187, 197, 198, 243, 244, 246, 247, 291, 292, 312, 313, 339, 340, 358, 360, 362
Offset: 1
Keywords
Examples
The 4th and 5th prime powers are 5 and 7, with interval (5,6,7) containing two primes, so 4 is not in the sequence. The 13th and 14th prime powers are 23 and 25, with interval (23,24,25) containing only one prime, so 13 is in the sequence. The 18th and 19th prime powers are 32 and 37, with interval (32,33,34,35,36,37) containing just one prime 37, so 18 is in the sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..2112
Crossrefs
Programs
-
Maple
N:= 1000: # for terms k where A246655(k+1) <+ N P:= select(isprime,[2,seq(i,i=3..N,2)]): S:= convert(P,set): for p in P while p^2 <= N do S:= S union {seq(p^j,j=2..ilog[p](N))} od: PP:= sort(convert(S,list)): state:= 1: Res:= NULL: ip:= 2: for i from 2 to nops(PP) do if PP[i] = P[ip] then if state = 0 then Res:= Res,i-1 fi; state:= 1; ip:= ip+1; else if state = 1 then Res:= Res,i-1 fi; state:= 0; fi od: Res; # Robert Israel, Jan 22 2025
-
Mathematica
v=Select[Range[100],PrimePowerQ]; Select[Range[Length[v]-1],Length[Select[Range[v[[#]],v[[#+1]]],PrimeQ]]==1&]
Comments