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.

Showing 1-4 of 4 results.

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

Original entry on oeis.org

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
Offset: 1

Views

Author

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

Keywords

Examples

			Triangle begins as:
  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;
		

Crossrefs

Programs

  • Mathematica
    GrayCode[n_, k_]:= FromDigits[BitXor@@@Partition[Prepend[IntegerDigits[n,2,k], 0], 2, 1], 2];
    A060187[n_, k_]:= Sum[(-1)^(k-j)*Binomial[n,k-j]*(2*j-1)^(n-1), {j,k}];
    A143213[n_, k_]:= GrayCode[A060187[n, k], 10];
    Table[A143213[n,k], {n,12}, {k,n}]//Flatten

Formula

T(n, n-k) = T(n, k). - G. C. Greubel, Aug 08 2024

Extensions

Edited by G. C. Greubel, Aug 27 2024

A178058 Number of 1's in the Gray code for binomial(n,m).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 3, 4, 4, 3, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 5, 3, 3, 5, 1, 1, 1, 2, 2, 2, 4, 2, 2, 2, 1, 1, 3, 4, 6, 2, 2, 6, 4, 3, 1, 1, 4, 5, 2, 6, 2, 6, 2, 5, 4, 1
Offset: 0

Views

Author

Roger L. Bagula, May 18 2010

Keywords

Comments

Row sums are: 1, 2, 4, 4, 8, 16, 12, 20, 18, 32, 38,....

Examples

			1;
1, 1;
1, 2, 1;
1, 1, 1, 1;
1, 2, 2, 2, 1;
1, 3, 4, 4, 3, 1;
1, 2, 1, 4, 1, 2, 1;
1, 1, 5, 3, 3, 5, 1, 1;
1, 2, 2, 2, 4, 2, 2, 2, 1;
1, 3, 4, 6, 2, 2, 6, 4, 3, 1;
1, 4, 5, 2, 6, 2, 6, 2, 5, 4, 1;
		

Crossrefs

Cf. A143214.

Programs

  • Maple
    A178058 := proc(n,m)
        A005811(binomial(n,m)) ;
    end proc: # R. J. Mathar, Mar 10 2015
  • 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
    ]
    Table[Table[Apply[Plus, GrayCodeList[Binomial[n, m]]], {m, 0, n}], {n, 0, 10}];
    Flatten[%]

Formula

T(n,m) = A005811(binomial(n,m)), 0<=m<=n.

Extensions

Edited by R. J. Mathar, Mar 10 2015

A143261 Triangle read by rows: binary reversed Gray code of binomial(n,m).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 5, 3, 1, 1, 7, 15, 15, 7, 1, 1, 5, 1, 15, 1, 5, 1, 1, 1, 31, 19, 19, 31, 1, 1, 1, 3, 9, 9, 83, 9, 9, 3, 1, 1, 11, 27, 63, 65, 65, 63, 27, 11, 1, 1, 15, 55, 17, 221, 65, 221, 17, 55, 15, 1, 1, 7, 13, 239, 495, 297, 297, 495, 239, 13, 7, 1
Offset: 0

Views

Author

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

Keywords

Comments

Row sums are: 1, 2, 5, 4, 13, 46, 29, 104, 127, 334, 683, 2104,...

Examples

			1;
1, 1;
1, 3, 1;
1, 1, 1, 1;
1, 3, 5, 3, 1;
1, 7, 15, 15, 7, 1;
1, 5, 1, 15, 1, 5, 1;
1, 1, 31, 19, 19, 31, 1, 1;
1, 3, 9, 9, 83, 9, 9, 3, 1;
1, 11, 27, 63, 65, 65, 63, 27, 11, 1;
1, 15, 55, 17, 221, 65, 221, 17, 55, 15, 1;
1, 7, 13, 239, 495, 297, 297, 495, 239, 13, 7, 1;
		

Crossrefs

Programs

  • Maple
    A143261 := proc(n,m)
        binomial(n,m) ;
        A003188(%) ;
        A030101(%) ;
    end proc: # R. J. Mathar, Mar 10 2015
  • 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 ]; b = Table[Table[Sum[GrayCodeList[Binomial[n, k]][[m + 1]]*2^m, {m, 0, Length[GrayCodeList[Binomial[n, k]]] - 1}], {k, 0, n}], {n, 0, Length[a]}]; Flatten[b]

Formula

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

Extensions

Edited by R. J. Mathar, Mar 10 2015

A143332 Related to Gray code representation of Fibonacci(n) in base 10.

Original entry on oeis.org

0, 1, 1, 3, 2, 7, 12, 11, 31, 51, 44, 117, 216, 157, 453, 851, 566, 803, 788, 127, 859, 931, 440, 521, 432, 409, 809, 739, 458, 239, 828, 947, 391, 531, 148, 173, 360, 837, 61, 1011, 942, 475, 36, 375, 307, 579, 496, 145, 864, 689, 465
Offset: 0

Views

Author

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

Keywords

Comments

This is not A003188(A000045(n)) for n >= 17. - Jose-Angel Oteo, Mar 09 2015
The Gray code of Fibonacci(n) is now listed in A255919 = A003188 o A000045. It would be appreciated to know the precise definition of the present sequence, presumably computed via the incomplete and somewhat obscure Mathematica code given below. In view of the definition, might it be related to the decimal Gray code A003100 or another variant? R. J. Mathar remarks that A143214 and A143210 have Mathematica code of a two-argument GrayCode[] function. - M. F. Hasler, Mar 11 2015

Crossrefs

Programs

  • 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_] :=

Extensions

Edited by M. F. Hasler, Mar 11 2015
Showing 1-4 of 4 results.