This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A378457 #9 Dec 02 2024 18:11:16 %S A378457 0,0,0,0,0,1,0,0,0,1,0,1,0,1,2,0,0,1,0,1,2,3,0,1,0,1,0,1,0,1,0,0,1,2, %T A378457 3,4,0,1,2,3,0,1,0,1,2,3,0,1,0,1,2,3,0,1,2,3,4,5,0,1,0,1,2,0,1,2,0,1, %U A378457 2,3,0,1,0,1,2,3,4,5,0,1,0,1,0,1,2,3,4 %N A378457 Difference between n and the greatest prime power <= n, allowing 1. %C A378457 Prime powers allowing 1 are listed by A000961. %F A378457 a(n) = n - A031218(n). %F A378457 a(n) = A276781(n) - 1. %e A378457 The greatest prime power <= 6 is 5, so a(6) = 1. %t A378457 Table[n-NestWhile[#-1&,n,#>1&&!PrimePowerQ[#]&],{n,100}] %Y A378457 Sequences obtained by subtracting each term from n are placed in parentheses below. %Y A378457 For nonprime we have A010051 (almost) (A179278). %Y A378457 Subtracting from n gives (A031218). %Y A378457 For prime we have A064722 (A007917). %Y A378457 For perfect power we have A069584 (A081676). %Y A378457 For squarefree we have (A070321). %Y A378457 Adding one gives A276781. %Y A378457 For nonsquarefree we have (A378033). %Y A378457 For non perfect power we have (A378363). %Y A378457 For non prime power we have A378366 (A378367). %Y A378457 The opposite is A378370 = A377282-1. %Y A378457 A000015 gives the least prime power >= n. %Y A378457 A000040 lists the primes, differences A001223. %Y A378457 A000961 and A246655 list the prime powers, differences A057820. %Y A378457 A024619 and A361102 list the non prime powers, differences A375708 and A375735. %Y A378457 A151800 gives the least prime > n, weak version A007918. %Y A378457 Prime powers between primes: A053607, A080101, A304521, A366833, A377057. %Y A378457 Cf. A001597, A007920, A013632, A065514, A074984, A377051, A377054, A377281, A377289, A377468, A378357, A378371. %K A378457 nonn %O A378457 1,15 %A A378457 _Gus Wiseman_, Nov 29 2024