# A routine for testing a conjecture

The ec numbers are so defined:
ec(k)=(2^k-1)*10^d+2^(k-1)-1, where d is the number of decimal digits of 2^(k-1)-1. In other words these numbers are formed by the base 10 concatenation of two consecutive Mersenne numbers, for example: 157, 12763, 40952047...
For some values of k, ec(k) is prime. I found that up to k=565.000 there is no prime of the form (2^k-1)*10^d+2^(k-1)-1 which is congruent to 6 mod 7. So I conjectured that there is no prime of this form congruent to 6 mod 7. Has somebody an efficient program for Sage to test this conjecture further?

I guess you can just program it to create these numbers (and probably can use a string concatenation to do so more efficiently than multiplication?). But without some extra theory helping reduce the primality testing like we have for Mersenne numbers, it might be hard to make a test that was "efficient" in the sense you probably mean.

Also posted at https://stackoverflow.com/questions/5...