OFFSET
1,1
COMMENTS
Does this sequence have any terms appearing infinitely often? In particular, are {2, 5, 11, 32, 77} the only zeros? As an example, {121, 122, 123, 124, 125} is an interval containing no primes, corresponding to a(11) = 0. - Gus Wiseman, Dec 02 2024
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000 (first 667 terms from Lei Zhou)
FORMULA
EXAMPLE
The first few prime powers A246547 are 4, 8, 9, 16. The first few primes are 2, 3, 5, 7, 11, 13. We have (4), 5, 7, (8), (9), 11, 13, (16) and so the sequence begins with 2, 0, 2.
The initial terms count the following sets of primes: {5,7}, {}, {11,13}, {17,19,23}, {}, {29,31}, {37,41,43,47}, ... - Gus Wiseman, Dec 02 2024
MATHEMATICA
t = {}; cnt = 0; Do[If[PrimePowerQ[n], If[FactorInteger[n][[1, 2]] == 1, cnt++, AppendTo[t, cnt]; cnt = 0]], {n, 4 + 1, 30000}]; t (* T. D. Noe, May 21 2013 *)
nn = 2^20; Differences@ Map[PrimePi, Select[Union@ Flatten@ Table[a^2*b^3, {b, nn^(1/3)}, {a, Sqrt[nn/b^3]}], PrimePowerQ] ] ] (* Michael De Vlieger, Oct 26 2023 *)
CROSSREFS
For primes between nonsquarefree numbers we have A236575.
For composite instead of prime we have A378456.
A000015 gives the least prime power >= n.
A080101 counts prime powers between primes.
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Mar 07 2002
EXTENSIONS
More terms from David Wasserman, Dec 20 2002
Definition clarified by N. J. A. Sloane, Oct 27 2023
STATUS
approved