login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


a(n)=1 iff binary weight of n-th prime is even.
4

%I #19 Mar 20 2023 12:43:47

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

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

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

%N a(n)=1 iff binary weight of n-th prime is even.

%C Characteristic function of A027700.

%H T. D. Noe, <a href="/A200244/b200244.txt">Table of n, a(n) for n = 1..1000</a>

%t Table[1 - Mod[Total[IntegerDigits[Prime[n], 2]], 2], {n, 100}] (* _T. D. Noe_, Nov 21 2011 *)

%o (Magma) [IsEven(&+Intseq(NthPrime(n),2)) select 1 else 0: n in [1..100]]; // _Bruno Berselli_, Nov 16 2011

%Y Cf. A027700, A200246.

%K nonn

%O 1

%A _N. J. A. Sloane_, Nov 15 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 22 02:02 EDT 2024. Contains 376090 sequences. (Running on oeis4.)