1

المرجع الالكتروني للمعلوماتية

تاريخ الرياضيات

الاعداد و نظريتها

تاريخ التحليل

تار يخ الجبر

الهندسة و التبلوجي

الرياضيات في الحضارات المختلفة

العربية

اليونانية

البابلية

الصينية

المايا

المصرية

الهندية

الرياضيات المتقطعة

المنطق

اسس الرياضيات

فلسفة الرياضيات

مواضيع عامة في المنطق

الجبر

الجبر الخطي

الجبر المجرد

الجبر البولياني

مواضيع عامة في الجبر

الضبابية

نظرية المجموعات

نظرية الزمر

نظرية الحلقات والحقول

نظرية الاعداد

نظرية الفئات

حساب المتجهات

المتتاليات-المتسلسلات

المصفوفات و نظريتها

المثلثات

الهندسة

الهندسة المستوية

الهندسة غير المستوية

مواضيع عامة في الهندسة

التفاضل و التكامل

المعادلات التفاضلية و التكاملية

معادلات تفاضلية

معادلات تكاملية

مواضيع عامة في المعادلات

التحليل

التحليل العددي

التحليل العقدي

التحليل الدالي

مواضيع عامة في التحليل

التحليل الحقيقي

التبلوجيا

نظرية الالعاب

الاحتمالات و الاحصاء

نظرية التحكم

بحوث العمليات

نظرية الكم

الشفرات

الرياضيات التطبيقية

نظريات ومبرهنات

علماء الرياضيات

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

Digit Count

The number N_d^((b))(n) of digits d in the base-b representation of a number n is called the b-ary digit count for d. The digit count is implemented in the Wolfram Language as DigitCount[nbd].

DigitCount1s

The number of 1s N_1(n)=N_1^((2))(n) in the binary representation of a number n, illustrated above, is given by

N_1(n) = n-gde(n!,2)

(1)

= n-sum_(k=1)^(|_log_2n_|)|_n/(2^k)_|,

(2)

where gde(n!,2) is the greatest dividing exponent of 2 with respect to n!. This is a special application of the general result that the power of a prime p dividing a factorial (Vardi 1991, Graham et al. 1994). Writing a(n) for N_1(n), the number of 1s is also given by the recurrence relation

a(2n) = a(n)

(3)

a(2n+1) = a(n)+1,

(4)

with a(0)=0, and by

 N_1(n)=2n-log_2(d),

(5)

where d is the denominator of

 1/(n!)[(d^n)/(dx^n)(1-x)^(-1/2)]_(x=0).

(6)

For n=1, 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 N_1(n) is equal to the digit sum s_2(n). The quantity N_1(n) (mod 2) is called the parity of a nonnegative integer n.

N_0(n) and N_1(n) satisfy the beautiful identities

sum_(n=1)^(infty)(N_1(n)+N_0(n))/(2n(2n+1)) = gamma

(7)

sum_(n=1)^(infty)(N_1(n)-N_0(n))/(2n(2n+1)) = ln(4/pi),

(8)

where gamma is the Euler-Mascheroni constant and ln(4/pi)=0.241564... (OEIS A094640) is its "alternating analog" (Sondow 2005).

Let e(n) and o(n) be the numbers of even and odd digits respectively of n. Then

sum_(n=1)^(infty)(o(2^n))/(2^n) = 1/9

(9)

sum_(n=1)^(infty)(e(2^n))/(2^n) = -1/9+sum_(n=1)^(infty)(|_nlog_(10)2_|+1)/(2^n)

(10)

= 1.0316063864...,

(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 ln(4/pi)." 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.

EN

تصفح الموقع بالشكل العمودي