View Single Post
Old 2021-01-13, 07:53   #9
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

37348 Posts
Default

While the concept does not apply to Mersenne numbers since
valuation(Mn,2)==1

It does apply to Fermat numbers greater than F0.

The following code will find the 1st (a, b) pair for Fermat numbers greater than F0 virtually-instantly:

Code:
for(n=1,9,{
    fermatNumber = 2^(2^n)+1;
    print("\nfermatNumber = ",fermatNumber );
    a = sqrtint(fermatNumber -1);print("a = ",a );
    b=fermatNumber -a;;print("b = ",b );
    m=lift(Mod(a*b,fermatNumber ););
    print("F",n," >>-->> m = ",m);
})
Output:

Code:
fermatNumber = 5
a = 2
b = 3
F1 >>-->> m = 1

fermatNumber = 17
a = 4
b = 13
F2 >>-->> m = 1

fermatNumber = 257
a = 16
b = 241
F3 >>-->> m = 1

fermatNumber = 65537
a = 256
b = 65281
F4 >>-->> m = 1

fermatNumber = 4294967297
a = 65536
b = 4294901761
F5 >>-->> m = 1

fermatNumber = 18446744073709551617
a = 4294967296
b = 18446744069414584321
F6 >>-->> m = 1

fermatNumber = 340282366920938463463374607431768211457
a = 18446744073709551616
b = 340282366920938463444927863358058659841
F7 >>-->> m = 1

fermatNumber = 115792089237316195423570985008687907853269984665640564039457584007913129639937
a = 340282366920938463463374607431768211456
b = 115792089237316195423570985008687907852929702298719625575994209400481361428481
F8 >>-->> m = 1

fermatNumber = 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084097
a = 115792089237316195423570985008687907853269984665640564039457584007913129639936
b = 13407807929942597099574024998205846127479365820592393377723561443721764030073431184712636981971479856705023170278632780869088242247907112362425735876444161
F9 >>-->> m = 1
For F1 to F4 there are no other positive integer pairs (a, b) other than listed.
For F5 however there is a 2nd pair:


Code:
\\DTC-120-A From Rashid Naimi - 1/13/2321 BC

F5 = 2^(2^5)+1
a = 46837383
b = F5-a
(a*b-1)/F5
Output:

Code:
(02:48) gp > F5 = 2^(2^5)+1
%31 = 4294967297
(02:48) gp > a = 46837383
%32 = 46837383
(02:48) gp > b = F5-a
%33 = 4248129914
(02:48) gp > (a*b-1)/F5
%34 = 46326613
Unfortunately I have no clue how to find the secondary (a, b) pairs without Bruce-Lee Brute-Force.

Thank you for your time.
a1call is offline   Reply With Quote