Ask Your Question

Revision history [back]

From Pari to SAGE



forprime(q=1,10^7,z=select(m->f(m,q)==0,v);if(length(z)>0,v=setminus(v,z);print(‌​q," ",length(z)," ",length(v))))

This is a program for PARI. For numbers of the form (2^k-1)*10^d+2^(k-1)-1 where d is the number of decimal digits of 2^(k-1)-1 in the range k=[100000..101000], it displays numbers with no factor below 10^7. Can somebody translate this PARI program in a SAGE program?