login
A200246
a(n)=1 iff binary weight of n-th prime is odd.
4
1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1
OFFSET
1
COMMENTS
Characteristic function of A027698.
MATHEMATICA
If[OddQ[Total[IntegerDigits[#, 2]]], 1, 0]&/@Prime[Range[90]] (* Harvey P. Dale, Jun 04 2012 *)
PROG
(Magma) [IsOdd(&+Intseq(NthPrime(n), 2)) select 1 else 0: n in [1..100]]; // Bruno Berselli, Nov 16 2011
(PARI) a(n) = hammingweight(prime(n))%2; \\ Ruud H.G. van Tol, Jul 02 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 15 2011
STATUS
approved