A378251 Number of primes between consecutive perfect powers, zeros omitted.
2, 2, 2, 3, 2, 4, 3, 4, 3, 5, 1, 3, 5, 5, 3, 1, 5, 1, 7, 5, 2, 4, 6, 7, 7, 5, 2, 6, 9, 8, 7, 8, 9, 8, 8, 6, 4, 9, 10, 9, 10, 7, 2, 9, 12, 11, 12, 6, 5, 9, 12, 11, 3, 10, 8, 2, 13, 15, 10, 11, 15, 7, 9, 12, 13, 11, 12, 17, 2, 11, 16, 16, 13, 17, 15, 14, 16, 15
Offset: 1
Examples
The first number line below shows the perfect powers. The second shows each prime. To get a(n) we count the primes between consecutive perfect powers, skipping the cases where there are none. -1-----4-------8-9------------16----------------25--27--------32------36---- ===2=3===5===7======11==13======17==19======23==========29==31==========37==
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Maple
N:= 10^6: # to use perfect powers up to N PP:= {1,seq(seq(i^j,j=2..ilog[i](N)),i=2..isqrt(N))}: PP:= sort(convert(PP,list)): M:= map(numtheory:-pi, PP): subs(0=NULL, M[2..-1]-M[1..-2]): # Robert Israel, Jan 23 2025
-
Mathematica
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1; Length/@Split[Table[NestWhile[#+1&,Prime[n],radQ[#]&],{n,100}]]
Comments