login
a(n) = 1 if bitwise-XOR of the exponents of primes in the prime factorization of n is equal to 1, otherwise 0.
3

%I #17 Jul 16 2024 08:09:19

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

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

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

%N a(n) = 1 if bitwise-XOR of the exponents of primes in the prime factorization of n is equal to 1, otherwise 0.

%H Antti Karttunen, <a href="/A374130/b374130.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 a(n) = [A268387(n) = 1], where [ ] is the Iverson bracket.

%F For k in A268390, a(A059897(n,k)) = a(n).

%t A374130[n_] := If[n == 1, 0, Boole[BitXor @@ FactorInteger[n][[All, 2]] == 1]];

%t Array[A374130, 100] (* _Paolo Xausa_, Jul 16 2024 *)

%o (PARI)

%o A268387(n) = { my(f=factor(n), b=0); for(k=1, #f~, b = bitxor(b, f[k, 2]); ); b; }; \\ From A268387

%o A374130(n) = (1==A268387(n));

%Y Characteristic function of A374595.

%Y Cf. A059897, A268387, A268390.

%Y Differs from A252233 first at n=72, where a(72) = 1, while A252233(72) = 0.

%Y Differs from A374466 first at n=128, where a(128) = 0, while A374466(128) = 1.

%K nonn

%O 1

%A _Antti Karttunen_ and _Peter Munn_, Jul 14 2024