View Single Post
Old 2021-03-21, 10:47   #1006
garambois
 
garambois's Avatar
 
"Garambois Jean-Luc"
Oct 2011
France

24·43 Posts
Default

Quote:
Originally Posted by Happy5214 View Post
I went ahead and adapted aliqueit for this purpose. It's a simple C++/GMP program attached here. Compile it with:

Code:
g++ -O2 -o powerAbundance powerAbundance.cc -lgmp -lgmpxx
(I can't remember if the gmpxx is strictly needed, but I used it.) Just pass it the base and the exponent range, along with an optional skip (i.e. interval) amount. On my Kubuntu Focus laptop, it validates the abundance of 30^55440 in just under 5 seconds and the deficiency of 30^161280 in a touch over a minute.

Quote:
Originally Posted by EdH View Post
If it isn't too much to ask, could you attach your Python script. I might like to see if I can create a C version.

Thanks!

I managed to get your program to work.

The abundance of 30^55440 is validated in 22 seconds on my computer with the program in C. (Very old CPU from 2011).
The validation is almost instantaneous with my python program.
For base 30, testing all even exponents from 2 to 10,000 takes 6 minutes 30 seconds with the C program and 55 seconds with my python program.

I'm sorry I don't know what's going on.
I know the C should be a lot faster.
Moreover, I cannot understand the program in C !

Please find in attached file my program in python.
I tried to comment on it to make it clearer.
I hope my comments will be enough for you ...
Attached Files
File Type: gz bid_even_en.sage.tar.gz (1.4 KB, 46 views)
garambois is offline   Reply With Quote