Close

More candidates and 741454

A project log for PEAC Pisano with End-Around Carry algorithm

Add X to Y and Y to X, says the song. And carry on.

yann-guidon-ygdesYann Guidon / YGDES 05/10/2023 at 18:150 Comments

After the fiasco of w32 (see the last log 154. w32 "Just in case"), there are still a lot of moduli to explore, in particular with the square root family.

$ for i in $(seq 25 2 127); do echo -n '2^('$i"/2) = "; n=$(echo 'sqrt(2^'$i')' |bc); ./sieve_out $n f ; done |grep OK |tee sqrt2.txt
2^(29/2) = 23170 :  OK (known perfect)
2^(33/2) = 92681 :  OK (not P or M)
2^(45/2) = 5931641 :  OK   (15231323470 in 20s)
2^(49/2) = 23726566 :  OK  (6545928300254 only, in 3h)
2^(59/2) = 759250124 :  OK
2^(77/2) = 388736063996 :  OK
2^(93/2) = 99516432383215 :  OK
2^(97/2) = 398065729532860 :  OK
2^(107/2) = 12738103345051545 :  OK
2^(113/2) = 101904826760412361 :  OK
2^(121/2) = 1630477228166597776 :  OK
2^(125/2) = 6521908912666391106 :  OK

Not a great choice though. Let's try with an offset:

for i in $(seq 25 2 127); do
  echo -n '2^('$i"/2)-1 = "
  n=$(echo 'sqrt(2^'$i')-1' |bc)
  ./sieve_out $n f
done |grep OK |tee sqrt2-1.txt
2^(27/2)-1 = 11584 :  OK (not Perfect or maximal)
2^(33/2)-1 = 92680 :  OK  (not Perfect or maximal)
2^(37/2)-1 = 370726 :  OK  (not perfect or maximal)
2^(39/2)-1 = 741454 :  OK proved perfect !
2^(49/2)-1 = 23726565 :  OK (977239131552 only)
2^(65/2)-1 = 6074000998 :  OK   5189739603 only :-(
2^(69/2)-1 = 24296003998 :  OK   4549760445 only :-(
2^(71/2)-1 = 48592007998 :  OK  220895715381 only
2^(77/2)-1 = 388736063995 :  OK (222304372407 only)
2^(83/2)-1 = 3109888511974 :  OK
2^(87/2)-1 = 12439554047900 :  OK
2^(93/2)-1 = 99516432383214 :  OK
2^(111/2)-1 = 50952413380206179 :  OK
2^(125/2)-1 = 6521908912666391105 :  OK
2^(127/2)-1 = 13043817825332782211 :  OK
[yg@localhost gPEAC_500K]$ grep 370726 gPEAC.000002-509965.txt 
(nothing)
[yg@localhost gPEAC_500K]$ grep 92680 gPEAC.000002-509965.txt
3392680
[yg@localhost gPEAC_500K]$ grep 11584 gPEAC.000002-509965.txt 
115841

I'm scanning 741454 right now....

[yg@localhost gPEAC_500K]$ nice -n 90 /usr/bin/time ./gPEAC_scan 741454 741454 f
741454(274877387784)=274877391679 P
1 candidates among 1 numbers (100.00000%)
1 hits among 1 candidates (100.00000%)
489.76user 0.10system 8:12.40elapsed 99%CPU 

YESSSS At least good news :-)
741454 (10110101000001001110) is thus suitable for a 39-bit hash using a pair of 20-bit registers. Its orbit has a length of 549754775568 (111111111111111111100000010100000010000 in binary)
It is suitable for hashing 2 bytes at once with quite a lot of headroom against collisions and aggression. It's a direct upgrade to PEAC16x2 !

.

.

Discussions