Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Created February 24, 2026 20:42
Show Gist options
  • Select an option

  • Save Hermann-SW/2d8dbe86f105bd0b5bfdacf51ed98f3e to your computer and use it in GitHub Desktop.

Select an option

Save Hermann-SW/2d8dbe86f105bd0b5bfdacf51ed98f3e to your computer and use it in GitHub Desktop.
@neptune's largest known 96,522 decimal digits 3-Carmichael number, with single random base verification
\\ @Neptune's largest known 3-Carmichael number (96522 decimal digits):
\\ https://www.mersenneforum.org/node/22080/page3#post1066763
p = 3*(5752211*43#/2-1)^1069/2+1;
q = 3*(5752211*43#/2-1)^1069+1;
r = 3*((5752211*43#/2-1)^1069+(5752211*43#/2-1)^2138)/1050650772710+1;
n = p*q*r;
print(#digits(n));
n1 = (n-1)/gcd(n-1,p-1);
n2 = n1/gcd(n1,q-1);
n3 = n2/gcd(n2,r-1);
print(#digits(n3));
expr="lift(Mod(2+random(),n)^(n-1))";
gettime();
print(eval(expr));
print("took "gettime()"ms to compute "expr);
@Hermann-SW
Copy link
Author

hermann@7950x:~$ time gp -q < 96522.gp
96522
48267
1
took 481803ms to compute lift(Mod(2+random(),n)^(n-1))

real	8m5.826s
user	8m1.829s
sys	0m3.969s
hermann@7950x:~$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment