Message Boards Message Boards

0
|
68762 Views
|
38 Replies
|
22 Total Likes
View groups...
Share
Share this post:

How can I loop

How can I loop these short lines so that when g1=g2 I have continuing execution of x?

x=2^n-1
y=x
a=((x+y/2+x-y-1)/(x-y-1))-((x+y))/(x+y)/2
r=IntegerPart[a]
g1=Mod[r,9961]
g2={28,167,210,237,245,412,545,636,671,693,833,875,910,917,980,1014,1029,1098,1351,1358,1372,
1413,1420,1448,1526,1665,1680,1792,1834,1925,2029,2184,2240,2260,2338,2400,2401,2443,
2534,2590,2681,2771,2891,2912,2925,3016,3023,3030,3199,3255,3283,3597,3758,3759,3863,
3884,3920,3927,3976,4011,4137,4165,4200,4228,4270,4333,4438,4459,4501,4550,4570,4613,
4641,4738,4760,4788,4830,4844,4865,4871,4900,4907,4983,5004,5088,5117,5333,5334,5389,
5467,5544,5586,5859,5894,5922,5949,6061,6104,6132,6209,6230,6313,6348,6377,6467,6566,
6573,6600,6706,6720,6740,6853,6874,6887,6951,6978,6986,7083,7084,7090,7097,7202,7216,
7224,7308,7552,7608,7728,7770,7840,7854,7917,7937,7952,8028,8183,8231,8280,8323,8344,
8357,8469,8539,8568,8645,8715,8722,8742,8820,8903,8988,9029,9030,9057,9106,9135,9155,
9289,9386,9401,9485,9555,9659,9918,9960},
38 Replies

I thought it would be interesting to reveal an outcome from the series found out on this publishing related to the Riemann hypothesis solution.

Attachments:

Hi guys!

Nice one! ..hey, why don't you publish this sequence of integers (using consolidated code in Mathematica) in OEIS ( The On-Line Encyclopedia of Integer Sequences®) :) ..it would be a great acquisition there, I checked it out (but it's good to check it out again) and I believe there is still no similar sequence there ... it would be nice to see your names there. I hope you are safe and well!

Claudio Chaib

POSTED BY: Claudio Chaib

It depends on Namjoshi and frost , they are co authors, and i respect that, by me it would be fine.Thank you so much Chaib.

Posted 3 years ago

Hi Luis

It depends on Namjoshi and frost , they are co authors

You are very generous, and I am flattered. However, I do not think my minor contribution deserves this honor.

I am working on improving the WL code and making it faster. Will send you an email with the details.

POSTED BY: Rohit Namjoshi

Hello Dr.Namjoshi! I took the freedom to explore a little more the series, I came out with a long solution but it lacks me the programming ability to solve the quest. I ve added up 4 new series that by it self gives new primes but within the context of the first proposed serie of n^8-1+n^4, so they serve to corroborate the results and solve the eningma of false primes, if the false results persists in any of the subsequent series below n^8-1+n^4, it is highly probable that it is a false prime, because the "n" numbers related are mostly different for each given prime. Alone they are responsible for an accuracy of 96% percent and when combined they probably give the hoped 100 % certainty. What i needed here was to cross the false results and see if they repeat for any given "n", to avoid saying it is prime when it is not a prime. It follows the codes: I could not get your e-mail on linkedin, so much humbled towards your titles, take care:

sq=Table[j,{j,100000}]
a=Select[sq,PrimeQ,(10000)];
ClearAll[g, test]
g[n_] := n^8 - 1 + n^4
test[n_] := g[n]/a
test[n_] := (g[n]/a) // AllTrue[IntegerQ /* Not]
candidates = Table[{n, c = g[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
candidates = Table[{n, c = g[n], test[n], PrimeQ@c}, {n, 1, 100000}];
candidates // Select[Last@# && ! #[[3]] &] 
candidates // Select[! Last@# && #[[3]] &] // Length
primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = g[n], test[n], PrimeQ@c}, {n, primesToTest}];

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
fpr = fp / Length@primesToTest // N
ClearAll[d, test]
d[n_] := n^8 - 1 + n^4/n-n^8 - 1 + n^4-1
test[n_] := d[n]/a
test[n_] := (d[n]/a) // AllTrue[IntegerQ /* Not]
candidates = Table[{n, c = d[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
candidates = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, 1, 100000}];
candidates // Select[Last@# && ! #[[3]] &] 
candidates // Select[! Last@# && #[[3]] &] // Length
primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, primesToTest}];

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
fpr = fp / Length@primesToTest // N
ClearAll[d, test]
d[n_] := n^8 - 1 + n^4/n-n^8 - 1 + n^4-3
test[n_] := d[n]/a
test[n_] := (d[n]/a) // AllTrue[IntegerQ /* Not]
candidates = Table[{n, c = d[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
candidates = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, 1, 100000}];
candidates // Select[Last@# && ! #[[3]] &] 
candidates // Select[! Last@# && #[[3]] &] // Length
primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, primesToTest}];

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
fpr = fp / Length@primesToTest // N
ClearAll[d, test]
d[n_] := n^8 - 1 + n^4/n-n^8 - 1 + n^4-7
test[n_] := d[n]/a
test[n_] := (d[n]/a) // AllTrue[IntegerQ /* Not]
candidates = Table[{n, c = d[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
candidates = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, 1, 100000}];
candidates // Select[Last@# && ! #[[3]] &] 
candidates // Select[! Last@# && #[[3]] &] // Length
primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, primesToTest}];
ClearAll[d, test]
d[n_] := n^8 - 1 + n^4/n-n^8 - 1 + n^4-9
test[n_] := d[n]/a
test[n_] := (d[n]/a) // AllTrue[IntegerQ /* Not]
candidates = Table[{n, c = d[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
candidates = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, 1, 100000}];
candidates // Select[Last@# && ! #[[3]] &] 
candidates // Select[! Last@# && #[[3]] &] // Length
primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, primesToTest}];

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
fpr = fp / Length@primesToTest // N

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
fpr = fp / Length@primesToTest // N
ClearAll[f, test]
f[n_] := n^8 - 1 + n^4/n
test[n_] := f[n]/a
test[n_] := (f[n]/a) // AllTrue[IntegerQ /* Not]
candidates = Table[{n, c = f[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
candidates = Table[{n, c = f[n], test[n], PrimeQ@c}, {n, 1, 100000}];
candidates // Select[Last@# && ! #[[3]] &] 
candidates // Select[! Last@# && #[[3]] &] // Length
primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = f[n], test[n], PrimeQ@c}, {n, primesToTest}];

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
fpr = fp / Length@primesToTest // N
Posted 3 years ago

Hi Luis,

Can you please share your email address. My LinkedIn is in my Wolfram Community profile.

POSTED BY: Rohit Namjoshi

Hi Namjoshi! I think the solution passes through proposing an equation involving the the fundamental equation n^8-1+n^4 in a way that it does not give possibility to express any primes, so that by exclusion the number left out of the equation be equiparated to primes, it is kind a complex thought but I think it works, so I altered a bit the programming that you did and the result is "0. " for the length of numbers that are said to be prime but are not prime. check it out! Taking this in consideration it is possible to formulate a relation that respects the sum of the extremes to derive an equation that representes a possible prime solution as a value. The following equation n^8-1+n^4<= n^2n-1+n^n can be written as n^(8-1)-1+n^(4-1)=n^7-1+n^3, and folowinh the example of x-y=x/y it can be correlated to n-n^7-1+n^3 by dividing n^7-1+n^3/n-n^7-1+n^3=>that simplified is equal to n^3-2+n^2, making them equal to each other in (1): n^7-1+n^3=n^3+n^2-2=>n^7+n^3=n^3+n^2-1=>n^7-n^2+1 n^7-n^2+1 + n^7+n^3-1 __________________ 2n^7+n^3-n^2 = omitting for now the number 2in n^7

(n^2 (n^5-1)+1)/(n^2 (n^5+n)-1)=(n^5-1+1)/(n^5+n-1)=>(n^4(n))/(n^1(n^4+1)-1)=n^4/n^4 =1 So it is the same as considering that the sum x+y=x/y=1 a relation that is inverse to the first proposed equality of x-y=x/y in the begining of this paper, or considering a negative sign for y which can be recognized as the subtraction of n^7-1+n^3/n-n^7-1+n^3. The omitted number 2 comes in hand when considering that the resulto f the calculus of n^7-1+n^3/n-n^7-1+n^3 gives even numbers that will have as a first factor integer the number 2. Which then being canceled will serve as a way to distinguish by the second numbers to 2 in the factorization, as a way to test the primality of the transformed prime into an even number.

Applying this concept to a program, done by Rohit Namjoshi, it can be used in the sense of stablishing a rule to find or select the primes from the series n^8-1+n^4 in a analogus manner. Here i quote that by proving that even numbers are generated by the proposed division of n^8-1+n^4 by n-n^8-1+n^4 it is like saying that the numbers originated are only related to numbers that only divide by itself, as in the end of the summation above of n^4/n^4 by ommiting the number 2 next to n^7, it keeps it self at the end of the calculus by giving even numbers and by stablishing that x-(- y)=x/y so that 2=1, again if all the numbers originated from a value o n equals prime gives all numbers aa even composite it is a proof that the prime numbers within n^8-1+n^4 keep the property of not being reduced by the division by a prime factor, whcih is not the case for the coposite numbers that will keep the properties of originating na integer by the division by a prime factor, as it can be seen in the program lines

now i think we have a way to expand the test to try for really big numbers, if I only could get my hands on a super computer, i think we could break a record since this series of primes are more dence than Merssennes primes and fermat and are completely different in behavior.

a={11,19,29,31,59,71,79,139,179,199,229,269,311,349,491,10781,35671,148931};
ClearAll[g, test]
g[n_] := n^8 - 1 + n^4
test[n_] := g[n]/a
test[n_] := (g[n]/a) // AllTrue[IntegerQ /* Not]
candidates = Table[{n, c = g[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
ClearAll[d, test]
d[n_] := n^8 - 1 + n^4/n-n^8 - 1 + n^4
test[n_] := d[n]/a
test[n_] := (d[n]/a) // AllTrue[!IntegerQ /* Not]
candidates = Table[{n, c = d[n], test[n] && PrimeQ@c}, {n, 1, 20}]
candidates // Select[Last@# &]
candidates = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, 1, 100000}];
candidates // Select[Last@# && ! #[[3]] &] 
candidates // Select[! Last@# && #[[3]] &] // Length
primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = d[n], test[n], PrimeQ@c}, {n, primesToTest}];

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
fpr = fp / Length@primesToTest // N

I guess that is it, but I found another way to check if it is a prime, instead of using the list a, try selecting primes from 1 to 1000 for the list a, it gets down to 23424 in 100000, but it gives one false true, when it should give 100%.As soon as I Check the other method I will post it here...thank you so much.

To increase the sensibility ( true positives) and specificity ( t=rue negatives ) I just must include other prime numbers ended in 1 or 9 to the list of "a", so for this type of prime series it repeats along all the first 10000 numbers, as I have checked after doing the factorinteger for the primes generated by n^8-1+n^4 when n is a prime number, so the percentage of false positives is because it is using non prime numbers for the value of "n".

Posted 3 years ago

Hi Luis,

Can you please double check the code I provided. I ran it for n ∈ Primes < 10000 and the FPR is still quite high. I am concerned that some criteria is missing from test[n_].

primesToTest = Array[Prime, 1229];
candidatesP = Table[{n, c = g[n], test[n], PrimeQ@c}, {n, primesToTest}];

fp = candidatesP // Select[! Last@# && #[[3]] &] // Length
(* 587 *)

fpr = fp / Length@primesToTest // N
(* 0.477624 *)
POSTED BY: Rohit Namjoshi

You ve got it just right now it is easier and faster to find a prime without using primeQ...so our series of primes gains each day more robust evidence that it is easier and faster to find primes in the pattern of n^2-1+n or its related exponents...thank you so much you deserve your name on that series for sure

Posted 3 years ago

I modified the candidates table to include test[n] and PrimeQ[g[n]] so each can be tested independently. Up to 100000

candidates = Table[{n, c = g[n], test[n], PrimeQ@c}, {n, 1, 100000}];

If it is prime, the test never says it is not prime

candidates // Select[Last@# && ! #[[3]] &]
(* {} *} 

in about 50% of the cases, the test says it is prime, but it is not prime

candidates // Select[! Last@# && #[[3]] &] // Length
(* 50636 *)
POSTED BY: Rohit Namjoshi

For instance in test [3] when 6641 got divided by 29 it gave 229 so 229 <6641 and it is an integer if there is no integer solution like in test [2] it is a prime as 271 is a prime, I just need to output the value of g[n] related to the situation when there is no integer in the solution of test[n_].

Posted 3 years ago

Ok, thanks for explaining. It is easy to modify the test to return True if there are no integers

test[n_] := (g[n]/a) // AllTrue[IntegerQ /* Not]

Then it can be used to construct a table like this

candidates = Table[{n, c = g[n], test[n] && PrimeQ@c}, {n, 1, 20}]

and filter the cases where the test is True and g[n] is prime

candidates // Select[Last@# &]

(*
{{2, 271, True}, {5, 391249, True}, {14, 1475827471, True}, {16, 4295032831, True}, 
 {19, 16983693361, True}}
*}
POSTED BY: Rohit Namjoshi

If it divides by one of the prime factorization numbers (11,19,59 ...) and it gives a integer it is not a prime, if not it is.(98% probability that it is )

If I divide x which is equal n^8-1+n by any of the integer factor in the list a it will give me if it is divisible, an integer that has a value lesser than x if it is a composite number, but if it is a prime number it will not give an integer as the result, but I got it to work even though it is giving me only one value at a time, and I wanted a list of the numbers:

a={11,19,29,59,71,79,139,269,349,10781,35671,148931};
ClearAll@f
x1==(n^8-1)+(n^4);
y==x1/a;
b=Select[y,IntegerQ,(10000)];
v=If[TrueQ[b<x1],Table[x1,{x1,10000}],n=18;n++;x1]
Posted 3 years ago

Hi Luis,

I think you intended to write = not == for x1 and y. After fixing that, the code above just computes 19^8 - 1 + 19^4. The Select evaluates to {} so the If condition is False so n=18;n++;x1 is evaluated.

It would help to define some helper functions to explain the procedure

ClearAll[g, test]

g[n_] := n^8 - 1 + n^4  (* generating function *)

test[n_] := g[n]/a (* testing function example, just divide by each value of a *)

test[2]
(* 
 {271/11, 271/19, 271/29, 271/59, 271/71, 271/79, 271/139, 271/269, 271/349, 271/10781, 271/35671, 271/148931}
*)

test[3]
(*
{6641/11, 6641/19, 229, 6641/59, 6641/71, 6641/79, 6641/139, 6641/269, 6641/349, 6641/10781, 6641/35671, 6641/148931}
*)

Can you explain what else needs to be done inside the test function to determine if n generates a prime?

POSTED BY: Rohit Namjoshi
Posted 3 years ago

Hi Luis,

Can you please explain what you mean by

compare with x such that x / a < x

Since a > 1, x / a will always be less than x.

POSTED BY: Rohit Namjoshi

The following was tried, but the program doesn't even start ...what is wrong with these lines, i think it obeys the syntax of the code "If".:

a={11,19,29,59,71,79,139,269,349,10781,35671,148931};
ClearAll@f
f[n_] := Module[{x1,y, a,b},
x1=(n^8-1)+(n^4);
y=x1/a;
b=Select[y,IntegerQ,(10000)];
v=If[TrueQ[b<x1],x1,f[n]]]

I think I need a iterator, but I do not know where to put it... any help would be welcomed!!

X = n ^ 8-1 + n, generates composite numbers and prime numbers ending in 1. The composite numbers, all, are factored into prime numbers ending in 1 or 9, with 95% of the first 10,000 compound numbers being divisible by a = {11,19,29,59,71,79,139,269,349,10781,35671,148931}. If I know they are factored {a}, then I can delete all the numbers that divide by one of the numbers in list A without needing to continue factoring or dividing. Every time x is divided by some number in list A, an integer less than x will appear, so if I want to get a prime number, which is not divisible by any factor, I just have to exclude numbers that generate integers less than x of the x / a division.

Programming: Generate x; divide x / a; check if x / a is integer, compare with x such that x / a <x (If yes -> exclude, if not continue generating x), print x

I ve had trouble writing the lines of the program, If you could please write it, we can break the record for finding primes!

I got the formula by studying the sum of extremes applied to prime, I was afraid of doing the algebraic work and loose the relation, I have a work I would like to share specially to a mathematician that I admire a lot, but I have been warned in the past not to keep correspondence on Wolfram community before, so if can wait I can prepare a paper to show to you once and for all...Really glad you liked it, I am just lucky to find out relations but very far from being a Ramanujan...thank you very much for your interest and support.

That was very good advice.

POSTED BY: Richard Frost

Can I call it the Misiec-Frost-Namjoshi prime series?

x=n^8-1+n^4;
    y=x;
    a=((x+y/2+x-y-1)/(x-y-1))-((x+y))/(x+y)/2;
    r=IntegerPart[a];
    g1=Mod[r,9961];
    g2={45,4135,5383,7767,9401,9489,9829,10745,11789,11869,13355,14157,15539,15661,16207,16741,17213,17871,21667,21761,23075,23513,23825,24849,25037,25391,27429,27995,28057,28817,28905,33455,34101,34309,35715,37665,38889,41289,41293,43755,44557,46179,46449,48081,48201,48505,49403,49591,50981,55977,59539,59615,60347,60445,61873,63161,64265,64823,66081,67999,68433,69797,70483,72715,73433,76689,77729,77849,79141,82955,83067,83989,84255,85847,86069,86735,88459,89137,90367,92033,92055,94177,95083,95085,96315,98367,98657,98743,99935,99969,100421,100615,101545,101951,103891,104001,104507,107501,111191,111907,112949,115127,116821,117673,118865,119565,120607,122585,123637,126895,126909,130539,131151,131817,132237,132469,132715,133011,133789,134343,134501,134699,136047,136523,136755,136901,136913,137671,138429,138765,139839,144641,147109,147939,148815,152289,153215,153457,154757,156295,156369,156991,157461,157801,157811,159031,160523,160949,161015,162001,164775,165289,165585,168357,170317,171235,171941,173859,174077,176015,176151,176665,178349,180629,182793,183943,184005,187147,187745,188907,189529,190525,190877,191085,191255,191665,193547,198283,200441,200891,201313,203093,204771,205055,205343,210035,212633,214271,214295,215287,216531,218129,222667,224089,224859,224957,225503,226139,226817,226927,227185,227623,228383,229651,229691,230237,231703,232033,233239,236265,237123,239013,239069,239305,240721,241311,242547,244047,244341,245863,246053,247351,247433,247607,248381,248477,249011,251683,252871,255105,255997,256143,257725,257929,258599,263119,264825,265503,266603,267359,270803,271719,272051,272535,274813,276561,277471,277899,278523,279091,279149,280001,280483,281149,281483,285265,286567,286721,287113,287471,289343,290037,290307,290629,290635,294279,295781,298281,301077,304275,305751,307791,309469,309571,310017,310229,310271,312695,313307,313801,315397,316913,319541,320385,321801,325007,326623,326847,328807,331447,331883,332793,338193,338873,341187,342171,342315,343251,345943,346639,347657,349873,350025,350393,353647,357267,360201,361119,361693,362075,362213,362345,363453,363867,363923,368347,370739,371793,374975,375749,377365,377499,377637,381333,381555,381963,383653,384753,385435,385777,386951,387943,388527,388583,388743,389171,389817,391129,391135,392531,392837,393951,398409,400379,401251,402509,402925,404401,405757,406445,407495,408461,409185,410009,411119,415005,417667,420091,420845,421281,421355,421591,421633,422833,424087,424143,424349,425165,425171,427531,428251,428985,429265,429747,431065,431407,431485,431827,433151,433661,436595,437011,438181,438375,438827,439055,439853,440999,441277,442239,442339,444367,444563,444647,448003,449149,449955,451039,452565,454747,455347,455609,455667,455977,457233,457555,457929,458229,458279,458617,461963,463425,463765,463849,464703,465081,465517,467539,467605,468599,469957,470453,470523,471229,471371,471429,472047,472075,473155,473645,477335,477531,478425,478753,480029,481957,482895,483385,484321,486053,486067,488343,489177,489179,490537,490881,491103,491241,496681,497227,497933,498243,498873,499053,499245,501157,501253,501615,502761,503565,504979,505395,508095,508391,508991,509077,509083,510049,510183,511565,511633,512737,512749,513943,514229,516989,517305,517403,518075,519473,520547,522385,522695,524865,526467,527221,529145,529659,531071,534465,534485,536827,537281,537879,540553,541349,543909,544125,544561,544781,545121,546231,548319,550693,551005,552539,553469,553669,554431,557005,558067,561763,562645,565439,566799,566975,567905,570345,572529,573015,574071,574477,576501,578231,579491,580621,581007,581341,582447,583417,583691,584337,585057,585603,585679,586512,586625}
    ClearAll@f
    f[n_] := Module[{x, y, a, r},
      x = n^8-1+n^4;
      y = x;
      a = ((x + y/2 + x - y - 1)/(x - y - 1)) - ((x + y))/(x + y)/2;
      r = IntegerPart[a];
      Mod[r, 586918]]

    Table[If[MemberQ[g2, f[n]], {n, f[n]}, Nothing], {n, 1, 9961}]
    Table[If[MemberQ[g2, f[n]], {n,n^8-1+n^4, f[n]}, Nothing], {n, 1, 9961}]
    Table[If[MemberQ[g2, f[n]], {n,PrimeQ[n^8-1+n^4], f[n]}, Nothing], {n, 1, 9961}]

result:

{2,True,586512},{5,True,45},{19,True,222667},{53,True,132237},{79,True,279091},{193,True,463765},{281,True,350025},{503,True,425165},{547,True,529659},{857,False,227185},{907,True,67999},{911,True,566799},{967,True,428985},{1009,True,491241},{1069,True,398409},{1091,True,88459},{1097,True,126909},{1213,True,200891},{1487,True,134343},{1493,True,455667},{1861,True,136047},{1867,True,536827},{1881,False,509077},{2137,True,531071},{2297,True,210035},{2357,True,529145},{2389,True,72715},{2477,True,165289},{2593,True,244047},{2659,True,483385},{2957,True,134699},{3347,True,463425},{3499,True,534485},{3539,True,546231},{3691,True,236265},{3797,True,457555},{4001,True,68433},{4007,True,229651},{4093,True,455609},{4157,False,16741},{4229,True,133011},{4339,True,363453},{4409,True,272535},{4721,True,470453},{4831,True,458229},{4931,True,162001},{4951,True,424143},{4973,True,585603},{5153,True,457233},{5179,True,239013},{5261,False,381555},{5279,True,83067},{5393,True,482895},{5483,True,313801},{5519,True,345943},{5573,False,48081},{5659,True,534465},{5841,False,160949},{6047,True,392837},{6113,True,258599},{6133,False,346639},{6163,True,98657},{6367,True,342171},{6691,True,82955},{6917,True,458279},{7001,True,76689},{7411,True,24849},{7457,True,14157},{7793,True,115127},{7829,True,79141},{7963,True,136523},{8017,True,503565},{8053,True,512749},{8447,True,157811},{8647,True,133789},{8779,True,164775},{8861,True,286721},{8863,True,256143},{8923,True,137671},{8951,True,23075},{9391,True,325007},{9405,False,247433},{9539,True,287471},{9697,True,484321},{9721,True,511633}}

POSTED BY: Richard Frost

Yes, none of them are prime and they should all x end in one, primes are very random, I took a sample of mod for converted primes and all the numbers in g2 are mod that are exclusive to primes, but to a certain type of prime, and when you try to get through 2^n-1, they don't keep this property it is crazy... thank you so much, I wish I could program like you, you are really good.

Hi Luis, Here's a Mathematica coding tip for you ... When you use a single equal sign, it means "assignment". So the expression g1 = g2 assigns the contents of g2 to g1. Now if you want to compare them, use the double equal sign instead:

If[ g1==g2, ...
POSTED BY: Richard Frost

As expected from my theory, if you chance 2^n-1 to n^8-1+n^4 it will give a lot of primes. Thank you once again....

POSTED BY: Richard Frost

Just so you should know: if you change in n^8-1+n^4 to n^8-(3or 7or 9)+n^4 and n is a prime you will get numbers ending in 1,3,7,9 and the correlated primes also ending in 1,3,7,9...which is great to whom wants to study the primes, and they all behave very different from Fermat's. I use Wolfram|Alpha to differentiate between primes and use " mixed fractions" Wolfram|Alpha results, but I do not know how to get mixed fractions output on Mathematica, I believe if I could I could easily predict if a large number is prime or not, faster than current algorithms. Thanks a lot Richard, take care.

Posted 3 years ago

Hi Luis,

Regarding mixed fractions, take a look at the resource function MixedNumberForm. It is a wrapper that formats the improper fraction into a mixed fraction but preserves the improper fraction for subsequent evaluation. If you need the parts of the mixed fraction

Through[{IntegerPart, FractionalPart}[10/3]]
(* {3, 1/3} *)
POSTED BY: Rohit Namjoshi

I will learn how to use it and try, what I do is after converting the prime number using "a" formula the prime originated and converted is irreducible to the number used in mod, and the non primes are reducible to a lower number denominator, do not know if the command you told me about will work...bu thank you so much!!

I tried but it keeps running without giving me any output:

Pr := (x = 2^n - 1;
   y = x;
   a = ((x + y/2 + x - y - 1)/(x - y - 1)) - ((x + y))/(x + y)/2;
   r = IntegerPart[a];
   g1 = Mod[r, 9961];
   g2 = {28, 167, 210, 237, 245, 412, 545, 636, 671, 693, 833, 875, 
     910, 917, 980, 1014, 1029, 1098, 1351, 1358, 1372, 1413, 1420, 
     1448, 1526, 1665, 1680, 1792, 1834, 1925, 2029, 2184, 2240, 2260,
      2338, 2400, 2401, 2443, 2534, 2590, 2681, 2771, 2891, 2912, 
     2925, 3016, 3023, 3030, 3199, 3255, 3283, 3597, 3758, 3759, 3863,
      3884, 3920, 3927, 3976, 4011, 4137, 4165, 4200, 4228, 4270, 
     4333, 4438, 4459, 4501, 4550, 4570, 4613, 4641, 4738, 4760, 4788,
      4830, 4844, 4865, 4871, 4900, 4907, 4983, 5004, 5088, 5117, 
     5333, 5334, 5389, 5467, 5544, 5586, 5859, 5894, 5922, 5949, 6061,
      6104, 6132, 6209, 6230, 6313, 6348, 6377, 6467, 6566, 6573, 
     6600, 6706, 6720, 6740, 6853, 6874, 6887, 6951, 6978, 6986, 7083,
      7084, 7090, 7097, 7202, 7216, 7224, 7308, 7552, 7608, 7728, 
     7770, 7840, 7854, 7917, 7937, 7952, 8028, 8183, 8231, 8280, 8323,
      8344, 8357, 8469, 8539, 8568, 8645, 8715, 8722, 8742, 8820, 
     8903, 8988, 9029, 9030, 9057, 9106, 9135, 9155, 9289, 9386, 9401,
      9485, 9555, 9659, 9918, 9960});
n; While[True, If[g1 = g2, Print[x]]; n++]
Posted 3 years ago

Hi Luis,

I think this is what you are looking for

ClearAll@f
f[n_] := Module[{x, y, a, r},
  x = 2^n - 1;
  y = x;
  a = ((x + y/2 + x - y - 1)/(x - y - 1)) - ((x + y))/(x + y)/2;
  r = IntegerPart[a];
  Mod[r, 9961]]

Table[If[MemberQ[g2, f[n]], {n, f[n]}, Nothing], {n, 1, 9961}]

The result is a list of pairs, each pair has the value of n and the value of f[n] for which f[n] is a member of g2. e.g.

(* {{1, 9960}, {67, 1665}, {109, 7937}, {238, 9960}, {304, 1665}, ...} *)

POSTED BY: Rohit Namjoshi

Hi Rohit, it helped me a lot, but what I want is the value of x that satisfy the Mod[r,9961]] when it is equal to G2. It is a conjecture that I am trying to prove that the number x is a prime number... How can I separate the the number n to get x?

Posted 3 years ago

Hi Luis,

x = 2^n - 1 so to get all three values {n, x, f[n]}

Table[If[MemberQ[g2, f[n]], {n, 2^n - 1, f[n]}, Nothing], {n, 1, 9961}]

If you don't need the actual value of x but just want to test if it is prime

Table[If[MemberQ[g2, f[n]], {n, PrimeQ[2^n - 1], f[n]}, Nothing], {n, 1, 9961}]

Seems like none of them are prime. But please check my code carefully to make sure there are no errors.

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract