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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178058 Number of 1's in the Gray code for binomial(n,m). 2
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 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Row sums are: 1, 2, 4, 4, 8, 16, 12, 20, 18, 32, 38,....
LINKS
Eric W. Weisstein’s World of Mathematics, Gray code
FORMULA
T(n,m) = A005811(binomial(n,m)), 0<=m<=n.
EXAMPLE
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;
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[%]
CROSSREFS
Cf. A143214.
Sequence in context: A228053 A031262 A047072 * A260971 A053258 A350738
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, May 18 2010
EXTENSIONS
Edited by R. J. Mathar, Mar 10 2015
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 May 5 10:46 EDT 2024. Contains 372275 sequences. (Running on oeis4.)