login
a(n) = 1 if the odd part of n is squarefree and the number of prime factors of n (with multiplicity) is odd, otherwise 0.
5

%I #18 Jan 18 2023 02:24:12

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

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

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

%N a(n) = 1 if the odd part of n is squarefree and the number of prime factors of n (with multiplicity) is odd, otherwise 0.

%C a(n) = 1 if A000265(n) is squarefree and A001222(n) is odd, otherwise 0.

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

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

%F a(n) = A066829(n) * A353627(n).

%F a(n) = A353627(n) - A359156(n).

%F a(n) = [A355689(n) < 0], where [ ] is the Iverson bracket.

%F a(n) >= A010051(n).

%F Sum_{k=1..n} a(k) ~ (4/Pi^2)*n. - _Amiram Eldar_, Jan 18 2023

%t a[n_] := If[OddQ[PrimeOmega[n]] && SquareFreeQ[n/2^IntegerExponent[n, 2]], 1, 0]; Array[a, 100] (* _Amiram Eldar_, Jan 18 2023 *)

%o (PARI) A359158(n) = ((bigomega(n)%2)&&issquarefree(n>>valuation(n,2)));

%Y Characteristic function of A359159.

%Y Cf. A000265, A001222, A010051, A066829, A166486, A185199, A353627, A355689, A359156.

%K nonn

%O 1

%A _Antti Karttunen_, Dec 20 2022