mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   Help me continue... or break this sequence (https://www.mersenneforum.org/showthread.php?t=23990)

BarriaKarl 2019-01-13 11:56

Help me continue... or break this sequence
 
1 Attachment(s)
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:

[B]F: P * PE - PE + 1

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

H: P * (P * PE - PE + 1) - (P * PE - PE + 1) + 1
[/B]
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


[I]The prime numbers found will be listed in an txt attached to this post.[/I]



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.

[B]Errors last digits:[/B]

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.


[B]Errors last digits pattern:[/B]

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.


[B]Functions sequence:[/B]

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.


[B]TL;DR: Is it possible to continue this sequence using the 3 functions and the prime number with 8761 digits?[/B]

xilman 2019-01-13 13:32

[QUOTE=BarriaKarl;505750]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:

[B]F: P * PE - PE + 1

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

H: P * (P * PE - PE + 1) - (P * PE - PE + 1) + 1
[/B]

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.

...

[B]TL;DR: Is it possible to continue this sequence using the 3 functions and the prime number with 8761 digits?[/B][/QUOTE]

Your notation can be greatly simplified, which may encourage others to look more closely at the sequence. I'll continue you to use your P and PE notation, though they are not particularly standard.

First F can be re-written as (P-1)*PE + 1

G becomes PE * (P-1)[SUP]2[/SUP] + 1

and H is PE * (P-1)^2 + P

Dr Sardonicus 2019-01-16 15:38

[QUOTE=BarriaKarl;505750]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:

[B]F: P * PE - PE + 1

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

H: P * (P * PE - PE + 1) - (P * PE - PE + 1) + 1
[/B][/quote]

[QUOTE=xilman;505753]
First F can be re-written as (P-1)*PE + 1

G becomes PE * (P-1)[SUP]2[/SUP] + 1

and H is PE * (P-1)^2 + P[/QUOTE]

I get the same F and H, but G = PE*(P[sup]2[/sup] - P) +1.

For the specific purpose of determining whether the sequence can be continued, you could try starting PE at 2 and working your way up. This will give numbers of order P or P[sup]2[/sup] rather than P[sup]2[/sup] or P[sup]3[/sup]. I imagine you'd hit a prime before too long, but of course I have no clue how to prove it
:-D

In order to find the [i]largest[/i] value of F, G, or H for a given input P, you would start with prevprime(P-1) and work your way down.


All times are UTC. The time now is 03:45.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.