View Single Post
Old 2019-01-13, 11:56   #1
BarriaKarl
 
Jan 2019

116 Posts
Default Help me continue... or break this sequence

Hey folks,

some time ago I found (by chance mostly) a quite interesting pattern to find prime numbers. It works quite simply:

We have three functions:

F: P * PE - PE + 1

G: P * (P * PE - PE + 1) - P + 1

H: P * (P * PE - PE + 1) - (P * PE - PE + 1) + 1

where

P: Prime -- The base prime of our function.
PE: Primo - Error -- A prime number smaller than or equal to P.
E: Error -- Defined as the difference between P and PE.

The idea is to use those functions to starting from the first and most basic prime number, 2 that is, find bigger prime numbers.

The very first use we have:

F(2) = 2 * 2 - 2 + 1 = 3

G(2) = 2 * (F(2)) - 2 + 1 = 5

H(2) = 2 * (F(2)) - (F(2)) + 1 = 4

where, since we are interested in finding the biggest prime number possible, we are gonna take G(2) as our chosen result.

The next iteration we have:

F(G(2) == 5) = 5 * 5 - 5 + 1 = 21

G(5) = 5 * 21 - 5 + 1 = 101

H(5) = 5 * 21 - 21 + 1 = 85

where we choose the function G once again.

And as such we go, repeating the process getting the result with smallest Error. Up to where I reached I received the following table


(function --- result --- Error)

2


G(2) --- 5 --- 0
G(5) --- 101 --- 0
G(101) --- 1020101 --- 0


H(1020101) --- 19D --- 78
G(19D) --- 55D --- 518
G(55D) --- 163D --- 12028


G(163D) --- 487D --- 35544
G(487D) --- 1461D --- 88764
G(1461D) --- 4381D --- 2889174


F(4381D) --- 8761D --- 31255622


The prime numbers found will be listed in an txt attached to this post.



Unfortunately once I got to 8761 digits things got too slow for to me to continue -- I am lacking in hardware. And as such here we are.

My aim with this post if to see if people can indeed find other results and continue the sequence. Well, while at it there is some things I would like to bring forward that I find quite interesting.

Errors last digits:

As shown in the table above the errors show matching last digits when grouped by threes. This is by far the thing that bothers me the most in all this. And I spend more time than I probably should trying to find a way to predict the next error in the sequence.


0, 0, 0, 78, 518, 12028, 35544, 88764, 2889174.


Heh, I repeated such sequence so many times in my head that think I will never forget it.


Errors last digits pattern:

Similar to the last one. Other than being grouped by threes the error's digits themselves show a pattern. 0, 8, 4, 2. Following that pattern the next grouping (after the current 2) should be once again errors ending in 0.


Functions sequence:

Okay, I will admit upfront this one is shaky. I really need some more results to confirm it.


Anyway, it is possible to see that the sequence of functions possess some regularity. From a certain POV there is nothing stopping the results of being a mishmash of functions; yet, we have 3 G's, H, G, G, 3 G's again, and F, G, G.


I have the feeling the 3 G's, ? , G, G is a repeating pattern; one where H and F alternate places in the ? position. Totally baseless assumption though. But c'mon, don't it just feel like it should be that way?



It could be said this whole things depends on the next result. Should the next error not end in a '2' it falls apart. Should the next result not be a function of G the functions (probable) pattern goes 'poof' and the whole thing suddenly become a whole lot less... interesting.

That is it, folks. Hopefully I get a closure to this. This thing is a constant weight on my mind.


TL;DR: Is it possible to continue this sequence using the 3 functions and the prime number with 8761 digits?
Attached Files
File Type: txt PrimesList.txt (30.5 KB, 89 views)
BarriaKarl is offline   Reply With Quote