|
|
A165191
|
|
Irregular triangle B(n,i) = i-th significant bit of Gray code of n.
|
|
0
|
|
|
0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
The n-th row has length A070939(n); a nondecreasing sequence.
Each row, when interpreted as a finite sequence can be mapped via Euler's Transform to familiar integer sequences.
Note that adjacent rows differ by only one "bit" which simplifies the transition from one row to the next. (cf. A003188, A055975 and A119972).
|
|
LINKS
|
|
|
FORMULA
|
The n-th row is the reversed bit string of A003188(n). Namely, A003188(n) = Sum_{0<=i<A070939(n)} B(n,i) 2^i.
|
|
EXAMPLE
|
The triangle begins: 0 1 11 01 011 111 101 001 0011 1011 1111 0111 0101 1101 1001 0001 00011 10011 11011 11111 ...
|
|
MAPLE
|
B:= proc(n) option remember; local b; b:= ilog2(n);
`if`(n<=1, n, zip((x, y)->x+y, [B(2^(b+1)-1-n)], [0$b, 1], 0)[])
end:
|
|
MATHEMATICA
|
zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; B[n_] := B[n] = With[{b = Floor[Log[2, n]]}, If[n <= 1, {n}, zip[B[2^(b+1)-1-n], Append[Array[0&, b], 1]]]]; Table[B[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, Feb 13 2017, after Alois P. Heinz *)
|
|
PROG
|
(Magma) // Recursive
N := 5; s := [[]];
for n in [1..N] do
for j in [#s..1 by -1] do
Append(~s, Append(s[j], 1));
Append(~s[j], 0);
end for;
end for;
&cat[IntegerToSequence(SequenceToInteger(b, 2), 2):b in s];
(Magma) // Direct
B:=func<n|[(s[i]+s[i+1])mod 2:i in[1..#s-1]]cat[s[#s]]where s is IntegerToSequence(n, 2)>;
|
|
CROSSREFS
|
Euler transforms of the rows begin: A000007, A000012, A008619, A059841, A103221, A001399, A008620, A022003, A008679, A025767, A001400.
|
|
KEYWORD
|
nonn,easy,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|