A378367 Greatest non prime power <= n, allowing 1.
1, 1, 1, 1, 1, 6, 6, 6, 6, 10, 10, 12, 12, 14, 15, 15, 15, 18, 18, 20, 21, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 30, 33, 34, 35, 36, 36, 38, 39, 40, 40, 42, 42, 44, 45, 46, 46, 48, 48, 50, 51, 52, 52, 54, 55, 56, 57, 58, 58, 60, 60, 62, 63, 63, 65, 66, 66
Offset: 1
Examples
The greatest non prime power <= 7 is 6, so a(7) = 6.
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).
Cf. A007916, A065514, A113646, A345531 (A377281), A377051, A377054, A377282, A377468 (A074984), A378358, A378457.
Cf. A356068.
Programs
-
Mathematica
Table[NestWhile[#-1&,n,PrimePowerQ[#]&],{n,100}]
Formula
a(n) = n - A378366(n).
Comments