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

A377703
First differences of the sequence A345531(k) = least prime-power greater than the k-th prime.
16
1, 3, 1, 5, 3, 3, 4, 2, 6, 1, 9, 2, 4, 2, 10, 2, 3, 7, 2, 6, 2, 8, 8, 4, 2, 4, 2, 4, 8, 7, 9, 2, 10, 2, 6, 6, 4, 2, 10, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 2, 13, 7, 6, 2, 6, 4, 2, 6, 18, 4, 2, 4, 14, 6, 6, 6, 4, 6, 2, 12, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6
OFFSET
1,2
COMMENTS
What is the union of this sequence? In particular, does it contain 17?
MATHEMATICA
Differences[Table[NestWhile[#+1&, Prime[n]+1, !PrimePowerQ[#]&], {n, 100}]]
PROG
(Python)
from sympy import factorint, prime, nextprime
def A377703(n): return -next(filter(lambda m:len(factorint(m))<=1, count((p:=prime(n))+1)))+next(filter(lambda m:len(factorint(m))<=1, count(nextprime(p)+1))) # Chai Wah Wu, Nov 14 2024
CROSSREFS
First differences of A345531.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A080101 counts prime-powers between primes (exclusive).
A246655 lists the prime-powers, differences A057820 without first term.
A361102 lists the non-powers of primes, differences A375708.
A366833 counts prime-powers between primes, see A053607, A304521, A377057 (positive), A377286 (zero), A377287 (one), A377288 (two).
A377432 counts perfect-powers between primes, see A377434 (one), A377436 (zero), A377466 (multiple).
Sequence in context: A092131 A092099 A096567 * A239626 A076363 A143865
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 07 2024
STATUS
approved