login
A350389
a(n) is the largest unitary divisor of n that is an exponentially odd number (A268335).
21
1, 2, 3, 1, 5, 6, 7, 8, 1, 10, 11, 3, 13, 14, 15, 1, 17, 2, 19, 5, 21, 22, 23, 24, 1, 26, 27, 7, 29, 30, 31, 32, 33, 34, 35, 1, 37, 38, 39, 40, 41, 42, 43, 11, 5, 46, 47, 3, 1, 2, 51, 13, 53, 54, 55, 56, 57, 58, 59, 15, 61, 62, 7, 1, 65, 66, 67, 17, 69, 70, 71
OFFSET
1,2
LINKS
FORMULA
Multiplicative with a(p^e) = p^e if e is odd and 1 otherwise.
a(n) = n/A350388(n).
A001222(a(n)) = A350387(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
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Dec 28 2021
STATUS
approved