Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.math > #330310 > unrolled thread

formula to show last digits consecutive occurrences discrepancy of prime numbers

Started byJamie Morken <jmorken@shaw.ca>
First post2016-03-21 13:49 -0700
Last post2016-03-29 17:57 -0700
Articles 11 — 5 participants

Back to article view | Back to sci.math


Contents

  formula to show last digits consecutive occurrences discrepancy of prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-21 13:49 -0700
    Re: formula to show last digits consecutive occurrences discrepancy of prime numbers DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2016-03-21 17:10 -0400
    Re: formula to show last digits consecutive occurrences discrepancy of prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-21 14:21 -0700
      Re: formula to show last digits consecutive occurrences discrepancy of prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-21 14:43 -0700
        Re: formula to show last digits consecutive occurrences discrepancy of prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-21 16:16 -0700
          Re: formula to show last digits consecutive occurrences discrepancy of prime numbers Jamie Morken <jmorken@shaw.ca> - 2016-03-21 16:56 -0700
    Re: formula to show last digits consecutive occurrences discrepancy of prime numbers William Elliot <marsh@panix.com> - 2016-03-21 19:16 -0700
      Re: formula to show last digits consecutive occurrences discrepancy of prime numbers Virgil <VIRGIL@VIRGIL.com> - 2016-03-21 20:23 -0600
        Re: formula to show last digits consecutive occurrences discrepancy of prime numbers William Elliot <marsh@panix.com> - 2016-03-21 20:37 -0700
    Re: formula to show last digits consecutive occurrences discrepancy of prime numbers abu.kuanysh05@gmail.com - 2016-03-23 08:41 -0700
      Re: formula to show last digits consecutive occurrences discrepancy of prime numbers abu.kuanysh05@gmail.com - 2016-03-29 17:57 -0700

#330310 — formula to show last digits consecutive occurrences discrepancy of prime numbers

FromJamie Morken <jmorken@shaw.ca>
Date2016-03-21 13:49 -0700
Subjectformula to show last digits consecutive occurrences discrepancy of prime numbers
Message-ID<ncpmo6$12ln$2@gioia.aioe.org>
Hi,

Here's some more data using primorial 210 instead of primorial 30 
equations showing distribution of prime last digits:

There are too many permutations to show for all 210 equations
that show the last digits of consecutive primes, but here are
some highlight results of a subset of the 48 primorial210 equations:

y=210x+b
where b = {1    11    13    17    19    23    29    31    37    41    43 
    47    53    59    61    67 71    73    79    83    89    97    101 
   103    107    109    113    121    127    131    137    139    143 
  149 151    157    163    167    169    173    179    181    187    191 
    193    197    199    209}

Here are some of the overall set of procurance permutations
for the above equations:

primeA, primeA+1, count

97    101    581
37    41    578
17    19    572
113    121    571
73    79    568
29    31    566
31    37    562
193    197    560
...
151    173    131
19    41    131
187    209    130
127    149    130
113    139    128
169    191    127
121    143    127
67    89    125
31    53    124
101    121    124
...
59    103    31
149    181    31
101    137    30
61    101    30
53    89    30
97    131    30
167    197    29
181    13    29
131    167    29
...
53    103    6
197    43    6
97    139    6
97    143    6
19    67    6
143    191    6
23    67    6
89    139    6
19    61    6
31    83    6
...
83    157    1
11    73    1
23    107    1
173    43    1
169    47    1
131    191    1
23    83    1
83    151    1
103    179    1
67    121    1
181    31    1


That is a huge discrepancy of consecutive last digits occurrences
that can be explained with simple statistics, based on how far
ahead in number gap the next prime is, ie the top occurring
last digit grouping "97 to 101" occurred 581 times, and this is
a 4 digit spacing, while the lower occurring last digit groupings,
ie "181 to 31" at the bottom, only occurred 1 time.  This is a
(209-181)+31=59 number gap in the primes, so it makes sense
that it occurred less often than the closer spaced primes.

The pairs like "17 to 17" didn't even show up once in the
test I did since that is 210 digits apart for consecutive primes
within a primorial210 block.

The same thing can be done for larger primorial equation sets,
ie primorial 2310 with 480 equations and 480^2 permutation of
the consecutive last digit pairings will show a huge discrepancy
in the last digits (up to last 4 digits) of consecutive prime
numbers.

Here is the C# code excerpt used to do this test:

                 foreach (int prime in Primes)
                 {
                     foreach (int i in new[] { 1, 11, 13, 17, 19, 23, 
29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 
103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 
167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209 })
                     {
                         if (((prime - i) % 210) == 0)
                         {

                             x210plusSORTED.Add(i);
                         }
                     }
                 }

                 Dictionary<Tuple<int, int>, int> pairCounts = new 
Dictionary<Tuple<int, int>, int>();
                 ChirpletPairCounts chirpletPairCounts = new 
ChirpletPairCounts();

pairCounts = chirpletPairCounts.GetPairCounts(x210plusSORTED);

var pairCountsSorted = pairCounts.Values.OrderByDescending(x => x);



     class ChirpletPairCounts
     {

         public ChirpletPairCounts()
         {



         }


         public Dictionary<Tuple<int, int>, int> 
GetPairCounts(IList<int> sequence)
         {
             Dictionary<Tuple<int, int>, int> pairCounts = new 
Dictionary<Tuple<int, int>, int>();
             for (int i = 0; i < sequence.Count - 1; i++)
             {
                 var Key = Tuple.Create(sequence[i], sequence[i + 1]);
                 if (pairCounts.ContainsKey(Key))
                 {
                     pairCounts[Key]++;
                 }
                 else {
                     pairCounts.Add(Key, 1);
                 }
             }
             return pairCounts;
         }


     }


cheers,
Jamie

[toc] | [next] | [standalone]


#330311

FromDecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org>
Date2016-03-21 17:10 -0400
Message-ID<qno0fbde903jd1v44deebftkgj90h6nagn@4ax.com>
In reply to#330310
On Mon, 21 Mar 2016 13:49:11 -0700, Jamie Morken <jmorken@shaw.ca> Gave
us:

>Hi,
>
>Here's some more data 

  Don't you mean "some more OFF TOPIC CRAP" you keep adding this group
to in your inane cross posts?

[toc] | [prev] | [next] | [standalone]


#330312

FromJamie Morken <jmorken@shaw.ca>
Date2016-03-21 14:21 -0700
Message-ID<ncpok8$16co$1@gioia.aioe.org>
In reply to#330310
On 3/21/2016 1:49 PM, Jamie Morken wrote:
>
> Hi,
>
> Here's some more data using primorial 210 instead of primorial 30
> equations showing distribution of prime last digits:
>


Also for primorial 6 it is the simplest pattern:

two equations:
6x+1
6x+5

gives 2*2 = 4 permutations of last consecutive digits in a
primorial 6 block of numbers.

Here are the last digit occurances for the above equations:

primeA, primeA+1, count
5, 1, 22837
1, 5, 22837
5, 5, 16427
1, 1, 16394

In primorial6 blocks, here are the prime gaps for the
above four consecutive last digits:

primeA, primeA+1, primegapFormula, primegap
5, 1, (6-5)+1, 2
1, 5, (5-1), 4
5, 5, (6-5)+5, 6
1, 1, (6-1)+1, 6

Equivalently stated by adding 6 to the second prime IF it is
in the subsequent primorial6 block:

primeA, primeA+1, primegapFormula, primegap
5, 1, (7-5), 2
1, 5, (5-1), 4
5, 5, (11-5), 6
1, 1, (7-1), 6

Prime gap of 2 and prime gap of 4 have the same occurrence
exactly in primorial 6 number blocks it looks like, both
22837 in this case.

cheers,
Jamie

[toc] | [prev] | [next] | [standalone]


#330314

FromJamie Morken <jmorken@shaw.ca>
Date2016-03-21 14:43 -0700
Message-ID<ncppue$18ip$1@gioia.aioe.org>
In reply to#330312
On 3/21/2016 2:21 PM, Jamie Morken wrote:
> On 3/21/2016 1:49 PM, Jamie Morken wrote:
>>
>> Hi,
>>
>> Here's some more data using primorial 210 instead of primorial 30
>> equations showing distribution of prime last digits:
>>
>
>
> Also for primorial 6 it is the simplest pattern:
>
> two equations:
> 6x+1
> 6x+5
>
> gives 2*2 = 4 permutations of last consecutive digits in a
> primorial 6 block of numbers.
>
> Here are the last digit occurances for the above equations:
>
> primeA, primeA+1, count
> 5, 1, 22837
> 1, 5, 22837
> 5, 5, 16427
> 1, 1, 16394
>
> In primorial6 blocks, here are the prime gaps for the
> above four consecutive last digits:
>
> primeA, primeA+1, primegapFormula, primegap
> 5, 1, (6-5)+1, 2
> 1, 5, (5-1), 4
> 5, 5, (6-5)+5, 6
> 1, 1, (6-1)+1, 6
>
> Equivalently stated by adding 6 to the second prime IF it is
> in the subsequent primorial6 block:
>
> primeA, primeA+1, primegapFormula, primegap
> 5, 1, (7-5), 2
> 1, 5, (5-1), 4
> 5, 5, (11-5), 6
> 1, 1, (7-1), 6
>
> Prime gap of 2 and prime gap of 4 have the same occurrence
> exactly in primorial 6 number blocks it looks like, both
> 22837 in this case.
>
> cheers,
> Jamie
>
>


Here are some excerpts for the primorial 2310 number blocks for
the last digits of consecutive primes.  There are 480 equations,
and 480*480 permutations of prime last digits up to the last
four digits up to 2309, so primes ending in 2309 can occur
consecutively but would be very rare as they would have a 2310
digit spacing in a primorial 2310 block.

primeA, primeA+1, count

17	19	75
347	349	74
1279	1283	74
1291	1297	74
2137	2141	74
727	731	74
71	73	73
...
1	17	36
197	211	36
299	311	36
2099	2113	36
19	29	36
179	191	36
521	527	36
481	493	36
853	859	36
...
1517	1543	9
2053	2077	9
1739	1763	9
1973	1997	9
2143	2171	9
851	871	9
1459	1487	9
1489	1513	9
1663	1693	9
...
1957	2017	2
347	377	2
1297	1333	2
1933	1993	2
569	607	2
731	769	2
1559	1619	2
1487	1537	2
109	151	2
...
839	883	1
1319	1367	1
1427	1469	1
379	433	1
229	289	1
883	929	1
221	263	1
461	529	1


Most of the possible permutations won't show up unless very long
input sequences of primes are used, but their probability of
occurrences is straight forward to calculate.

17 to 19 digit last pair was most common overall.

cheers,
Jamie









[toc] | [prev] | [next] | [standalone]


#330316

FromJamie Morken <jmorken@shaw.ca>
Date2016-03-21 16:16 -0700
Message-ID<ncpvbt$1hl2$1@gioia.aioe.org>
In reply to#330314
On 3/21/2016 2:43 PM, Jamie Morken wrote:
> On 3/21/2016 2:21 PM, Jamie Morken wrote:
>> On 3/21/2016 1:49 PM, Jamie Morken wrote:
>>>
>>> Hi,
>>>
>>> Here's some more data using primorial 210 instead of primorial 30
>>> equations showing distribution of prime last digits:



Here is a summary of last digit counts for different primorial number 
blocks for the most common and less common consecutive last digits

primeA, primeA+1, count

primorial6: (2 values, primorial 6 is a special case as just 2 formulas 
produce primes ending in 1,3,7,9)
most common:
5, 1, 22837
1, 5, 22837

least common:
5, 5, 16427
1, 1, 16394


primorial30: (8 values)
most common:
7,11,2945
11,13,2916
17,19,2914
29,1,2904
23,29,2893
13,17,2892
19,23,2887
1,7,2849

least common:
13,13,274
11,11,266
17,17,265
19,19,261
7,7,260
1,1,241
23,23,226
29,29,221

primorial210: (48 values)
most common:
97,101,581
37,41,578
17,19,572
113,121,571
73,79,568
29,31,566
31,37,562
193,197,560

*less common:
41,101,1
83,139,1
149,13,1
41,109,1
1,67,1
127,1,1
113,197,1
11,67,1

primorial2310: (48 values)
most common:
17,19,75
347,349,74
1279,1283,74
1291,1297,74
2137,2141,74
727,731,74
71,73,73
1123,1129,73

*less common:
1471,1523,1
793,841,1
1201,1249,1
601,643,1
1289,1343,1
2203,2267,1
641,697,1
1889,1933,1

primorial30030: (5760 values)
most common:
4127,4129,14
1447,1451,13
15557,15559,13
2243,2251,12
6121,6131,12
8831,8837,12
19751,19753,12
9197,9199,12

*less common:
8399,8441,1
8461,8501,1
8509,8531,1
8573,8609,1
8623,8633,1
8681,8693,1
8783,8819,1
8819,8863,1

*less common instead of least common as full set of permutations was
not calculated for primorial 210 and higher, but last digit groups with
same values should always have the lowest occurrence in a given
primorial block


[toc] | [prev] | [next] | [standalone]


#330317

FromJamie Morken <jmorken@shaw.ca>
Date2016-03-21 16:56 -0700
Message-ID<ncq1nu$1l1k$1@gioia.aioe.org>
In reply to#330316
On 3/21/2016 4:16 PM, Jamie Morken wrote:
> On 3/21/2016 2:43 PM, Jamie Morken wrote:
>> On 3/21/2016 2:21 PM, Jamie Morken wrote:
>>> On 3/21/2016 1:49 PM, Jamie Morken wrote:
>>>>
>>>> Hi,
>>>>
>>>> Here's some more data using primorial 210 instead of primorial 30
>>>> equations showing distribution of prime last digits:
>


Here is another way to view the data sorted by the first prime in the 
pair of consecutive primes:

primeA, primeA+1, count

primorial6:
5,5,16427
5,1,22837
1,5,22837
1,1,16394

primorial30: full list of 64 (8*8) permutations
29,29,221
29,23,363
29,19,519
29,17,774
29,13,1345
29,11,1526
29,7,2153
29,1,2904
23,29,2893
23,23,226
23,19,431
23,17,543
23,13,720
23,11,993
23,7,1824
23,1,2209
19,29,2154
19,23,2887
19,19,261
19,17,431
19,13,517
19,11,957
19,7,1020
19,1,1561
17,29,1551
17,23,2181
17,19,2914
17,17,265
17,13,380
17,11,516
17,7,724
17,1,1278
13,29,1160
13,23,1590
13,19,2163
13,17,2892
13,13,274
13,11,448
13,7,560
13,1,737
11,29,783
11,23,1133
11,19,1551
11,17,2193
11,13,2916
11,11,266
11,7,421
11,1,547
7,29,633
7,23,795
7,19,1138
7,17,1624
7,13,2087
7,11,2945
7,7,260
7,1,330
1,29,410
1,23,665
1,19,811
1,17,1087
1,13,1585
1,11,2159
1,7,2849
1,1,241


primorial210: (only excerpts)
209,73,1
209,67,2
209,61,2
209,59,1
209,53,1
209,47,4
209,43,9
209,41,9
209,37,19
209,31,37
209,29,49
209,23,68
209,19,105
209,17,177
209,13,241
209,11,374
209,1,542
199,209,549
199,71,1
199,67,2
199,61,1
199,59,1
199,47,4
199,43,8
199,41,8
199,37,4
199,31,16
199,29,35
199,23,40
199,19,69
199,17,97
199,13,141
199,11,271
199,1,371
197,209,370
197,199,555
197,53,1
197,47,3
197,43,6
197,41,10


primorial2310:
2309,41,2
2309,37,2
2309,31,5
2309,29,11
2309,23,5
2309,19,13
2309,17,28
2309,13,34
2309,1,66
2297,2309,55
2297,47,1
2297,41,1
2297,37,3
2297,31,4
2297,29,4
2297,23,7
2297,19,4
2297,17,18
2297,13,28
2297,1,37
2293,2309,44
2293,2297,60
2293,29,3
2293,23,5
2293,19,5
2293,17,11
2293,13,17
2293,1,19
2291,2309,23
2291,2297,37
2291,2293,59
2291,37,1
2291,29,2
2291,23,2


primorial30030:
30029,29,2
30029,19,3
30029,17,3
30029,1,9
30013,30029,10
30013,29,1
30013,23,1
30013,19,1
30013,1,2
30011,30029,2
30011,30013,6
30011,17,1
30011,1,4
30007,30029,3
30007,30013,7
30007,30011,5
30007,31,1
30007,1,1
30001,30029,2
30001,30013,1
30001,30011,2
30001,30007,4
30001,19,1
29999,30007,5
29999,30001,4
29999,17,2
29993,30007,6
29993,30001,2
29993,29999,5
29989,30013,1
29989,30011,4
29989,30001,1
29989,29999,2



There is a harmonic sine wave visible in the sorted count values, ie
visible easily in the above primorial30, with frequency that
corresponds to a given primorial block size.  The frequency is just
8 per 30 in the case of primorial 30 as seen above.  Each primorial
has a beat frequency of EulerPhi(primorial)

ie:

primorial beatFrequency
6 2
30 8
210 48
2310 48
30030 5760

ie in wolfram alpha:
https://www.wolframalpha.com/input/?i=eulerphi%2830030%29

These can explain all the harmonics observed in the prime
number distributions I think.

For the primorials 210 and above, I didn't run all the
permutations, but the partial full wave of oscillation is visible,
and with a bit of imagination the full oscillating sine wave
of EulerPhi(primorial) can be seen :D

The whole thing could be displayed with a statistical distribution
formula instead of manually calculating the primes for it too,
as for higher primorials the gaps get too big between some of
the permutations to occur enough to show the sine wave plot
without a supercomputer.  Thats why the pattern becomes less
visible for big primorials, but if they are fully plotted they
should have nice sine waves of EulerPhi(primorial)

cheers,
Jamie



[toc] | [prev] | [next] | [standalone]


#330323

FromWilliam Elliot <marsh@panix.com>
Date2016-03-21 19:16 -0700
Message-ID<Pine.NEB.4.64.1603211915150.28770@panix1.panix.com>
In reply to#330310
On Mon, 21 Mar 2016, Jamie Morken wrote:

> Here's some more data using primorial 210 instead of primorial 30 equations
> showing distribution of prime last digits:

They're all odd.

[toc] | [prev] | [next] | [standalone]


#330324

FromVirgil <VIRGIL@VIRGIL.com>
Date2016-03-21 20:23 -0600
Message-ID<VIRGIL-A68F12.20235121032016@news.giganews.com>
In reply to#330323
In article <Pine.NEB.4.64.1603211915150.28770@panix1.panix.com>,
 William Elliot <marsh@panix.com> wrote:

> On Mon, 21 Mar 2016, Jamie Morken wrote:
> 
> > Here's some more data using primorial 210 instead of primorial 30 equations
> > showing distribution of prime last digits:
> 
> They're all odd.

All but one!
-- 
Virgil
"Mit der Dummheit kampfen Gotter selbst vergebens." (Schiller)

[toc] | [prev] | [next] | [standalone]


#330325

FromWilliam Elliot <marsh@panix.com>
Date2016-03-21 20:37 -0700
Message-ID<Pine.NEB.4.64.1603212036150.25425@panix1.panix.com>
In reply to#330324
On Mon, 21 Mar 2016, Virgil wrote:
>  William Elliot <marsh@panix.com> wrote:
> > On Mon, 21 Mar 2016, Jamie Morken wrote:
> > 
> > > Here's some more data using primorial 210 instead of primorial 30 equations
> > > showing distribution of prime last digits:
> > 
> > They're all odd.
> 
> All but one!

How odd!

[toc] | [prev] | [next] | [standalone]


#330362

Fromabu.kuanysh05@gmail.com
Date2016-03-23 08:41 -0700
Message-ID<01c98f2f-e5a4-454f-b94f-8374bf26b1f6@googlegroups.com>
In reply to#330310
that's teh second occurrence of that pattern, but
since it is modulo ten, who gAf

> 101    103    107    109

> Here are some of the overall set of procurance permutations
> for the above equations:

> That is a huge discrepancy of consecutive last digits occurrences
> that can be explained with simple statistics, based on how far
> ahead in number gap the next prime is, ie the top occurring
> last digit grouping "97 to 101" occurred 581 times, and this is
> a 4 digit spacing, while the lower occurring last digit groupings,
> ie "181 to 31" at the bottom, only occurred 1 time.  This is a
> (209-181)+31=59 number gap in the primes, so it makes sense
> that it occurred less often than the closer spaced primes.
> 
> The pairs like "17 to 17" didn't even show up once in the
> test I did since that is 210 digits apart for consecutive primes
> within a primorial210 block.
> 
> The same thing can be done for larger primorial equation sets,
> ie primorial 2310 with 480 equations and 480^2 permutation of
> the consecutive last digit pairings will show a huge discrepancy
> in the last digits (up to last 4 digits) of consecutive prime
> numbers.
> 
> Here is the C# code excerpt used to do this test:
> 
>                  foreach (int prime in Primes)
>                  {
>                      foreach (int i in new[] { 1, 11, 13, 17, 19, 23, 
> 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 
> 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 
> 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209 })
>                      {
>                          if (((prime - i) % 210) == 0)
>                          {
> 
>                              x210plusSORTED.Add(i);
>                          }
>                      }
>                  }
> 
>                  Dictionary<Tuple<int, int>, int> pairCounts = new 
> Dictionary<Tuple<int, int>, int>();
>                  ChirpletPairCounts chirpletPairCounts = new 
> ChirpletPairCounts();
> 
> pairCounts = chirpletPairCounts.GetPairCounts(x210plusSORTED);
> 
> var pairCountsSorted = pairCounts.Values.OrderByDescending(x => x);
> 
> 
> 
>      class ChirpletPairCounts
>      {
> 
>          public ChirpletPairCounts()
>          {
> 
> 
> 
>          }
> 
> 
>          public Dictionary<Tuple<int, int>, int> 
> GetPairCounts(IList<int> sequence)
>          {
>              Dictionary<Tuple<int, int>, int> pairCounts = new 
> Dictionary<Tuple<int, int>, int>();
>              for (int i = 0; i < sequence.Count - 1; i++)
>              {
>                  var Key = Tuple.Create(sequence[i], sequence[i + 1]);
>                  if (pairCounts.ContainsKey(Key))
>                  {
>                      pairCounts[Key]++;
>                  }
>                  else {
>                      pairCounts.Add(Key, 1);
>                  }
>              }
>              return pairCounts;
>          }
> 
> 
>      }
> 
> 
> cheers,
> Jamie

[toc] | [prev] | [next] | [standalone]


#330837

Fromabu.kuanysh05@gmail.com
Date2016-03-29 17:57 -0700
Message-ID<b71d7849-e358-4fba-add3-c4cb18c9baa5@googlegroups.com>
In reply to#330362
I don't know if this is not a theorem, but
I see no simple reason, why there should not
be any number of primes,
athat are successively two apart

[toc] | [prev] | [standalone]


Back to top | Article view | sci.math


csiph-web