login
Triangle T(n,m) read by rows: Gray code of A060187(n, k) (decimal representation), 1 <= k <= n, n >= 1.
2

%I #23 Aug 27 2024 09:16:16

%S 1,1,1,1,5,1,1,28,28,1,1,106,149,106,1,1,155,987,987,155,1,1,955,440,

%T 514,440,955,1,1,194,137,974,974,137,194,1,1,340,754,60,293,60,754,

%U 340,1,1,181,238,166,377,377,166,238,181,1,1,977,283,540,411,142,411,540,283,977,1

%N Triangle T(n,m) read by rows: Gray code of A060187(n, k) (decimal representation), 1 <= k <= n, n >= 1.

%H G. C. Greubel, <a href="/A143213/b143213.txt">Rows n = 1..50 of the triangle, flattened</a>

%H Eric Weisstein, <a href="http://mathworld.wolfram.com/notebooks/Combinatorics/GrayCode.nb">Mathematica Notebook GrayCode.nb</a>

%H Eric Weisstein, <a href="http://mathworld.wolfram.com/GrayCode.html">Gray Code</a>, MathWorld.

%F T(n, n-k) = T(n, k). - _G. C. Greubel_, Aug 08 2024

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 5, 1;

%e 1, 28, 28, 1;

%e 1, 106, 149, 106, 1;

%e 1, 155, 987, 987, 155, 1;

%e 1, 955, 440, 514, 440, 955, 1;

%e 1, 194, 137, 974, 974, 137, 194, 1;

%e 1, 340, 754, 60, 293, 60, 754, 340, 1;

%e 1, 181, 238, 166, 377, 377, 166, 238, 181, 1;

%e 1, 977, 283, 540, 411, 142, 411, 540, 283, 977, 1;

%t GrayCode[n_, k_]:= FromDigits[BitXor@@@Partition[Prepend[IntegerDigits[n,2,k], 0], 2, 1], 2];

%t A060187[n_, k_]:= Sum[(-1)^(k-j)*Binomial[n,k-j]*(2*j-1)^(n-1), {j,k}];

%t A143213[n_, k_]:= GrayCode[A060187[n, k], 10];

%t Table[A143213[n,k], {n,12}, {k,n}]//Flatten

%Y Cf. A060187, A143214.

%K nonn,tabl

%O 1,5

%A _Roger L. Bagula_ and _Gary W. Adamson_, Oct 20 2008

%E Edited by _G. C. Greubel_, Aug 27 2024