The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A359469 a(n) = A353459(n) mod 2. 3

%I #12 Jan 06 2023 10:51:29

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

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

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

%N a(n) = A353459(n) mod 2.

%H Antti Karttunen, <a href="/A359469/b359469.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/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F For all n >= 1, a(n) = a(A003961(n)) = a(A348717(n)).

%o (PARI)

%o A353457(n) = { my(f=factor(n)); prod(i=1,#f~,if(!(primepi(f[i,1])%2), 1, if(f[i,2]==1, -1, 0))); };

%o A353458(n) = { my(f=factor(n)); prod(i=1,#f~,if(primepi(f[i,1])%2, 1, if(f[i,2]==1, -1, 0))); };

%o A353459(n) = (A353457(n)+A353458(n));

%o A359469(n) = (A353459(n)%2);

%o (Python)

%o from functools import reduce

%o from operator import iand

%o from sympy import factorint, primepi

%o def A359469(n):

%o f = [(primepi(p)&1, int(e==1)) for p, e in factorint(n).items()]

%o return reduce(iand,(e for p, e in f if not p),1)^reduce(iand,(e for p, e in f if p),1) # _Chai Wah Wu_, Jan 06 2023

%Y Characteristic function of A359470.

%Y Cf. A003961, A348717, A353457, A353458, A353459.

%Y Differs from A359466 and A359467 for the first time at n=100, as here a(100) = 1.

%K nonn

%O 1

%A _Antti Karttunen_, Jan 04 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 15:12 EDT 2024. Contains 373131 sequences. (Running on oeis4.)