|
|
|
|
1, 0, 4, 9, 3, 8, 18, 7, 17, 6, 16, 37, 15, 36, 14, 35, 13, 34, 12, 33, 11, 32, 74, 31, 73, 30, 72, 29, 71, 28, 70, 27, 69, 26, 68, 25, 67, 24, 66, 23, 65, 22, 64, 149, 63, 148, 62, 147, 61, 146, 60, 145, 59, 144, 58, 143, 57, 142, 56, 141, 55, 140, 54, 139
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
- starts with zero or more occurrences of "10",
- followed by a "0" when the binary expansion of a(n) starts with zero or more occurrences of "10" followed by "11",
- ends with the binary expansion of a(n) (assuming that 0 has an empty binary expansion).
|
|
LINKS
|
|
|
EXAMPLE
|
The first terms, alongside the binary expansions of A032766(n) and a(n), are:
-- ---- --------------- ---------
0 1 0 1
1 0 1 0
2 4 11 100
3 9 100 1001
4 3 110 11
5 8 111 1000
6 18 1001 10010
7 7 1010 111
8 17 1100 10001
9 6 1101 110
10 16 1111 10000
11 37 10000 100101
|
|
PROG
|
(PARI) a(n) = { if (n<=1, return (1-n), n+=n\2; for (x=2+exponent(n), oo, my (k=bitneg(n, x)); if (k%3==0, return (k/3)))) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|