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”).

A378456
Number of composite numbers between consecutive nonprime prime powers (exclusive).
4
1, 0, 4, 5, 1, 2, 12, 11, 12, 31, 3, 1, 32, 59, 11, 25, 46, 13, 125, 14, 80, 88, 94, 103, 52, 261, 35, 267, 147, 172, 120, 9, 9, 163, 355, 279, 313, 207, 329, 347, 376, 108, 257, 805, 283, 262, 25, 917, 242, 1081, 702, 365, 752, 389, 251, 535, 1679, 877, 447
OFFSET
1,3
COMMENTS
The inclusive version is a(n) + 2.
Nonprime prime powers (A246547) begin: 4, 8, 9, 16, 25, 27, 32, 49, ...
EXAMPLE
The initial terms count the following composite numbers:
{6}, {}, {10,12,14,15}, {18,20,21,22,24}, {26}, {28,30}, ...
The composite numbers for a(77) = 6 together with their prime indices are the following. We have also shown the nonprime prime powers before and after:
32761: {42,42}
32762: {1,1900}
32763: {2,19,38}
32764: {1,1,1028}
32765: {3,847}
32766: {1,2,14,31}
32767: {4,11,36}
32768: {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
MATHEMATICA
nn=1000;
v=Select[Range[nn], PrimePowerQ[#]&&!PrimeQ[#]&];
Table[Length[Select[Range[v[[i]]+1, v[[i+1]]-1], CompositeQ]], {i, Length[v]-1}]
CROSSREFS
For prime instead of composite we have A067871.
For nonsquarefree numbers we have A378373, for primes A236575.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A002808 lists the composite numbers.
A031218 gives the greatest prime-power <= n.
A046933 counts composite numbers between primes.
A053707 gives first differences of nonprime prime powers.
A080101 = A366833 - 1 counts prime powers between primes.
A246655 lists the prime-powers not including 1, complement A361102.
A345531 gives the nearest prime power after prime(n) + 1, difference A377281.
Cf. A377286, A377287, A377288 (primes A053706).
Sequence in context: A016493 A101626 A378614 * A195853 A070769 A021693
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Nov 30 2024
STATUS
approved