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”).
%I #20 Aug 06 2024 02:00:58
%S 5,17,29,43,53,71,89,101,113,149,163,197,269,281,293,311,317,359,373,
%T 389,401,449,461,479,509,523,547,571,599,619,643,673,691,739,751,773,
%U 797,821,857,863,881,907,937,983,1013,1031,1049,1061,1103,1117,1151
%N Primes with even number of 1's in binary expansion such that next prime has odd number of 1's.
%H Vincenzo Librandi, <a href="/A027703/b027703.txt">Table of n, a(n) for n = 1..2500</a>
%F a(n) = prime(A027704(n)). - _Michel Marcus_, Mar 29 2018
%t c[ n_ ] := OddQ[ Count[ IntegerDigits[ n, 2 ], 1 ] ]; Map[ Prime, Select[ Range[ 300 ], Not[ c[ Prime[ # ] ] ]&&c[ Prime[ #+1 ] ]& ] ]
%t 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 *)
%Y Cf. A027704.
%Y Cf. A027701, A027705, A027707.
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_.
%E More terms from _Erich Friedman_.
%E Offset changed by _Michel Marcus_, Mar 29 2018