تاريخ الرياضيات
الاعداد و نظريتها
تاريخ التحليل
تار يخ الجبر
الهندسة و التبلوجي
الرياضيات في الحضارات المختلفة
العربية
اليونانية
البابلية
الصينية
المايا
المصرية
الهندية
الرياضيات المتقطعة
المنطق
اسس الرياضيات
فلسفة الرياضيات
مواضيع عامة في المنطق
الجبر
الجبر الخطي
الجبر المجرد
الجبر البولياني
مواضيع عامة في الجبر
الضبابية
نظرية المجموعات
نظرية الزمر
نظرية الحلقات والحقول
نظرية الاعداد
نظرية الفئات
حساب المتجهات
المتتاليات-المتسلسلات
المصفوفات و نظريتها
المثلثات
الهندسة
الهندسة المستوية
الهندسة غير المستوية
مواضيع عامة في الهندسة
التفاضل و التكامل
المعادلات التفاضلية و التكاملية
معادلات تفاضلية
معادلات تكاملية
مواضيع عامة في المعادلات
التحليل
التحليل العددي
التحليل العقدي
التحليل الدالي
مواضيع عامة في التحليل
التحليل الحقيقي
التبلوجيا
نظرية الالعاب
الاحتمالات و الاحصاء
نظرية التحكم
بحوث العمليات
نظرية الكم
الشفرات
الرياضيات التطبيقية
نظريات ومبرهنات
علماء الرياضيات
500AD
500-1499
1000to1499
1500to1599
1600to1649
1650to1699
1700to1749
1750to1779
1780to1799
1800to1819
1820to1829
1830to1839
1840to1849
1850to1859
1860to1864
1865to1869
1870to1874
1875to1879
1880to1884
1885to1889
1890to1894
1895to1899
1900to1904
1905to1909
1910to1914
1915to1919
1920to1924
1925to1929
1930to1939
1940to the present
علماء الرياضيات
الرياضيات في العلوم الاخرى
بحوث و اطاريح جامعية
هل تعلم
طرائق التدريس
الرياضيات العامة
نظرية البيان
Digit Count
المؤلف:
Borwein, J.; Bailey, D.; and Girgensohn, R.
المصدر:
Experimentation in Mathematics: Computational Paths to Discovery. Wellesley, MA: A K Peters, 2004.
الجزء والصفحة:
...
20-8-2020
939
The number of digits
in the base-
representation of a number
is called the
-ary digit count for
. The digit count is implemented in the Wolfram Language as DigitCount[n, b, d].
The number of 1s in the binary representation of a number
, illustrated above, is given by
![]() |
![]() |
![]() |
(1) |
![]() |
![]() |
![]() |
(2) |
where is the greatest dividing exponent of 2 with respect to
. This is a special application of the general result that the power of a prime
dividing a factorial (Vardi 1991, Graham et al. 1994). Writing
for
, the number of 1s is also given by the recurrence relation
![]() |
![]() |
![]() |
(3) |
![]() |
![]() |
![]() |
(4) |
with , and by
![]() |
(5) |
where is the denominator of
![]() |
(6) |
For , 2, ..., the first few values are 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, ... (OEIS A000120; Smith 1966, Graham 1970, McIlroy 1974).
For a binary number, the count of 1s is equal to the digit sum
. The quantity
is called the parity of a nonnegative integer
.
and
satisfy the beautiful identities
![]() |
![]() |
![]() |
(7) |
![]() |
![]() |
![]() |
(8) |
where is the Euler-Mascheroni constant and
(OEIS A094640) is its "alternating analog" (Sondow 2005).
Let and
be the numbers of even and odd digits respectively of
. Then
![]() |
![]() |
![]() |
(9) |
![]() |
![]() |
![]() |
(10) |
![]() |
![]() |
![]() |
(11) |
where the latter (OEIS A096614) is transcendental (Borwein et al. 2004, pp. 14-15).
REFERENCES:
Borwein, J.; Bailey, D.; and Girgensohn, R. Experimentation in Mathematics: Computational Paths to Discovery. Wellesley, MA: A K Peters, 2004.
Graham, R. L. "On Primitive Graphs and Optimal Vertex Assignments." Ann. New York Acad. Sci. 175, 170-186, 1970.
Graham, R. L.; Knuth, D. E.; and Patashnik, O. "Factorial Factors." §4.4 in Concrete Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley, pp. 111-115, 1994.
McIlroy, M. D. "The Number of 1's in Binary Integers: Bounds and Extremal Properties." SIAM J. Comput. 3, 255-261, 1974.
Sloane, N. J. A. Sequences A000120/M0105, A094640, A096614 in "The On-Line Encyclopedia of Integer Sequences."
Smith, N. "Problem B-82." Fib. Quart. 4, 374-365, 1966.
Sondow, J. "New Vacca-type Rational Series for Euler's Constant and its 'alternating' Analog ." 1 Aug 2005. https://arxiv.org/abs/math.NT/0508042.
Trott, M. The Mathematica GuideBook for Programming. New York: Springer-Verlag, p. 33, 2004. https://www.mathematicaguidebooks.org/.
Vardi, I. Computational Recreations in Mathematica. Reading, MA: Addison-Wesley, p. 67, 1991.
Wolfram, S. A New Kind of Science. Champaign, IL: Wolfram Media, p. 902, 2002.