A140129 Let c(n) = 0 if n=1, (c(floor(n/2)) + c(floor((n+1)/2)))/2 if 1 < n < 3*2^floor(log_2(n)-1), and c(n-2^floor(log_2(n))) + 1 otherwise. Then a(n) = numerator(c(n)).
0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 3, 1, 3, 2, 3, 0, 1, 1, 3, 1, 5, 3, 7, 1, 5, 3, 7, 2, 5, 3, 4, 0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 9, 5, 11, 3, 13, 7, 15, 2, 9, 5, 11, 3, 7, 4, 5, 0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31
Offset: 1
Examples
C(1) = {0}; C(2) = {0, 1}; C(3) = {0, 1/2, 1,2}; C(4) = {0, 1/4, 1/2, 3/4, 1, 3/2, 2, 3}; C(5) = {0, 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8, 1, 5/4, 3/2, 7/4, 2, 5/2, 3, 4}.
References
- D. E. Knuth, Surreal Numbers, Addison-Wesley, Reading, 1974.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..8191
- Wikipedia, Surreal number
Comments