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”).
%I #11 Nov 30 2024 23:44:52
%S 0,0,0,0,0,1,0,0,0,1,0,1,0,2,1,0,0,1,0,3,2,1,0,1,0,1,0,1,0,1,0,0,4,3,
%T 2,1,0,3,2,1,0,1,0,3,2,1,0,1,0,3,2,1,0,5,4,3,2,1,0,1,0,2,1,0,2,1,0,3,
%U 2,1,0,1,0,5,4,3,2,1,0,1,0,1,0,5,4,3,2
%N Distance between n and the least prime power >= n, allowing 1.
%C Prime powers allowing 1 are listed by A000961.
%F a(n) = A000015(n) - n.
%F a(n) = A377282(n - 1) - 1 for n > 1.
%t Table[NestWhile[#+1&,n,#>1&&!PrimePowerQ[#]&]-n,{n,100}]
%Y Sequences obtained by adding n to each term are placed in parentheses below.
%Y For prime instead of prime power we have A007920 (A007918), strict A013632.
%Y For perfect power we have A074984 (A377468), opposite A069584 (A081676).
%Y For squarefree we have A081221 (A067535).
%Y The restriction to the prime numbers is A377281 (A345531).
%Y The strict version is A377282 = a(n) + 1.
%Y For non prime power instead of prime power we have A378371 (A378372).
%Y The opposite version is A378457, strict A276781.
%Y A000015 gives the least prime power >= n, opposite A031218.
%Y A000040 lists the primes, differences A001223.
%Y A000961 and A246655 list the prime powers, differences A057820.
%Y A024619 and A361102 list the non prime powers, differences A375708 and A375735.
%Y A151800 gives the least prime > n.
%Y Prime-powers between primes: A053607, A080101, A304521, A366833, A377057.
%Y Cf. A001597, A053707, A065514, A065890, A343249, A376596, A376597, A377051, A377054, A377289, A377781.
%K nonn,new
%O 1,14
%A _Gus Wiseman_, Nov 27 2024