A287824 a(n) = A287730(n)*A001511(n).
0, 2, 1, 0, 1, 2, 2, 4, 3, 4, 3, 3, 2, 2, 1, 0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 6, 5, 6, 5, 6, 4, 6, 5, 8, 7, 9, 8, 10, 7, 8, 7, 10, 8, 9, 7, 8, 5, 5, 4, 6, 5, 6, 5, 6, 4, 4, 3, 4, 3, 3, 2, 2, 1, 0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 6, 5, 6, 5, 6, 4, 5, 5, 8, 7, 9, 8
Offset: 1
Examples
n chf(n) A070939(n) A001511(n) A002487(n) lef(n) CHF(n) lap(n) a(n) fusc(n) 1 '-' 1 1 1 '' '-' '-' 0 2 '+' 2 2 1 '' '+-' '++' 2 3 '+-' 2 2 2 '+' '--+' '+-' 1 4 '-' 3 1 1 '' '-++' '---' 0 5 '--+' 3 3 3 '-' '+++-' '--+' 1 6 '-+' 3 1 2 '-' '++-+-' '-+-+' 2 7 '-++' 3 1 3 '-+' '+-+--' '-++' 2 8 '+' 4 1 1 '' '+---' '++++' 4 9 '+++-' 4 4 4 '+' '----+' '+++-' 3 10 '++-' 4 1 3 '+' '---+--+' '++-++-' 4 11 '++-+-' 4 1 5 '++-' '--+--+-+' '++-+-' 3 12 '+-' 4 1 2 '+' '--+-+-+' '+-+-+-' 3 13 '+-+--' 4 2 5 '+-' '-+-+-++' '+-+--' 2 14 '+--' 4 1 3 '+-' '-+-++-++' '+--+--' 2 15 '+---' 4 1 4 '+--' '-++-+++' '+---' 1 16 '-' 5 1 1 '' '-++++' '-----' 0 17 '----+' 5 5 5 '-' '+++++-' '----+' 1 .
Links
- I. V. Serov, Table of n, a(n) for n = 1..8192
- J. Berstel, A. Lauve, C. Reutenauer & F. Saliola, Combinatorics on Words: Christoffel Words and Repetitions in Words, 2008.
- I. V. Serov, The tree of all fractions as sequence a(n)/A287823
- I. V. Serov, The tree of all proper fractions as sequence a(n)/A287896
- I. V. Serov, CHF Diatomic Algorithm Benchmark
Programs
-
Python
def c(n): return 1 if n==1 else s(n/2) if n%2==0 else s((n - 1)/2) + s((n + 1)/2) def s(n): return 0 if n==1 else c(n/2) if n%2==0 else c((n - 1)/2) + c((n + 1)/2) def a001511(n): return bin(n)[2:][::-1].index("1") + 1 def a(n): return s(n)*a001511(n) # Indranil Ghosh, Jun 08 2017
Formula
From Yosu Yurramendi, Apr 09 2019: (Start)
For m >= 0, m odd, 0 <= k < 2^m, a(2^m+k) = A287896(2^m-k).
(End)
Extensions
Name corrected by Indranil Ghosh, Jun 08 2017
Comments