OFFSET
1,1
COMMENTS
EXAMPLE
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==
MATHEMATICA
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
Length/@Split[Table[NestWhile[#+1&, Prime[n], radQ[#]&], {n, 100}]]
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Nov 23 2024
STATUS
approved