|
Search: id:A053645
|
|
|
| A053645 |
|
Distance to largest power of 2 less than or equal to n; write n in binary and change the first digit to zero. |
|
+0 23
|
|
| 0, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
(list; graph; listen)
|
|
|
OFFSET
|
1,6
|
|
|
COMMENT
|
Cf. A083741.
|
|
REFERENCES
|
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197 (see Ex. 24).
|
|
LINKS
|
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
|
|
FORMULA
|
a(n)=n-2^A000523(n)
G.f.: 1/(1-x) * ((2x-1)/(1-x) + sum_{k>=1} 2^(k-1)*x^2^k). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Apr 18 2003
a(1) = 0, a(2n) = 2a(n), a(2n+1) = 2a(n)+1.
|
|
CROSSREFS
|
Cf. A053644.
a(n) = (A006257(n)-1)/2.
A062050(n) - 1.
Sequence in context: A124757 A049263 A014588 this_sequence A106730 A089652 A112168
Adjacent sequences: A053642 A053643 A053644 this_sequence A053646 A053647 A053648
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Henry Bottomley (se16(AT)btinternet.com), Mar 22 2000
|
|
|
Search completed in 0.002 seconds
|