|
|
|
|
0, 1, 11, 10, 110, 100, 101, 111, 1111, 1000, 1001, 1011, 1010, 1110, 1100, 1101, 11101, 10000, 10001, 10011, 10010, 10110, 10100, 10101, 10111, 11111, 11000, 11001, 11011, 11010, 11110, 11100, 111100, 100000, 100001, 100011, 100010, 100110, 100100, 100101, 100111, 101111, 101000, 101001, 101011, 101010, 101110, 101100, 101101
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The code can be constructed by the rule: a(n+1) is either the least number obtained from a(n) by toggling one or more 1-bits off if no such number is yet in the sequence, otherwise the least number not yet in sequence that can be obtained from a(n) by toggling one 0-bit on:
n a(n)
0 0
1 1
2 11
3 10
4 110
5 100
6 101
7 111
8 1111
9 1000
10 1001
11 1011
12 1010
13 1110
14 1100
15 1101
16 11101
17 10000
18 10001
19 10011
20 10010
21 10110
22 10100
23 10101
24 10111
25 11111
26 11000
27 11001
28 11011
29 11010
30 11110
31 11100
32 111100
33 100000
|
|
PROG
|
(PARI)
A209229(n) = (n && !bitand(n, n-1));
A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|