login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143214 Gray code applied to Pascal's triangle: T(n,m)=GrayCode(binomial(n,m)). 4
1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 6, 5, 6, 1, 1, 7, 15, 15, 7, 1, 1, 5, 8, 30, 8, 5, 1, 1, 4, 31, 50, 50, 31, 4, 1, 1, 12, 18, 36, 101, 36, 18, 12, 1, 1, 13, 54, 126, 65, 65, 126, 54, 13, 1, 1, 15, 59, 68, 187, 130, 187, 68, 59, 15, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Row sums are 1, 2, 5, 6, 19, 46, 58, 172, 235, 518, 790, ... .
LINKS
Eric Weisstein, Gray Code, MathWorld.
FORMULA
T(n,m) = A003188(binomial(n,m)).
EXAMPLE
1;
1, 1;
1, 3, 1;
1, 2, 2, 1;
1, 6, 5, 6, 1;
1, 7, 15, 15, 7, 1;
1, 5, 8, 30, 8, 5, 1;
1, 4, 31, 50, 50, 31, 4, 1;
1, 12, 18, 36, 101, 36, 18, 12, 1;
1, 13, 54, 126, 65, 65, 126, 54, 13, 1;
1, 15, 59, 68, 187, 130, 187, 68, 59, 15, 1;
MAPLE
A143214 := proc(n, m)
A003188(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 ]; 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]; a = Table[Table[Binomial[n, m], {m, 0, n}], {n, 0, 10}] b=Table[Flatten[Table[GrayCode[a[[n]][[m]], 10], {m, 1, n}]], {n, 1, Length[ a]}]; Flatten[%]
(* program for a fractal picture modulo two: *)
c = Table[Table[If[m <= n, Mod[b[[n]][[m]], 2], 0], {m, 1, Length[b]}], {n, 1, Length[b]}]; ListDensityPlot[c, Mesh -> False]
(* The fractal pattern is the same for Pascal's triangle and the MacMahon numbers, A060187, but not for Eulerian numbers, A123125.*)
CROSSREFS
Sequence in context: A338878 A073166 A050169 * A300380 A300682 A300605
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
Edited by Michel Marcus and Joerg Arndt, Apr 22 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 8 07:12 EST 2023. Contains 367662 sequences. (Running on oeis4.)