OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
f[p_, e_] := If[OddQ[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 -> hammingweight(x)%2+1, factor(n)[, 2]));
(Python)
from sympy import factorint
def A367515(n): return 1<<sum(1 for e in factorint(n).values() if e.bit_count()&1) # Chai Wah Wu, Nov 23 2023
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Nov 21 2023
STATUS
approved