|
|
A270804
|
|
0 followed by the positions of the 1's in the inverse Thue-Morse sequence A270803.
|
|
1
|
|
|
0, 1, 2, 7, 8, 9, 10, 31, 32, 33, 34, 39, 40, 41, 42, 127, 128, 129, 130, 135, 136, 137, 138, 159, 160, 161, 162, 167, 168, 169, 170, 511, 512, 513, 514, 519, 520, 521, 522, 543, 544, 545, 546, 551, 552, 553, 554, 639, 640, 641, 642, 647, 648, 649, 650, 671, 672, 673, 674, 679, 680, 681, 682, 2047
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
See Maple code.
|
|
MAPLE
|
a:=proc(n) option remember;
if n<=2 then n
elif n=3 then 7
else if n mod 4 = 0 then a(n-1)+1
elif n mod 4 = 1 then a(n-2)+2
elif n mod 4 = 2 then a(n-3)+3
elif n mod 8 = 3 then a(n-3)+7
else 4*a((n-1)/2)+3; fi;
fi;
end;
[seq(a(n), n=0..120)];
|
|
MATHEMATICA
|
a[n_] := a[n] = Which[n <= 2, n, n == 3, 7, True, Which[Mod[n, 4] == 0, a[n - 1] + 1, Mod[n, 4] == 1, a[n - 2] + 2, Mod[n, 4] == 2, a[n - 3] + 3, Mod[n, 8] == 3, a[n - 3] + 7, True, 4*a[(n - 1)/2] + 3]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Perhaps someone could enter the sequences d_n, z_n, u_n given in Section 4 of the article (unless of course they are already in the OEIS).
|
|
STATUS
|
approved
|
|
|
|