cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A153778 Binary sequence constructed like a Stern-Brocot tree between 0 and 1, where XOR is applied instead of the mediant operation.

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 01 2009

Keywords

Comments

The Jacobsthal sequence gives numbers of zeros and ones in the rows of the tree:
A001045(k) = #{i: 2^k <= i < 2^(k+1) and a(i)=0};
A001045(k+1) = #{i: 2^k <= i < 2^(k+1) and a(i)=1}.

Examples

			.[0] . . . . . . . . . . . . . . . . . [1]
................... 1
........... 1 ............. 0
....... 1 ..... 0 ..... 1 ..... 1
..... 1 . 0 . 1 . 1 . 0 . 1 . 1 . 0
.... 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1.
		

Formula

a(1) = 1 and for n>1: a(n) = if A025480(n-1)<>0 and A025480(n)<>0 then a(A025480(n-1)) XOR a(A025480(n)) else if A025480(n)=0 then 1-a(A025480(n-1)) else a(A025480(n-1)).