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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A027705 Primes with odd number of 1's in binary expansion such that next prime has even number of 1's. 4

%I #12 Dec 30 2016 02:32:14

%S 2,13,19,41,47,67,79,97,109,137,157,193,251,271,283,307,313,331,367,

%T 379,397,443,457,463,499,521,541,569,587,617,641,661,677,733,743,769,

%U 787,809,829,859,877,883,929,971,1009,1021,1039,1051,1087,1109,1129,1171,1213,1231,1259,1279,1291

%N Primes with odd number of 1's in binary expansion such that next prime has even number of 1's.

%H Robert Israel, <a href="/A027705/b027705.txt">Table of n, a(n) for n = 1..10000</a>

%p N:=1000: # to get all terms in the first N primes

%p Res:= NULL: w:= 0: p:= 0:

%p for i from 1 to N+1 do

%p q:= nextprime(p);

%p v:= convert(convert(q,base,2),`+`) mod 2;

%p if w = 1 and v = 0 then Res:= Res, p fi;

%p p:= q; w:= v;

%p od:

%p Res; # _Robert Israel_, Dec 29 2016

%K nonn

%O 1,1

%A _N. J. A. Sloane_

%E More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

%E Offset changed by _Robert Israel_, Dec 29 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)