OFFSET
1,8
COMMENTS
First differs from A359411 at n = 128.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = (2-A010060(e)).
a(n) = 2^A367512(n).
a(n) >= 1, with equality if and only if n is an exponentially odious number (A270428).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} f(1/p) = 1.13071730542774788785..., where f(x) = 1/2 + x + ((1-x)/2) * Product_{k>=0} (1 - x^(2^k)).
MATHEMATICA
f[p_, e_] := If[EvenQ[DigitCount[e, 2, 1]], 2, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = vecprod(apply(x -> 2-hammingweight(x)%2, factor(n)[, 2]));
(Python)
from sympy import factorint
def A367516(n): return 1<<sum(1 for e in factorint(n).values() if e.bit_count()&1^1) # Chai Wah Wu, Nov 23 2023
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Nov 21 2023
STATUS
approved