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!)
A253050 A252867 read mod 2. 5

%I #10 Jan 01 2015 11:25:52

%S 0,1,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,1,0,1,0,1,

%T 0,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,

%U 1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0

%N A252867 read mod 2.

%C if a(n) = 1, then a(n+1) = 0 as two consecutive odd numbers would share a bit. - _Chai Wah Wu_, Jan 01 2015

%H Chai Wah Wu, <a href="/A253050/b253050.txt">Table of n, a(n) for n = 0..10000</a>

%o (Python)

%o A253050_list, l1, l2, s, b = [0,1,0], 2, 1, 3, set()

%o for _ in range(10**4):

%o ....i = s

%o ....while True:

%o ........if not (i in b or i & l1) and i & l2:

%o ............A253050_list.append(i & 1)

%o ............l2, l1 = l1, i

%o ............b.add(i)

%o ............while s in b:

%o ................b.remove(s)

%o ................s += 1

%o ............break

%o ........i += 1 # _Chai Wah Wu_, Jan 01 2015

%Y Cf. A252867, A253051.

%K nonn

%O 0

%A _N. J. A. Sloane_, Jan 01 2015

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 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)