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

A378617
First differences of A378249 (next perfect power after prime(n)).
0
0, 4, 0, 8, 0, 9, 0, 0, 7, 0, 17, 0, 0, 0, 15, 0, 0, 17, 0, 0, 0, 19, 0, 0, 21, 0, 0, 0, 0, 7, 16, 0, 0, 25, 0, 0, 0, 0, 27, 0, 0, 0, 0, 20, 0, 0, 9, 18, 0, 0, 0, 0, 13, 33, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 19, 0, 18, 0, 0, 0, 39, 0, 0, 0, 0, 0, 41, 0, 0, 0
OFFSET
1,2
COMMENTS
This is the next perfect power after prime(n+1), minus the next perfect power after prime(n).
Perfect powers (A001597) are 1 and numbers with a proper integer root, complement A007916.
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Table[NestWhile[#+1&, Prime[n], Not@*perpowQ], {n, 100}]//Differences
CROSSREFS
Positions of positives are A377283.
Positions of zeros are A377436.
The restriction to primes has first differences A377468.
A version for nonsquarefree numbers is A377784, differences of A377783.
The opposite is differences of A378035 (restriction of A081676).
First differences of A378249, run-lengths A378251.
Without zeros we have differences of A378250.
A000040 lists the primes, differences A001223.
A001597 lists the perfect powers, differences A053289.
A007916 lists the non perfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A377432 counts perfect powers between primes.
A378356 - 1 gives next prime after perfect powers, union A378365 - 1.
Sequence in context: A076261 A070802 A114401 * A304440 A073467 A288096
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Dec 09 2024
STATUS
approved