mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2019-01-13, 11:56   #1
BarriaKarl
 
Jan 2019

1 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, 88 views)
BarriaKarl is offline   Reply With Quote
Old 2019-01-13, 13:32   #2
xilman
Bamboozled!
 
xilman's Avatar
 
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

24×13×53 Posts
Default

Quote:
Originally Posted by BarriaKarl View Post
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


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.

...

TL;DR: Is it possible to continue this sequence using the 3 functions and the prime number with 8761 digits?
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)2 + 1

and H is PE * (P-1)^2 + P
xilman is online now   Reply With Quote
Old 2019-01-16, 15:38   #3
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

210×5 Posts
Default

Quote:
Originally Posted by BarriaKarl View Post
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
Quote:
Originally Posted by xilman View Post
First F can be re-written as (P-1)*PE + 1

G becomes PE * (P-1)2 + 1

and H is PE * (P-1)^2 + P
I get the same F and H, but G = PE*(P2 - 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 P2 rather than P2 or P3. 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 largest value of F, G, or H for a given input P, you would start with prevprime(P-1) and work your way down.

Last fiddled with by Dr Sardonicus on 2019-01-16 at 15:49
Dr Sardonicus is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
gmp-ecm: Which B1 to continue yoyo GMP-ECM 1 2014-02-27 20:03
Break up songs davieddy Lounge 4 2013-03-17 01:26
pari break() usage EdH Programming 5 2012-10-25 03:40
Did that guy actually break the the sound barrier? davieddy Puzzles 47 2012-10-19 21:12
What do I have to do to break free? fivemack Aliquot Sequences 8 2010-04-08 18:47

All times are UTC. The time now is 13:17.


Tue Nov 30 13:17:31 UTC 2021 up 130 days, 7:46, 0 users, load averages: 1.68, 1.29, 1.22

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.