OFFSET
1,2
COMMENTS
The number of unitary divisors of n that are exponentially odd is A055076(n).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) >= 1 with equality if and only if n is a square (A000290).
Multiplicative with a(p^e) = p^e + 1 if e is odd, and 1 otherwise.
Sum_{k=1..n} a(k) ~ n^2/2.
From Amiram Eldar, Sep 14 2023: (Start)
Dirichlet g.f.: zeta(s) * zeta(2*s-2) * Product_{p prime} (1 + 1/p^(s-1) - 1/p^(2*s-2) - 1/p^(2*s-1)). (End)
MATHEMATICA
f[p_, e_] := 1 + If[OddQ[e], p^e, 0]; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 + if(f[i, 2]%2, f[i, 1]^f[i, 2], 0)); }
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Nov 11 2022
STATUS
approved