OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = p^e if e is odd and 1 otherwise.
a(n) = n/A350388(n).
a(n) = 1 if and only if n is a positive square (A000290 \ {0}).
a(n) = n if and only if n is an exponentially odd number (A268335).
Sum_{k=1..n} a(k) ~ (1/2)*c*n^2, where c = Product_{p prime} (1 - p/(1+p+p^2+p^3)) = 0.7406196365...
Dirichlet g.f.: zeta(2*s-2) * zeta(2*s) * Product_{p prime} (1 + 1/p^(s-1) - 1/p^(2*s-2) - 1/p^(3*s-1)). - Amiram Eldar, Sep 18 2023
MATHEMATICA
f[p_, e_] := If[OddQ[e], p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(Python)
from math import prod
from sympy import factorint
def A350389(n): return prod(p**e if e % 2 else 1 for p, e in factorint(n).items()) # Chai Wah Wu, Feb 24 2022
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2]%2, f[i, 1]^f[i, 2], 1)); } \\ Amiram Eldar, Sep 18 2023
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Dec 28 2021
STATUS
approved