OFFSET
1,2
COMMENTS
Equivalently, a(n) is the least divisor d of n such that n/d is a cubefull number (A036966).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 1 if and only if n is a cubefull number (A036966).
a(n) = n if and only if n is a cubefree number (A004709).
a(n) = n/A360540(n).
Multiplicative with a(p^e) = p^e if e <= 2, and 1 otherwise.
Dirichlet g.f.: zeta(s) * Product_{p prime} (1 + p^(1-s) - p^(-s) + p^(2-2*s) - p^(1-2*s) - p^(2-3*s) + p^(-3*s)).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/12) * Product_{p prime} (1 - 1/p^2 - 1/p^3 + 1/p^5 + 1/p^6 - 1/p^7) = 0.4213813264... .
MATHEMATICA
f[p_, e_] := If[e < 3, p^e, 1]; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i=1, #f~, if(f[i, 2] < 3, f[i, 1]^f[i, 2], 1)); }
(Python)
from math import prod
from sympy import factorint
def A360539(n): return prod(p**e for p, e in factorint(n).items() if e<=2) # Chai Wah Wu, Aug 06 2024
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Feb 11 2023
STATUS
approved