login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A378251
Number of primes between consecutive perfect powers, zeros omitted.
3
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,1
COMMENTS
First differences of A377283 and A378365. Run-lengths of A378035 and A378249.
Perfect powers (A001597) are 1 and numbers with a proper integer root, complement A007916.
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
Same as A080769 with 0's removed (which were at positions A274605).
First differences of A377283 and A378365 (union of A378356).
Run-lengths of A378035 (union A378253) and A378249 (union A378250).
The version for nonprime prime powers is A378373, with zeros A067871.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289, run-lengths of A377468.
A007916 lists the non-perfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A131605 lists perfect powers that are not prime powers.
A377432 counts perfect powers between primes, see A377434, A377436, A377466.
Sequence in context: A364421 A352631 A134446 * A125749 A014085 A248891
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Nov 23 2024
STATUS
approved