(Translated by https://www.hiragana.jp/)
A069585 - OEIS
login
A069585
a(n) = n - largest prime power <= n.
1
0, 1, 2, 0, 1, 2, 3, 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0
OFFSET
1,3
COMMENTS
This sequence considers "prime powers" to be A025475 rather than A000961.
a(8)=a(9)=0. With Mihăilescu's proof of Catalan's conjecture (see A001597) there can be no further occurrence of consecutive zeros. - Robert Munafo, May 10 2024
LINKS
FORMULA
a(n) = n - A167185(n). - Michel Marcus, May 10 2024
MATHEMATICA
nn = 10^4; s = {1}~Join~Select[Union@ Flatten@ Table[a^2*b^3, {b, Surd[nn, 3]}, {a, Sqrt[nn/b^3]}], PrimePowerQ]; Table[n - TakeWhile[s, # <= n &][[-1]], {n, nn}] (* Michael De Vlieger, May 11 2024 *)
CROSSREFS
Sequence in context: A127711 A336937 A069584 * A199238 A346698 A352515
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Mar 24 2002
EXTENSIONS
Revised by Robert Munafo and Sean A. Irvine, May 10 2024
STATUS
approved