OFFSET
1,6
COMMENTS
FORMULA
a(n) = n - A378366(n).
EXAMPLE
The greatest non prime power <= 7 is 6, so a(7) = 6.
MATHEMATICA
Table[NestWhile[#-1&, n, PrimePowerQ[#]&], {n, 100}]
CROSSREFS
Sequences obtained by subtracting each term from n are placed in parentheses below.
For squarefree we have A070321.
For nonsquarefree we have A378033.
For non perfect power we have A378363.
Subtracting from n gives (A378366).
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Nov 29 2024
STATUS
approved