 mersenneforum.org > Math Sum of all integer digits of all primes between 1 an n
 Register FAQ Search Today's Posts Mark Forums Read 2006-09-20, 12:26 #1 AntonVrba   Jun 2005 11000102 Posts Sum of all integer digits of all primes between 1 an n With the discovery of M44 (congratulations GIMPS) I pondered over the thought if it is possible to count/calculate all the ones of all the primes between 2 and M44. It is a bit off-topic but the result is interesting. To calculate or estimate the number of ones, I set about as follows. Define as the sum of all base-b integer digits between 1 and n and can be expressed as. Above has the spot values Now assume to be large then and proportioning to the number of primes between and which is approximated in the Prime Number Theorem as we obtain the unexpected result that the cumulative sum of all base-b integer digits of all the primes between and prime approximates to Conjecture The ratio defined as "the sum of all base-b digits of all the primes between 1 and n" to "n", converges to the constant for increasing n. and A computation check confirms above tendency already at relatively small values of n. Is above already known or have I introduced a new constant? In parctice how will the constant depart from above definition? Regards Anton Vrba   2006-09-20, 12:34 #2 AntonVrba   Jun 2005 2·72 Posts For the Mathematica users Code: CumSumDigits[n_, b_] := Module[ {ss, p, d0, d1, m} , ss = p = d0 = 0 ; m = n ; While[m > 0, { If[(d1 = Mod[m, b]) != 0, { ss += d1( b^p(b - 1) p + b^p (d1 - 1) + 2(d0 + 1))/2, d0 += b^p d1}], p += 1, m = IntegerPart[m/b], }] ; Return [ss ] ; ] and can be checked by evaluating Code: CumSumDigits[(10^123 - 1)/9, 10] - CumSumDigits[(10^123 - 1)/9 - 1, 10]   2006-09-20, 17:20 #3 AntonVrba   Jun 2005 2×72 Posts here is a base-10 evaluation of counting up to Code: Prime Actual Calculated Actual/Calculated 99999989 2.09217 2.07412 1.0087 999999937 2.07641 2.05933 1.0083 9999999967 2.06389 2.00702 1.0078 99999999977 2.05366 2.03844 1.00747 Actual cumulative digit count of all primes 2 to p divided by the last prime p (C program) Calculated value being the prime counting function An on the same basis a base-2 evaluation for Code: 32749 0.845614 0.804225 1.05146 65521 0.837533 0.798769 1.04853 131071 0.832198 0.794553 1.04738 262139 0.825139 0.789684 1.0449 524287 0.820511 0.78624 1.04359 1048573 0.815104 0.782262 1.04198 2097143 0.810823 0.779118 1.04069 4194301 0.806539 0.776155 1.03915 8388593 0.802665 0.773417 1.03782 16777213 0.798989 0.770954 1.03636 33554393 0.795861 0.768785 1.03522 67108859 0.792815 0.766688 1.03408 134217689 0.790022 0.764787 1.033 268435399 0.787444 0.763058 1.03196 536870909 0.785043 0.76144 1.031 1073741789 0.782845 0.75996 1.03011 2147483647 0.780761 0.758568 1.02926 Last fiddled with by AntonVrba on 2006-09-20 at 18:11  Thread Tools Show Printable Version Email this Page Similar Threads Thread Thread Starter Forum Replies Last Post jasong Miscellaneous Math 5 2016-04-24 03:40 Batalov Conjectures 'R Us 10 2013-03-29 01:29 mfgoode Puzzles 18 2007-07-13 18:03 jasong jasong 1 2007-06-09 22:51 gbvalor Math 1 2003-09-08 16:05

All times are UTC. The time now is 10:06.

Mon Jul 4 10:06:20 UTC 2022 up 81 days, 8:07, 0 users, load averages: 0.88, 1.12, 1.15