OFFSET
1
COMMENTS
Characteristic function of A027698.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
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