login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A027703
Primes with even number of 1's in binary expansion such that next prime has odd number of 1's.
2
5, 17, 29, 43, 53, 71, 89, 101, 113, 149, 163, 197, 269, 281, 293, 311, 317, 359, 373, 389, 401, 449, 461, 479, 509, 523, 547, 571, 599, 619, 643, 673, 691, 739, 751, 773, 797, 821, 857, 863, 881, 907, 937, 983, 1013, 1031, 1049, 1061, 1103, 1117, 1151
OFFSET
1,1
LINKS
FORMULA
a(n) = prime(A027704(n)). - Michel Marcus, Mar 29 2018
MATHEMATICA
c[ n_ ] := OddQ[ Count[ IntegerDigits[ n, 2 ], 1 ] ]; Map[ Prime, Select[ Range[ 300 ], Not[ c[ Prime[ # ] ] ]&&c[ Prime[ #+1 ] ]& ] ]
Prime[#]&/@SequencePosition[Table[If[EvenQ[DigitCount[n, 2, 1]], 1, 0], {n, Prime[ Range[200]]}], {1, 0}][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 03 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman.
Offset changed by Michel Marcus, Mar 29 2018
STATUS
approved