R-Simplex's the number 5 and prime numbers.

Click For Summary

Discussion Overview

This discussion revolves around the mathematical concept of R-Simplex numbers and their relationship with prime numbers. Participants explore various mathematical expressions, tests for primality, and the implications of their findings, with a focus on computational methods and optimizations.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants present the definition of R-Simplex numbers using Pochhammer symbols and factorials, although there is uncertainty about the exact formulation.
  • There is a suggestion that the relationship between R-Simplex numbers and primes can be tested using a specific mathematical expression, but the validity of this expression is questioned.
  • One participant proposes testing non-prime numbers, noting that certain non-primes also yield results that suggest they could be prime under the discussed conditions.
  • Another participant expresses a desire to validate findings due to technical difficulties with their computing setup and inquires about specific cases of non-primes.
  • A participant shares a new primality test that utilizes binary and base 5 representations, suggesting it may only be a probable prime test but shows promising results.
  • Improvements to the primality test are discussed, with emphasis on the roles of the numbers 2, 3, and 5 in the testing process.
  • Several participants share code snippets for testing primality, indicating ongoing development and optimization efforts.

Areas of Agreement / Disagreement

Participants express differing views on the validity of the mathematical expressions and tests proposed. There is no consensus on the effectiveness of the primality tests or the relationship between R-Simplex numbers and primes, indicating an unresolved discussion.

Contextual Notes

Some participants note limitations in their testing due to computational constraints, and there are references to the need for further validation of results. The discussion includes various mathematical assumptions and conditions that remain unaddressed.

qpwimblik
Messages
36
Reaction score
0
So if you do a search for R-Simplexs you should find that.

RSimplex(n,d)=Pochhammer(n,d)/d!

Well so to does
RSimplex(n,d)=If(n<d, Pochhammer(d+1,n-1)/n!, Pochhammer(n,d)/d!)

Or something like that my maths package is down so I'm not sure quite how it works.

Anyway the relationship between RSimplex's and primes seems to be this.

For any tested prime over 11
PrimeQ(p)=IntegerQ(Floor(RSimplex(RSimplex(p,p),5)/p)/p)
 
Physics news on Phys.org
qpwimblik said:
So if you do a search for R-Simplexs you should find that.

RSimplex(n,d)=Pochhammer(n,d)/d!
Please provide more information. I did a search and did not find that. What language/library/etc. are you talking about? What is your source?
 
Pochhammer is the same as the rising factorial.
I use mathematica but I wrote this article in pseudo code.
Sorry about the search issue. Search instead for Figurate number, Tetrahedral number and Pochhammer.
It all used to be on one page on the wikipedia now the validating info is scattered. I don't know why.
 
You should test non-primes also. For example, 195 is not prime, but the expression on the right evaluates to True as far as I can tell.
 
Thats interesting my computer is down so I can't yet validate if your findings are the same as mine. I will get back to you as soon as and tell you if I get the same as yours. Just out of curiosity has your anaysis flagged any numbers that are not a multiple of 5 claiming true especially ones made up larger factors than 11.
 
DaleSpam said:
You should test non-primes also. For example, 195 is not prime, but the expression on the right evaluates to True as far as I can tell.

Yes I have now been able to do a bit of testing on my function and other than numbers below 11 or
divisible by five I can't find any more which don't work.

I Also found this test which Quite possibly can be sped up at least it's one step better than the last test in terms of speed up.

PrimeQu[a34_] :=
If[Mod[FromDigits[Append[Table[1, {xr, a34 - 1}], 0], 2], a34] == 0,
If[Mod[FromDigits[Append[Table[1, {xd, a34 - 1}], 0], 5], a34] ==
0 || a34 == 2, True, False], False];

Essentially for every number I have n-1 1's in a list with a 0 at the end and you convert from binary and base 5 and then mod the output by n if both the numbers are 0 then it seems as if the number is a prime.
Note this might only be a probable prime test who knows but it is displaying some very promising results.

If you have any thoughts on how this can be speed up please let me know. I noticed how other primeality tests rely on modulation of big powers I see this technique as being similar so I'm thinking there's probably a bitwise trick out there but am I right. I'm just left killing the ram otherwise If I go beyond a billion as I have to then compute a billion 1's or so. I would love to know the score with regards to this issue.
 
I've a made some Improvements already and yet again 5 and this time 2 and 3 also play a major role.I'm currently running 3000000 random number test's on the function so far it has thrown up no false or true lies compared to the standard wolfram test.

PrimeQu[cex_] := Catch[ Module[ {zcv = PowerMod[2, cex, cex] - 2, zcv2 = JacobiSymbol[ FromDigits[Append[Table[1, {xvc, Floor[Log[2, cex]] + 1}], 0], 3] FromDigits[ Append[Table[1, {xvc, Floor[Log[3, cex]] + 1}], 0], 2], cex], zcv3 = JacobiSymbol[ FromDigits[Append[Table[1, {xvc, Floor[Log[2, cex]] + 1}], 0], 5] FromDigits[ Append[Table[1, {xvc, Floor[Log[5, cex]] + 1}], 0], 2], cex], Var25, Var26, ced = cex }, Var25 = If[GCD[ced, 2] == 2 || GCD[ced, 3] == 3 || GCD[ced, 5] == 5, If[ced == 2 || ced == 3 || ced == 5, 1, 2], 1]; Var26 = If[zcv == 0 && Abs[zcv2] == 1 && Abs[zcv3] == 1, 1, 2]; If[Var25 == 1 && Var26 == 1, Throw["True"], Throw["False"]]; ]];
 
Last edited:
Check this code out this should get a few more views I've been beavering away at this one and am currently working on Optimised version. Any faulty numbers please do tell especially ones with similar stats to 521.

Ok here goes it.

Test1[vbe_] :=
Catch[Module[{ce1 = vbe, zcv2, zcv3, zcv4, zcv5, zcv6, zcv7, zcv8,
zcv9, zcv10, zcv11},
zcv2 =
JacobiSymbol[ce1,
FromDigits[
Append[Table[1, {xvc1 , Round[N[Log[2, ce1], 3]]}], 0],
3] FromDigits[
Append[Table[1, {xvc2, Round[N[Log[3, ce1], 3]]}], 0], 2]];
zcv3 =
JacobiSymbol[ce1,
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[2, ce1], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce1], 3]]}], 0], 2]];
zcv4 =
JacobiSymbol[ce1,
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[3, ce1], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce1], 3]]}], 0], 3]];
Throw[{zcv2, zcv3, zcv4}]
]];

Test2[vbt_] := Catch[Module[{ce2 = vbt, zcv5, zcv6, zcv7},
zcv5 =
JacobiSymbol[ce2 2,
FromDigits[
Append[Table[1, {xvc1, Round[N[Log[2, ce2], 3]]}], 0],
3] FromDigits[
Append[Table[1, {xvc2, Round[N[Log[3, ce2], 3]]}], 0], 2]];
zcv6 =
JacobiSymbol[ce2 2,
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[2, ce2], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce2], 3]]}], 0], 2]];
zcv7 =
JacobiSymbol[ce2 2,
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[3, ce2], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce2], 3]]}], 0], 3]];

Throw[{zcv5, zcv6, zcv7}]
]];

Test3[vbs_] := Catch[Module[{ce3 = vbs, zcv8, zcv9, zcv10},
zcv8 =
JacobiSymbol[ce3^2,
FromDigits[Append[Table[1, {xvc1, Floor[Log[2, ce3]] + 1}], 0],
3] FromDigits[Append[Table[1, {xvc2, Floor[Log[3, ce3]]}], 0],
2]];
zcv9 =
JacobiSymbol[ce3^2,
FromDigits[Append[Table[1, {xvc3, Floor[Log[2, ce3]] + 1}], 0],
5] FromDigits[Append[Table[1, {xvc4, Floor[Log[5, ce3]]}], 0],
2]];
zcv10 =
JacobiSymbol[ce3^2,
FromDigits[Append[Table[1, {xvc3, Floor[Log[3, ce3]] + 1}], 0],
5] FromDigits[Append[Table[1, {xvc4, Floor[Log[5, ce3]]}], 0],
3]];

Throw[{zcv8, zcv9, zcv10}]
]];
Test6[vbe_] :=
Catch[Module[{ce1 = vbe, zcv2, zcv3, zcv4, zcv5, zcv6, zcv7, zcv8,
zcv9, zcv10, zcv11},
zcv2 =
JacobiSymbol[
FromDigits[
Append[Table[1, {xvc1 , Round[N[Log[2, ce1], 3]]}], 0],
3] FromDigits[
Append[Table[1, {xvc2, Round[N[Log[3, ce1], 3]]}], 0], 2],
ce1];
zcv3 =
JacobiSymbol[
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[2, ce1], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce1], 3]]}], 0], 2],
ce1];
zcv4 =
JacobiSymbol[
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[3, ce1], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce1], 3]]}], 0], 3],
ce1];
Throw[{zcv2, zcv3, zcv4}]
]];

Test7[vbt_] := Catch[Module[{ce2 = vbt, zcv5, zcv6, zcv7},
zcv5 =
JacobiSymbol[
FromDigits[
Append[Table[1, {xvc1, Round[N[Log[2, ce2], 3]]}], 0],
3] FromDigits[
Append[Table[1, {xvc2, Round[N[Log[3, ce2], 3]]}], 0], 2],
ce2 5];
zcv6 =
JacobiSymbol[
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[2, ce2], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce2], 3]]}], 0], 2],
ce2 5];
zcv7 =
JacobiSymbol[
FromDigits[
Append[Table[1, {xvc3, Round[N[Log[3, ce2], 3]]}], 0],
5] FromDigits[
Append[Table[1, {xvc4, Round[N[Log[5, ce2], 3]]}], 0], 3],
ce2 5];

Throw[{zcv5, zcv6, zcv7}]
]];

Test8[vbs_] := Catch[Module[{ce3 = vbs, zcv8, zcv9, zcv10},
zcv8 =
JacobiSymbol[
FromDigits[Append[Table[1, {xvc1, Floor[Log[2, ce3]] + 1}], 0],
3] FromDigits[Append[Table[1, {xvc2, Floor[Log[3, ce3]]}], 0],
2], ce3^3];
zcv9 =
JacobiSymbol[
FromDigits[Append[Table[1, {xvc3, Floor[Log[2, ce3]] + 1}], 0],
5] FromDigits[Append[Table[1, {xvc4, Floor[Log[5, ce3]]}], 0],
2], ce3^3];
zcv10 =
JacobiSymbol[
FromDigits[Append[Table[1, {xvc3, Floor[Log[3, ce3]] + 1}], 0],
5] FromDigits[Append[Table[1, {xvc4, Floor[Log[5, ce3]]}], 0],
3], ce3^3];

Throw[{zcv8, zcv9, zcv10}]
]];

Test4[vbr_] := Catch[Module[{zcv, zcv11, fbe = vbr},
zcv = PowerMod[2, fbe, fbe] - 2;
zcv11 = PowerMod[3, fbe, fbe] - 3;
Throw[{zcv, zcv11}]
]];

Test5[vbr2_] :=
Catch[Module[{Vbry = vbr2,
asnd = Append[Table[1, {ghd, vbr2 - 1}], 0], tes1, tes2},
tes1 = Mod[FromDigits[asnd, 2], Vbry];
tes2 = Mod[FromDigits[asnd, 5], Vbry];
Throw[{tes1, tes2}]
]];PrimeQPW[cex_] :=
Catch[Module[{Var27, Var28, Var29, Var30, Var26 = Test1[cex],
Var25 = Abs[Test2[cex]], Var24 = Test3[cex], Var23 = Test4[cex],
ced = cex},
If[ced == 2 || ced == 3 || ced == 5 || ced == 7 || ced == 11 ||
ced == 13, Throw[True]; Break[];];
If[IntegerQ[ced/2] == True || IntegerQ[ced/3] == True ||
IntegerQ[ced/5] == True || IntegerQ[ced/7] == True ||
IntegerQ[ced/11] == True || IntegerQ[ced/13] == True,
Throw[False]; Break[];];
If[Total[Abs[Var26]] < 2, Throw[False]; Break[], Var27 = 1];
If[Total[Var25] > 1, Throw[False]; Break[], Var28 = 1];
If[Var26[[2]] == -1 && Total[Var24] < 3 || Total[Var24] == 3,
Var29 = 1;, Throw[False]; Break[];];
Var30 = If[Var23 == {0, 0}, 1, 2];
If[Var27 == 1 && Var28 == 1 && Var29 == 1 && Var30 == 1,
Throw[True];, Throw[False];];
]];Stats[sta_] :=
Column[{{Test1[sta], Test2[sta], Test3[sta], Test6[sta], Test7[sta],
Test8[sta]},
FromDigits[{Mod[sta, 13], Mod[sta, 11], Mod[sta, 7], Mod[sta, 5]},
13]}];

It seems to work fastest with Big Primes Over 500 digits long. enjoy. And Again any faulty results do post by all means especially ones with interesting stats or ones faster or slower than the norm with regards to big Primes.
 
488881 gives a false reading.
 
  • #10
Watch the Zero count on this test in relation to groups of 1's and -1's for primes and non primes. I'm about to write these findings into a test.

FiveItt[x98_, cc5_] :=
If[x98 == 1, 1, FromDigits[Append[Table[1, {ft, x98 - 1}], 0], cc5]];

BCC[x55_, g77_] :=
Drop[Flatten[
Reap[Module[{x45 = x55, z7 = 0, z8 = 0, z9, g7 = g77, bell},
z7 = If[x45/FiveItt[Length[IntegerDigits[x45, g7]], g7] <= 1,
If[x45 == 1, 1, Length[IntegerDigits[x45, g7]] - 1],
Length[IntegerDigits[x45, g7]]];
bell = FiveItt[z7 - 1, g7];
z9 = g7^(z7 - 1);
Label[SPo];
z8 =
If[IntegerQ[x45/g7] && x45 > g7,
Quotient[x45 - bell - (1/(2*g7)), z9],
If[x45 <= g7, x45, Quotient[x45 - bell, z9]]];
Sow[z8];
x45 = x45 - (z8*(z9));
z7 = z7 - 1;
z9 = z9/g7;
bell = bell - z9;
If[z7 < 1, Goto[EnD], Goto[SPo]];
Label[EnD];]]], 1];

T2xy[x_, y_] := ((x + y) (x + y - 1))/2 - y + 1;
Zequeba[fre_, fre2_] := Total[BCC[fre, fre2]];

Test10[zz7_,
zz8_] := {JacobiSymbol[Zequeba[zz7, zz8], T2xy[zz7, zz8]],
JacobiSymbol[T2xy[zz7, zz8], Zequeba[zz7, zz8]],
JacobiSymbol[Zequeba[zz7, zz8], T2xy[zz8, zz7]],
JacobiSymbol[T2xy[zz8, zz7], Zequeba[zz7, zz8]]};

Lightening[asif_] := Table[Test10[asif, Prime[hha]], {hha, 1, 6}];
 
  • #11
This testing Mechanism has a very low big O Optimisability and Could Radically speed up Prime Search's. It also Correlates well with SHA Hashs 256 368 and 512.

Test4[vbr_] := Catch[Module[{zcv, zcv11, fbe = vbr},
zcv = PowerMod[2, fbe, fbe] - 2;
zcv11 = PowerMod[3, fbe, fbe] - 3;
Throw[{zcv, zcv11}]
]];

FiveItt[x98_, cc5_] :=
If[x98 == 1, 1,
FromDigits[Append[Table[1, {ft, x98 - 1}], 0], cc5]];

BCCLog[x22_, y22_] :=
Catch[Module[{s21 = x22, t22 = Length[IntegerDigits[x22, y22]]},
If[FiveItt[t22, y22] > s21, t22 = t22 - 1];
Throw[t22];
]];
T2xy[x_, y_] := ((x + y) (x + y - 1))/2 - y + 1;

Fifty[tas_, ras_] :=
Catch[Module[{tar = tas, rar = ras, leng1, fvar1, fvar2, fvar3},
fvar1 = Prime[rar];
fvar2 = Length[IntegerDigits[tar, fvar1]];
fvar3 = FiveItt[fvar2, fvar1];
If[fvar3 > tar, fvar2 = fvar2 - 1];
fvar3 = IntegerQ[Mod[(FiveItt[fvar2, fvar1] + tar), tar]/fvar2];
Throw[fvar3];
]];

Test10[aa7_, aa8_] :=
Catch[Module[{zz7 = aa7, zz8 = aa8, zz9 = T2xy[aa8, aa7],
zz10 = T2xy[aa7, aa8]},
Throw[{JacobiSymbol[zz7, zz10], JacobiSymbol[zz7, zz9],
JacobiSymbol[zz10, zz7], JacobiSymbol[zz9, zz7]}]]];

Test11[r56_, r58_] :=
Catch[Module[{x57 = r56, x58 = r58, x51, x52, d43, d44},
d44 = Prime[x58];
x51 = Length[IntegerDigits[x57, d44]];
x52 = FiveItt[x51, d44];
If[x52 > x57, x51 = x51 - 1];
d43 =
Flatten[Table[Test10[x57, r57*x51], {r57, x57, x57 + d44}]];

Throw[d43];
]];

MiniTest[y44_] :=
Catch[Module[{y45 = y44, y67 = T2xy[y44 + 5, y44],
y68 = T2xy[y44, y44 + 5]},
Throw[{JacobiSymbol[y67, y45], JacobiSymbol[y68, y45],
JacobiSymbol[y45, y67], JacobiSymbol[y45, y68]}]]];

Test14[t13_, t16_] := Catch[Module[{t14 = t13, Data12, t15 = t16},
Data12 = Test11[t14, t15];
Total[{Count[Data12, 1], Count[Data12, -1]}]

]];

PrimeQPW[hh3_] := Catch[Module[
{aa3, aa4 = hh3, aa5, aa6, aa7, aa8, aa9, a10, a11, a12, a13, a14,
a15, a16, aam},
aa5 = 1;

Label["Whittle"];
If[aa4 == Prime[aa5] || aa4 == Prime[aa5 + 1] ||
aa4 == Prime[aa5 + 2], Throw[True]; Break[];];
If[aa5 >= 25, aa5 = 1; Goto["Whittle2"] ;, aa5 = aa5 + 3;
Goto["Whittle"];];

Label["Whittle2"];
If[IntegerQ[aa4/Prime[aa5]] == True ||
IntegerQ[aa4/Prime[aa5 + 1]] == True ||
IntegerQ[aa4/Prime[aa5 + 2]] == True, Throw[False]; Break[];];
If[aa5 >= 25, aa5 = 1; Goto["NextStep"] ;, aa5 = aa5 + 3;
Goto["Whittle2"];];

Label["NextStep"];
If[aa4 < Prime[25]^2, Throw[True]; Break[];];
aa8 = Test14[aa4^2, 5];
If[aa8 == 48, aa6 = 1; aa3 = {1};];
If[aa8 == 46, aa3 = {1}; aa6 = 2;];
If[aa6 == 1 || aa6 == 2, Goto["NextStep2"];];
Goto["FalseEnd"];

Label["NextStep2"];
aa3 = Append[aa3, Test14[aa4*Prime[aa5], 5]];
aa5++;
If[aa5 > 5, aa5 = 1;
If[aa6 == 1, Goto["CheckRecords"];, Goto["CheckRecords2"];];,
Goto["NextStep2"];];

Label["CheckRecords"];
aa3 = Drop[aa3, 1];
If[aa3 == {0, 32, 40, 36, 40} , aa6 = 0; Goto["CheckPoint"];];
If[aa3 == {24, 48, 38, 40, 40}, aa6 = 1; Goto["CheckPoint"]; ];
If[aa3 == {24, 32, 40, 36, 40}, aa6 = 2; Goto["CheckPoint"];];
If[aa3 == {24, 48, 40, 36, 40}, aa6 = 3; Goto["CheckPoint"];];
If[aa3 == {24, 48, 40, 40, 40}, aa6 = 4; Goto["CheckPoint"];];
If[aa3 == {24, 46, 38, 38, 38}, aa6 = 5; Goto["CheckPoint"];];
If[aa3 == {22, 46, 38, 36, 40}, aa6 = 6; Goto["CheckPoint"];];
If[aa3 == {22, 46, 38, 34, 38}, aa6 = 7; Goto["CheckPoint"];];
If[aa3 == {24, 48, 38, 34, 38}, aa6 = 8; Goto["CheckPoint"];];
If[aa3 == {0, 30, 38, 34, 38}, aa6 = 9; Goto["CheckPoint"];];
If[aa3 == {0, 32, 40, 40, 40}, aa6 = 10; Goto["CheckPoint"];];
If[aa3 == {0, 32, 48, 40, 40}, aa6 = 11; Goto["CheckPoint"];];
If[aa3 == {24, 32, 48, 40, 40}, aa6 = 12; Goto["CheckPoint"];];
If[aa3 == {24, 32, 40, 40, 40}, aa6 = 13; Goto["CheckPoint"];];
If[aa3 == {24, 48, 38, 36, 48}, aa6 = 20; Goto["CheckPoint"];];
If[aa3 == {0, 48, 38, 36, 40}, aa6 = 21; Goto["CheckPoint"];];
If[aa3 == {24, 32, 38, 40, 40}, aa6 = 22; Goto["CheckPoint"];];
If[aa3 == {0, 32, 38, 40, 40}, aa6 = 23; Goto["CheckPoint"];];
If[aa3 == {24, 32, 38, 36, 40}, aa6 = 24; Goto["CheckPoint"];];
If[aa3 == {24, 48, 48, 36, 40}, aa6 = 25; Goto["CheckPoint"];];
If[aa3 == {24, 32, 48, 48, 40}, aa6 = 26; Goto["CheckPoint"];];
If[aa3 == {24, 32, 40, 48, 40}, aa6 = 27; Goto["CheckPoint"];];
If[aa3 == {0, 32, 40, 48, 40}, aa6 = 28; Goto["CheckPoint"];];
If[aa3 == {0, 48, 38, 40, 40}, aa6 = 29; Goto["CheckPoint"];];
If[aa3 == {24, 32, 38, 48, 40}, aa6 = 30; Goto["CheckPoint"];];

Goto["FalseEnd"];

Label["CheckRecords2"];
aa3 = Drop[aa3, 1];
If[aa3 == {24, 48, 40, 40, 38}, aa6 = 14; Goto["CheckPoint"];];
If[aa3 == {24, 48, 40, 36, 40}, aa6 = 15; Goto["CheckPoint"];];
If[aa3 == {24, 48, 40, 40, 40}, aa6 = 16; Goto["CheckPoint"];];
If[aa3 == {24, 30, 38, 34, 38}, aa6 = 17; Goto["CheckPoint"];];
If[aa3 == {0, 32, 40, 36, 40}, aa6 = 18; Goto["CheckPoint"];];
If[aa3 == {0, 32, 40, 40, 40}, aa6 = 19; Goto["CheckPoint"];];
Goto["FalseEnd"];

Label["CheckPoint"];
aa5 = {{Mod[aa4, 3], Mod[aa4, 5]}, {Mod[aa4, 7], Mod[aa4, 11]}};
aa7 = MiniTest[aa4];
aa9 = {Fifty[aa4, 1], Fifty[aa4, 2], Fifty[aa4, 3], Fifty[aa4, 4],
Fifty[aa4, 5]};
a10 = Floor[Total[aa3]/5];
a11 = GatherBy[Flatten[aa5], OddQ];
If[Length[a11] == 1,
If[AnyTrue[a11[[1]], OddQ] == True, a12 = {4, 0};,
a12 = {0, 4};],
If[AnyTrue[a11[[1]], OddQ] == True,
a12 = {Length[a11[[1]]], Length[a11[[2]]]};,
a12 = {Length[a11[[2]]], Length[a11[[1]]]};];];
a11 = {GatherBy[aa5[[1]], OddQ], GatherBy[aa5[[2]], OddQ]};
If[Length[a11[[1]]] == 1,
If[EvenQ[Flatten[a11[[1]]][[1]]] == True, a13 = {0, 2};,
a13 = {2, 0};];, a13 = {1, 1};];
If[Length[a11[[2]]] == 1,
If[EvenQ[Flatten[a11[[2]]][[1]]] == True, a14 = {0, 2};,
a14 = {2, 0};];, a14 = {1, 1};];
a11 = {a13, a14};
a12 = Append[{a12}, {a13, a14}];
a11 = GatherBy[Flatten[aa5], PrimeQ];
If[Length[a11] == 1,
If[AnyTrue[a11[[1]], PrimeQ] == True, a13 = 4, a13 = 0];,
If[AnyTrue[a11[[1]], PrimeQ] == True, a13 = Length[a11[[1]]];,
a13 = Length[a11[[2]]]];];
a14 = Count[Flatten[aa5], 1];
a15 = Count[Flatten[aa5], 2];
a12 = Append[a12, {a13, a14, a15}];
aam = {0};
If[aa7 == {1, 1, 1, 1}, Goto["Check1111"];];
Goto["CheckPoint2a"];

Label["CheckPoint2a"];
Throw["2"]; Break[];

Label["Check1111"];
If[IntegerQ[Sqrt[aa4]] == True, Throw[False]; Break[];];
If[aa9 == {True, False, False, False, False},
Goto["1111abbbb"];];
If[aa9 == {False, False, False, True, True}, Goto["1111bbbaa"];];
If[aa9 == {False, False, True, False, True}, Goto["1111bbaba"];];
If[aa9 == {False, True, True, False, True}, Goto["1111baaba"];];
If[aa9 == {False, False, True, False, False},
Goto["1111bbabb"];];
If[aa9 == {False, True, False, False, True}, Goto["1111babba"];];
If[aa9 == {False, True, False, True, True}, Goto["1111babaa"];];
If[aa9 == {False, False, False, True, False},
Goto["1111bbbab"];];
If[aa9 == {True, False, False, True, False}, Goto["1111abbab"];];
If[aa9 == {False, False, False, False, False}, Goto["1111bbbbb"];];
If[aa9 == {False, True, False, False, False},
Goto["1111babbb"];];
If[aa9 == {True, False, False, False, True}, Goto["1111abbba"];];
Goto["CheckPoint2a"];

Label["1111abbbb"];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {4, 0, 1}},
aam = Append[aam, 2]];
If[a12 == {{1, 3}, {{1, 1}, {0, 2}}, {1, 1, 1}},
aam = Append[aam, 1]];
Label["1111abbbbS2"];
Throw[{a12, aam}]; Break[];

Label["1111bbbaa"];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {2, 1, 0}},
aam = Append[aam, 2]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {4, 0, 2}},
aam = Append[aam, 2]];
If[a12 == {{1, 3}, {{1, 1}, {0, 2}}, {1, 1, 1}},
aam = Append[aam, 2]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {2, 1, 1}},
aam = Append[aam, 2]];
If[a12 == {{0, 4}, {{0, 2}, {0, 2}}, {1, 0, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {3, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {4, 0, 1}},
aam = Append[aam, 1]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {3, 1, 3}},
aam = Append[aam, 1]];
If[a12 == {{4, 0}, {{2, 0}, {2, 0}}, {1, 2, 0}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {1, 2, 0}},
aam = Append[aam, 1]];
Label["1111bbbaaS2"];
Throw[{a12, aam}]; Break[];

Label["1111bbaba"];
If[a12 == {{2, 2}, {{0, 2}, {2, 0}}, {4, 0, 2}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {2, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{0, 2}, {2, 0}}, {2, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {2, 1, 0}},
aam = Append[aam, 1]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {2, 0, 1}},
aam = Append[aam, 2]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {2, 1, 1}},
aam = Append[aam, 2]];
Label["1111bbabaS2"];
Throw[{a12, aam}]; Break[];

Label["1111baaba"];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {2, 0, 2}},
aam = Append[aam, 1]];
Label["1111baabaS2"];
Throw[{a12, aam}]; Break[];

Label["1111bbabb"];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {2, 2, 1}},
aam = Append[aam, 1]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {1, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {3, 1, 2}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {2, 2, 1}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {1, 2, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {3, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {1, 2, 0}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{0, 2}, {2, 0}}, {3, 0, 1}},
aam = Append[aam, 1]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {3, 0, 2}},
aam = Append[aam, 1]];
If[a12 == {{1, 3}, {{1, 1}, {0, 2}}, {1, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {1, 1, 0}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {4, 0, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {1, 2, 0}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {2, 1, 1}},
aam = Append[aam, 1]];
Label["1111bbabbS2"];
Throw[{a12, aam}]; Break[];

Label["1111babba"];
If[a12 == {{4, 0}, {{2, 0}, {2, 0}}, {1, 3, 0}},
aam = Append[aam, 2]];
If[a12 == {{2, 2}, {{2, 0}, {0, 2}}, {0, 2, 0}},
aam = Append[aam, 2]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {3, 0, 1}},
aam = Append[aam, 2]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {3, 1, 1}},
aam = Append[aam, 2]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {2, 0, 1}},
aam = Append[aam, 2]];
If[a12 == {{0, 4}, {{0, 2}, {0, 2}}, {2, 0, 2}},
aam = Append[aam, 2]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {4, 0, 3}},
aam = Append[aam, 2]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {1, 2, 0}},
aam = Append[aam, 2]];
If[a12 == {{4, 0}, {{2, 0}, {2, 0}}, {1, 2, 0}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {2, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {2, 2, 1}},
aam = Append[aam, 1]];
If[a12 == {{4, 0}, {{2, 0}, {2, 0}}, {2, 1, 0}},
aam = Append[aam, 1]];
Label["1111babbaS2"];
Throw[{a12, aam}]; Break[];

Label["1111babaa"];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {1, 1, 0}},
aam = Append[aam, 2]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {3, 0, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {2, 2, 1}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{0, 2}, {2, 0}}, {4, 0, 2}},
aam = Append[aam, 1]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {1, 1, 1}},
aam = Append[aam, 1]];
Label["1111babaaS2"];
Throw[{a12, aam}]; Break[];

Label["1111bbbab"];
If[a12 == {{0, 4}, {{0, 2}, {0, 2}}, {2, 0, 2}},
aam = Append[aam, 2]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {1, 2, 0}},
aam = Append[aam, 2]];
Label["1111bbbabS2"];
Throw[{a12, aam}]; Break[];

Label["1111abbab"];
If[a12 == {{4, 0}, {{2, 0}, {2, 0}}, {1, 2, 0}},
aam = Append[aam, 2]];
Label["1111abbabS2"];
Throw[{a12, aam}]; Break[];

Label["1111bbbbb"];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {2, 0, 1}},
aam = Append[aam, 2]];
If[a12 == {{2, 2}, {{0, 2}, {2, 0}}, {4, 0, 2}},
aam = Append[aam, 1]];
If[a12 == {{1, 3}, {{0, 2}, {1, 1}}, {1, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{2, 2}, {{1, 1}, {1, 1}}, {2, 1, 1}},
aam = Append[aam, 1]];
If[a12 == {{0, 4}, {{0, 2}, {0, 2}}, {2, 0, 2}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {1, 2, 0}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {2, 2, 1}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {3, 1, 1}},
aam = Append[aam, 1]];
Label["1111bbbbbS2"];
Throw[{a12, aam}]; Break[];

Label["1111babbb"];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {2, 1, 0}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {1, 2, 0}},
aam = Append[aam, 1]];
If[a12 == {{3, 1}, {{1, 1}, {2, 0}}, {3, 1, 1}},
aam = Append[aam, 1]];
Label["1111babbbS2"];
Throw[{a12, aam}]; Break[];

Label["1111abbba"];
If[a12 == {{3, 1}, {{2, 0}, {1, 1}}, {2, 1, 0}},
aam = Append[aam, 1]];
Label["1111abbbaS2"];
Throw[{a12, aam}]; Break[];

Label["CheckIfTrue"];

Label["FalseEnd"];
Throw["1"];
]];

Details[ww5_, ww6_] :=
Column[{{Mod[ww5, 3], Mod[ww5, 5], Mod[ww5, 7],
Mod[ww5, 11]}, {Test14[ww5^2, ww6], Test14[ww5 2, ww6],
Test14[ww5 3, ww6], Test14[ww5 5, ww6], Test14[ww5 7, ww6],
Test14[ww5 11, ww6]},
MiniTest[ww5], {Fifty[ww5, 1], Fifty[ww5, 2], Fifty[ww5, 3],
Fifty[ww5, 4], Fifty[ww5, 5]}}];

Details[2^57885161 - 1, 5]
 
  • #12
I thought I would/should move to number maps for factorisation. Watch how much it dip's each Number compared to the previous number on the map.Px[x_] :=
x - 1/2 Floor[
1/2 (-1 + Sqrt[-7 + 8 x])] (1 + Floor[1/2 (-1 + Sqrt[-7 + 8 x])]);

Py[x_] :=
1/2 (2 - 2 x + Ceiling[1/2 (-1 + Sqrt[1 + 8 x])] +
Ceiling[1/2 (-1 + Sqrt[1 + 8 x])]^2);

Pxy[x_, y_] := ((x + y) (x + y - 1))/2 - y + 1;

EItt[x2a_, y2a_, z2a_] :=
FromDigits[
Flatten[Append[Table[1, {t, y2a - z2a}], Table[0, {t2, z2a}]]],
x2a];

{BCCLog Instead of ELog}

mod311[cu_] := Catch[Module[{cz = cu, z1, zz, zz1},
zz = Px[cz];
zz1 = Py[cz];
If[OddQ[zz] == True && EvenQ[zz1] == True ||
OddQ[zz] == True && EvenQ[zz1] == True, z1 = zz + zz1;];
If[OddQ[zz] == True && OddQ[zz1] == True, z1 = zz*zz1;,
z1 = zz*zz1 - 1;];
Throw[z1];
]];
Quota[k2_] :=
Catch[Module[{k22 = k2, esta, esta2, esta3, esta4, esta5, esta5b,
trip, tt, eset = 0},
esta2 = Floor[Sqrt[k22]];
trip = 0;
esta3 = 1;
tt = 2;

Label["andbang"];
esta =
Quotient[
Pxy[k22,
Px[k22] + Py[k22]], (3 + Mod[k22, 2] + Mod[k22, 3]) BCCLog[k22,
tt]];
If[OddQ[esta] == True, esta = esta + 1];
Goto["Start"];

Label["Start"];
If[IntegerQ[esta/3], eset = 1;, eset = 2;];
esta =
esta/2^IntegerExponent[esta, 2]/3^IntegerExponent[esta, 3]/
5^IntegerExponent[esta, 5];
If[esta <= esta2, Goto["Stage2"];,
If[eset == 1, esta = esta - (mod311[esta] - 16);,
esta = esta - (mod311[esta] - 2);]; Goto["Start"];];

Label["Stage2"];
If[PrimeQ[esta] == True, trip = (E (trip + E^2))];
If[esta <= 11, Goto["Stage3"];];
If[Length[esta3] != 0,
esta3 = Append[esta3, {esta, Floor[trip/ 5]}];
If[eset == 1, esta = esta - (mod311[esta] - 16);,
esta = esta - (mod311[esta] - 2);]; Goto["Start"];,
esta3 = {esta , Floor[trip/5]};];
If[eset == 1, esta = esta - (mod311[esta] - 16);,
esta = esta - (mod311[esta] - 2);]; Goto["Start"];
Goto["End2"];

Label["Stage3"];
If[tt >= 5, esta4 = Append[esta4, esta3]; Goto["End1"];, trip = 0;
If[tt == 2, tt = 3;, tt = NextPrime[tt + 1];];
If[tt == 3, esta4 = {esta3};, esta4 = Append[esta4, esta3];];
esta3 = 1; Goto["andbang"];];

Label["End1"];
esta4 = Floor[esta4];
Throw[esta4];
Break[];

Label["End2"];
Throw[{"Don't Know Why", esta3, esta}];
]];
Stats[zxc_] := {Quota[zxc], Quota[zxc 2], Quota[zxc 3]};

SeeMap[tt15_] :=
Catch[Module[{tm4 = tt15, ratta, ratta2 = 1, ratta3 = 1, god = 1,
raster = 1, devil = 1, ttin = 0, ttin2 = 0, ttin3, ttin4},
ratta = Sort[DeleteDuplicates[Flatten[Stats[tm4]]]];
ttin3 = E*1.06;
ttin4 = Length[ratta];
ratta3 = GatherBy[ratta, OddQ];
If[PrimeQ[ratta3[[1]][[1]]], ratta3 = ratta3[[1]],
If[Length[ratta3] >= 2, ratta3 = ratta3[[2]], ratta3 = {0}];];
raster = Floor[Sqrt[tm4]];
god = Quantile[ratta, 3/4];
devil = Quantile[ratta, 1/2];
Label["Bottom"];
ttin++;
ratta2 = Quantile[ratta, 1/4];
If[ttin >= ttin4, Goto["fst"];, Goto["Bottom"]];
Label["fst"];
Throw[
Throw[{{god, devil, ratta2, ttin4, raster}, {god - raster,
Floor[(god)/(ratta2 + 1)], devil ttin4}, ratta3}]]

]];

seeMap[NextPrime[30^100] NextPrime[30^101]]
 
Last edited:

Similar threads

  • · Replies 19 ·
Replies
19
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
2K
  • · Replies 15 ·
Replies
15
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
3
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K