login
A378358
Least non-perfect-power >= n.
0
2, 2, 3, 5, 5, 6, 7, 10, 10, 10, 11, 12, 13, 14, 15, 17, 17, 18, 19, 20, 21, 22, 23, 24, 26, 26, 28, 28, 29, 30, 31, 33, 33, 34, 35, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 65, 66, 67
OFFSET
1,1
COMMENTS
Perfect-powers (A001597) are 1 and numbers with a proper integer root, complement A007916.
FORMULA
a(n) = n - A3783587(n).
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Table[NestWhile[#+1&, n, perpowQ[#]&], {n, 100}]
CROSSREFS
The version for prime-powers is A000015, for non-prime-powers A378372.
The union is A007916, complement A001597.
The version for nonsquarefree numbers is A067535, negative A120327 (subtract A378369).
The version for composite numbers is A113646.
The version for prime numbers is A159477.
The run-lengths are A375706.
Terms appearing only once are A375738, multiple times A375703.
The version for perfect-powers is A377468.
Subtracting n gives A378357.
The opposite version is A378363, for perfect-powers A081676.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289.
A007916 lists the non-perfect-powers, differences A375706.
A069623 counts perfect-powers <= n.
A076411 counts perfect-powers < n.
A131605 lists perfect-powers that are not prime-powers.
A377432 counts perfect-powers between primes, zeros A377436.
Sequence in context: A319476 A140200 A289199 * A029039 A316185 A131429
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Nov 24 2024
STATUS
approved