|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http://functions.wolfram.com/13.10.06.0002.01
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DigitCount[n, 2, 1] == Sum[Subscript[a, k], {k, 1, m}] /;
n == Sum[Subscript[a, k] 2^(k - 1), {k, 1, m}] && m == Ceiling[Log[2, n]] &&
(Subscript[a, k] == 0 || Subscript[a, k] == 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cell[BoxData[RowBox[List[RowBox[List[RowBox[List["DigitCount", "[", RowBox[List["n", ",", "2", ",", "1"]], "]"]], "\[Equal]", RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], "m"], SubscriptBox["a", "k"]]]]], "/;", RowBox[List[RowBox[List["n", "\[Equal]", RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], "m"], RowBox[List[SubscriptBox["a", "k"], " ", SuperscriptBox["2", RowBox[List["k", "-", "1"]]]]]]]]], "&&", RowBox[List["m", "\[Equal]", RowBox[List["Ceiling", "[", RowBox[List["Log", "[", RowBox[List["2", ",", "n"]], "]"]], "]"]]]], "&&", RowBox[List["(", RowBox[List[RowBox[List[SubscriptBox["a", "k"], "\[Equal]", "0"]], "||", RowBox[List[SubscriptBox["a", "k"], "\[Equal]", "1"]]]], ")"]]]]]]]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<math xmlns='http://www.w3.org/1998/Math/MathML' mathematica:form='TraditionalForm' xmlns:mathematica='http://www.wolfram.com/XML/'> <semantics> <mrow> <mrow> <mrow> <msubsup> <mi> s </mi> <mn> 2 </mn> <mrow> <mo> ( </mo> <mn> 1 </mn> <mo> ) </mo> </mrow> </msubsup> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mo> ⩵ </mo> <mrow> <munderover> <mo> ∑ </mo> <mrow> <mi> k </mi> <mo> = </mo> <mn> 1 </mn> </mrow> <mi> m </mi> </munderover> <msub> <mi> a </mi> <mi> k </mi> </msub> </mrow> </mrow> <mo> /; </mo> <mrow> <mrow> <mi> n </mi> <mo> ⩵ </mo> <mrow> <munderover> <mo> ∑ </mo> <mrow> <mi> k </mi> <mo> = </mo> <mn> 1 </mn> </mrow> <mi> m </mi> </munderover> <mrow> <msub> <mi> a </mi> <mi> k </mi> </msub> <mo> ⁢ </mo> <msup> <mn> 2 </mn> <mrow> <mi> k </mi> <mo> - </mo> <mn> 1 </mn> </mrow> </msup> </mrow> </mrow> </mrow> <mo> ∧ </mo> <mrow> <mi> m </mi> <mo> ⩵ </mo> <mrow> <mo> ⌈ </mo> <mrow> <msub> <mi> log </mi> <mn> 2 </mn> </msub> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mo> ⌉ </mo> </mrow> </mrow> <mo> ∧ </mo> <mrow> <mo> ( </mo> <mrow> <mrow> <msub> <mi> a </mi> <mi> k </mi> </msub> <mo> ⩵ </mo> <mn> 0 </mn> </mrow> <mo> ∨ </mo> <mrow> <msub> <mi> a </mi> <mi> k </mi> </msub> <mo> ⩵ </mo> <mn> 1 </mn> </mrow> </mrow> <mo> ) </mo> </mrow> </mrow> </mrow> <annotation-xml encoding='MathML-Content'> <apply> <ci> Condition </ci> <apply> <eq /> <apply> <apply> <power /> <apply> <ci> Subscript </ci> <ci> s </ci> <cn type='integer'> 2 </cn> </apply> <cn type='integer'> 1 </cn> </apply> <ci> n </ci> </apply> <apply> <sum /> <bvar> <ci> k </ci> </bvar> <lowlimit> <cn type='integer'> 1 </cn> </lowlimit> <uplimit> <ci> m </ci> </uplimit> <apply> <ci> Subscript </ci> <ci> a </ci> <ci> k </ci> </apply> </apply> </apply> <apply> <and /> <apply> <eq /> <ci> n </ci> <apply> <sum /> <bvar> <ci> k </ci> </bvar> <lowlimit> <cn type='integer'> 1 </cn> </lowlimit> <uplimit> <ci> m </ci> </uplimit> <apply> <times /> <apply> <ci> Subscript </ci> <ci> a </ci> <ci> k </ci> </apply> <apply> <power /> <cn type='integer'> 2 </cn> <apply> <plus /> <ci> k </ci> <cn type='integer'> -1 </cn> </apply> </apply> </apply> </apply> </apply> <apply> <eq /> <ci> m </ci> <apply> <ceiling /> <apply> <log /> <logbase> <cn type='integer'> 2 </cn> </logbase> <ci> n </ci> </apply> </apply> </apply> <apply> <or /> <apply> <eq /> <apply> <ci> Subscript </ci> <ci> a </ci> <ci> k </ci> </apply> <cn type='integer'> 0 </cn> </apply> <apply> <eq /> <apply> <ci> Subscript </ci> <ci> a </ci> <ci> k </ci> </apply> <cn type='integer'> 1 </cn> </apply> </apply> </apply> </apply> </annotation-xml> </semantics> </math>
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
| Cell[BoxData[RowBox[List[RowBox[List["HoldPattern", "[", RowBox[List["DigitCount", "[", RowBox[List["n_", ",", "2", ",", "1"]], "]"]], "]"]], "\[RuleDelayed]", RowBox[List[RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], "m"], SubscriptBox["a", "k"]]], "/;", RowBox[List[RowBox[List["n", "\[Equal]", RowBox[List[UnderoverscriptBox["\[Sum]", RowBox[List["k", "=", "1"]], "m"], RowBox[List[SubscriptBox["a", "k"], " ", SuperscriptBox["2", RowBox[List["k", "-", "1"]]]]]]]]], "&&", RowBox[List["m", "\[Equal]", RowBox[List["Ceiling", "[", RowBox[List["Log", "[", RowBox[List["2", ",", "n"]], "]"]], "]"]]]], "&&", RowBox[List["(", RowBox[List[RowBox[List[SubscriptBox["a", "k"], "\[Equal]", "0"]], "||", RowBox[List[SubscriptBox["a", "k"], "\[Equal]", "1"]]]], ")"]]]]]]]]]] |
|
|
|
|
|
|
|
|
|
|
Date Added to functions.wolfram.com (modification date)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|