login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 1 if all exponents in prime factorization of n have an odd binary weight, otherwise 0.
5

%I #18 Oct 28 2023 03:45:47

%S 1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,

%T 1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,0,1,1,1,1,

%U 1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1

%N a(n) = 1 if all exponents in prime factorization of n have an odd binary weight, otherwise 0.

%H Antti Karttunen, <a href="/A355825/b355825.txt">Table of n, a(n) for n = 1..100000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.

%F Multiplicative with a(p^e) = A010060(e).

%F For all n >= 1, a(n) >= A355823(n) >= A302777(n).

%F a(n) = A295316(A268385(n)).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} (1 + f(1/p)) = 0.87686263163054480657..., where f(x) = 1 - x + (1 - (1-x) * Product_{k>=0} (1-x^(2^k)))/2. - _Amiram Eldar_, Oct 27 2023

%t a[n_] := If[AllTrue[FactorInteger[n][[;; , 2]], OddQ[DigitCount[#, 2, 1]] &], 1, 0]; Array[a, 100] (* _Amiram Eldar_, Jul 19 2022 *)

%o (PARI) A355825(n) = factorback(apply(e->(hammingweight(e)%2),factor(n)[,2]));

%Y Characteristic function of A270428 (exponentially odious numbers).

%Y Cf. A000069, A010060, A268385, A295316, A302777, A355826 (Dirichlet inverse).

%Y Differs from related A355823 for the first time at n=128, where a(128) = 1, while A355823(128) = 0.

%Y Cf. also A270419.

%K nonn,easy,mult

%O 1

%A _Antti Karttunen_, Jul 19 2022