cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A143210 Triangle read by rows: Gray code of Eulerian(n,m), 1<=m<=n.

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 14, 14, 1, 1, 23, 99, 23, 1, 1, 37, 441, 441, 37, 1, 1, 68, 244, 456, 244, 68, 1, 1, 140, 167, 386, 386, 167, 140, 1, 1, 269, 408, 255, 785, 255, 408, 269, 1, 1, 527, 912, 788, 987, 987, 788, 912, 527, 1
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 20 2008

Keywords

Comments

Row sums are: 1, 2, 8, 30, 147, 958, 1082, 1388, 2651, 6430,...

Examples

			1;
1, 1;
1, 6, 1;
1, 14, 14, 1;
1, 23, 99, 23, 1;
1, 37, 441, 441, 37, 1;
1, 68, 244, 456, 244, 68, 1;
1, 140, 167, 386, 386, 167, 140, 1;
1, 269, 408, 255, 785, 255, 408, 269, 1;
1, 527, 912, 788, 987, 987, 788, 912, 527, 1;
		

Crossrefs

Cf. A178059.

Programs

  • Mathematica
    Code 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_] := f[x, n] = (1 - x)^(n + 1)*Sum[k^n*x^k, {k, 0, Infinity}]/x; Table[FullSimplify[ExpandAll[f[x, n]]], {n, 0, 10}]; a = Table[CoefficientList[FullSimplify[ExpandAll[f[x, n]]], x], {n, 1, 10}]; Table[Flatten[Table[GrayCode[a[[n]][[m]], 10], {m, 1, n}]], {n, 1, Length[ a]}]; Flatten[%]

Formula

T(n,m) = A003188(A008292(n,m)). - R. J. Mathar, Mar 10 2015

Extensions

Edited by R. J. Mathar, Mar 10 2015