A373643 Number of k between consecutive primes such that k is neither squarefree nor prime powers.
0, 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 0, 2, 3, 2, 1, 1, 1, 1, 2, 1, 2, 3, 3, 0, 1, 1, 1, 5, 0, 3, 0, 4, 1, 3, 2, 1, 3, 2, 1, 3, 1, 1, 1, 4, 3, 2, 1, 1, 2, 1, 5, 1, 2, 2, 1, 3, 2, 0, 3, 6, 1, 1, 2, 4, 3, 4, 1, 3, 1, 3, 3, 3, 1, 3, 2, 1, 3, 3, 1, 4, 1, 1, 2, 2, 3
Offset: 1
Examples
Let S = A126706, the sequence of k neither squarefree nor prime powers. a(1..4) = 0 since S(1) = 12. a(5) = 1 since (11, 12, 13) contains S(1) = 12. a(6) = 0 since (13, 14, 15, 16, 17) contains no number in S. a(7) = 1 since (17, 18, 19) contains S(2) = 18. a(8) = 1 since (19, 20, 21, 22, 23) contains S(3) = 20. a(9) = 2 since (23, 24, 25, 26, 27, 28, 29) contains S(4) = 24 and S(5) = 28, etc.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[Count[Range[Prime[i] + 1, Prime[i + 1] - 1], _?(Nor[SquareFreeQ[#], PrimePowerQ[#]] &)], {i, 120}]