Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Dec 09 2024 11:02:33
%S 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,
%T 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,
%U 0,0,0,19,0,18,0,0,0,39,0,0,0,0,0,41,0,0,0
%N First differences of A378249 (next perfect power after prime(n)).
%C This is the next perfect power after prime(n+1), minus the next perfect power after prime(n).
%C Perfect powers (A001597) are 1 and numbers with a proper integer root, complement A007916.
%t perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
%t Table[NestWhile[#+1&,Prime[n],Not@*perpowQ],{n,100}]//Differences
%Y Positions of positives are A377283.
%Y Positions of zeros are A377436.
%Y The restriction to primes has first differences A377468.
%Y A version for nonsquarefree numbers is A377784, differences of A377783.
%Y The opposite is differences of A378035 (restriction of A081676).
%Y First differences of A378249, run-lengths A378251.
%Y Without zeros we have differences of A378250.
%Y A000040 lists the primes, differences A001223.
%Y A001597 lists the perfect powers, differences A053289.
%Y A007916 lists the non perfect powers, differences A375706.
%Y A069623 counts perfect powers <= n.
%Y A076411 counts perfect powers < n.
%Y A377432 counts perfect powers between primes.
%Y A378356 - 1 gives next prime after perfect powers, union A378365 - 1.
%Y Cf. A000015, A007918, A023055, A045542, A052410, A065514, A076412, A188951, A216765, A377431, A377434.
%K nonn
%O 1,2
%A _Gus Wiseman_, Dec 09 2024