OFFSET
1,2
COMMENTS
This is a permutation of the cubefree numbers (A004709).
LINKS
Peter Kagey, Table of n, a(n) for n = 1..10000
FORMULA
Sum_{k=1..n} a(k) ~ c * zeta(3)^3 * n^3 / 3, where c = Product_{p prime} (1 - 1/p^2 + 1/p^5 - 1/p^6) = 0.36052971192705404983... . - Amiram Eldar, Feb 20 2024
EXAMPLE
a(8) = 3 because 3 * A004709(8) = 3 * 9 = 3^3.
a(16) = 12 because A004709(16) = 18 = 2^1 * 3^2. The least k such that k * 2^1 * 3^2 is a cube is 2^(3 - (1 mod 3)) * 3^(3 - (2 mod 3)) = 12. - David A. Corneth, Nov 01 2016
MAPLE
f:= proc(n) local F, E;
F:= ifactors(n)[2];
E:= F[.., 2];
if max(E) >= 3 then return NULL fi;
mul(F[i, 1]^(3-E[i]), i=1..nops(F));
end proc:
map(f, [$1..1000]); # Robert Israel, Nov 09 2016
MATHEMATICA
Table[k = 1; While[! IntegerQ[(k #)^(1/3)], k++] &@ #[[n]]; k, {n, 53}] &@ Select[Range[10^4], FreeQ[FactorInteger@ #, {_, k_ /; k > 2}] &] (* Michael De Vlieger, Nov 01 2016, after Jan Mangaldan at A004709 *)
f[p_, e_] := If[e > 2, 0, p^(Mod[-e, 3])]; s[n_] := Times @@ f @@@ FactorInteger[n]; Select[Array[s, 100], # > 0 &] (* Amiram Eldar, Feb 20 2024 *)
PROG
(PARI) \\ A list of about n terms (a little more probably).
lista(n) = {n = ceil(1.21*n); my(l=List([1]), f); forprime(p=2, n, for(i=1, #l, if(l[i] * p<=n, listput(l, l[i]*p); if(l[i]*p^2<=n, listput(l, l[i]*p^2))))); listsort(l); for(i=2, #l, f=factor(l[i]); f[, 2] = vector(#f[, 2], i, 3-(f[i, 2] % 3))~; l[i] = factorback(f)); l} \\ David A. Corneth, Nov 01 2016
(Python)
from math import prod
from sympy import mobius, factorint, integer_nthroot
def A277802(n):
def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x, 3)[0]+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return prod(p**(-e%3) for p, e in factorint(m).items()) # Chai Wah Wu, Aug 05 2024
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Peter Kagey, Oct 31 2016
STATUS
approved