![]() |
![]() |
#1 |
Jun 2005
11000102 Posts |
![]()
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 Above has the spot values Now assume Conjecture The ratio 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 |
![]() |
![]() |
![]() |
#2 |
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 ] ; ] Code:
CumSumDigits[(10^123 - 1)/9, 10] - CumSumDigits[(10^123 - 1)/9 - 1, 10] |
![]() |
![]() |
![]() |
#3 |
Jun 2005
2×72 Posts |
![]()
here is a base-10 evaluation of
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 Calculated value 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 | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
k*b^n+/-c where b is an integer greater than 2 and c is an integer from 1 to b-1 | jasong | Miscellaneous Math | 5 | 2016-04-24 03:40 |
All top 5000 primes will have the same number of digits in 2014 ;-) | Batalov | Conjectures 'R Us | 10 | 2013-03-29 01:29 |
Always an integer. | mfgoode | Puzzles | 18 | 2007-07-13 18:03 |
get all the 5000 biggest primes above 100K digits | jasong | jasong | 1 | 2007-06-09 22:51 |
Primes for a mersenne integer DWT FNT | gbvalor | Math | 1 | 2003-09-08 16:05 |