|
| |
|
|
A068076
|
|
Number of positive integers < n with the same number of 1's in their binary expansions as n.
|
|
4
| |
|
|
0, 1, 0, 2, 1, 2, 0, 3, 3, 4, 1, 5, 2, 3, 0, 4, 6, 7, 4, 8, 5, 6, 1, 9, 7, 8, 2, 9, 3, 4, 0, 5, 10, 11, 10, 12, 11, 12, 5, 13, 13, 14, 6, 15, 7, 8, 1, 14, 16, 17, 9, 18, 10, 11, 2, 19, 12, 13, 3, 14, 4, 5, 0, 6, 15, 16, 20, 17, 21, 22, 15, 18, 23, 24, 16, 25, 17, 18, 6, 19, 26, 27, 19
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,4
|
|
|
EXAMPLE
| The binary expansion of 22 (10110) has 3 1's, as do those of the 6 smaller numbers 7, 11, 13, 14, 19 and 21, so a(22)=6.
|
|
|
MATHEMATICA
| w[n_] := Plus@@IntegerDigits[n, 2]; a[n_] := Plus@@MapThread[Binomial, {Flatten[Position[Reverse[IntegerDigits[n, 2]], 1]]-1, Range[w[n]]}]
|
|
|
CROSSREFS
| Cf. A067587, also A000120 for numerous references.
Sequence in context: A147786 A119387 A055941 * A138498 A050319 A132456
Adjacent sequences: A068073 A068074 A068075 * A068077 A068078 A068079
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Dean Hickerson (dean.hickerson(AT)yahoo.com), Feb 16 2002
|
|
|
EXTENSIONS
| Edited by John W. Layman (layman(AT)math.vt.edu), Feb 20 2002
|
| |
|
|