|
|
A115352
|
|
Concatenation of finite strings S_0, S_1, S_2, ..., where S_0 = {0} and for k >= 1, S_k is obtained from S_{k-1} by inserting the numbers 2^(k-1) through 2^k-1 after the initial 0.
|
|
1
|
|
|
0, 0, 1, 0, 2, 3, 1, 0, 4, 5, 6, 7, 2, 3, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15, 4, 5, 6, 7, 2, 3, 1, 0, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 8, 9, 10, 11, 12, 13, 14, 15, 4, 5, 6, 7, 2, 3, 1, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
For example, for k = 3, take S_2 = {0,2,3,1} and insert 2^2 through 2^3-1 after the 0, so that S_3 = {0,4,5,6,7,2,3,1}. The string S_k has length 2^k.
A self-similar fractal sequence.
This is the sequence g_n at the end of Section 2 of Levine's paper. The paper also continues several other sequences that are probably not in the OEIS at present.
|
|
REFERENCES
|
L. Levine, Fractal sequences and restricted Nim, Ars Combin. 80 (2006), 113-127.
|
|
LINKS
|
|
|
FORMULA
|
If n=2^m-1, then a(n)=0; for all other terms, write n in binary, collapse the initial segment of 1's to a single 1 and delete the first 0. For example, a(25)=a(11001)=101=5. - Lionel Levine (levine(AT)Math.Berkeley.EDU), May 04 2006
a(n)=0 if n=2^m-1, otherwise A054429(2^ceiling(log_2(n+1))-n-1). - Peter Ward, Jan 23 2020
a(0)=0, a(1)=0; for all other terms, write n as 2^(m+1)+k with 0 <= k < 2^(m+1), then a(n)=2^m+k if k < 2^m, otherwise a(k). - Peter Ward, Jan 23 2020
|
|
EXAMPLE
|
The first few strings S_0, S_1, S_2, ... are as follows:
0
0,1
0,2,3,1
0,4,5,6,7,2,3,1
0,8,9,10,11,12,13,14,15,4,5,6,7,2,3,1
|
|
MATHEMATICA
|
Nest[Append[#, Join[{#[[-1, 1]]}, Range[#2, 2 #2 - 1], Rest@ #[[-1]]]] & @@ {#1, Length@ #[[-1]]} &, {{0}, {0, 1}}, 5] // Flatten (* Michael De Vlieger, Jan 25 2020 *)
|
|
CROSSREFS
|
See A025480 for a similar sequence.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|