|
|
A143213
|
|
Triangle T(n,m) read by rows: Gray code of A060187(n,m) (decimal representation), 1<=m<=n.
|
|
0
|
|
|
1, 1, 1, 1, 5, 1, 1, 28, 28, 1, 1, 106, 149, 106, 1, 1, 155, 987, 987, 155, 1, 1, 955, 440, 514, 440, 955, 1, 1, 194, 137, 974, 974, 137, 194, 1, 1, 340, 754, 60, 293, 60, 754, 340, 1, 1, 181, 238, 166, 377, 377, 166, 238, 181, 1, 1, 977, 283, 540, 411, 142, 411, 540
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
Row sums are 1, 2, 7, 58, 363, 2286, 3306, 2612, 2603, 1926, 4566,...
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
1;
1, 1;
1, 5, 1;
1, 28, 28, 1;
1, 106, 149, 106, 1;
1, 155, 987, 987, 155, 1;
1, 955, 440, 514, 440, 955, 1;
1, 194, 137, 974, 974, 137, 194, 1;
1, 340, 754, 60, 293, 60, 754, 340, 1;
1, 181, 238, 166, 377, 377, 166, 238, 181, 1;
1, 977, 283, 540, 411, 142, 411, 540, 283, 977, 1;
|
|
MATHEMATICA
|
GrayCodeList[k_] := Module[{b = IntegerDigits[k, 2], i}, Do[ If[b[[i - 1]] == 1, b[[i]] = 1 - b[[i]]], {i, Length[b], 2, -1} ]; b ]; FromGrayCodeList[d_] := Module[{b = d, i, j}, Do[ If[Mod[Sum[b[[j]], {j, i - 1}], 2] == 1, b[[i]] = 1 - b[[i]]], {i, n = Length[d], 2, -1} ]; FromDigits[b, 2] ]; GrayCode[i_, n_] := FromDigits[BitXor @@@ Partition[Prepend[ IntegerDigits[i, 2, n], 0], 2, 1], 2] FromGrayCode[i_, n_] := FromDigits[BitXor[IntegerDigits[i, 2, n], FoldList[ BitXor, 0, Most[IntegerDigits[i, 2, n]]]], 2]; Clear[f, a, n, m, x]; (*A123125*) f[x_, n_] :=2^n*(1 - x)^(1 + n)*LerchPhi[x, -n, 1/2]; Table[FullSimplify[ExpandAll[f[x, n]]], {n, 0, 10}]; a = Table[CoefficientList[FullSimplify[ExpandAll[f[x, n]]], x], {n, 1, 10}]; b=Table[Flatten[Table[GrayCode[a[[n]][[m]], 10], {m, 1, n}]], {n, 1, Length[ a]}]; Flatten[%]
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|