I am currently working on creating a dataset of prime and composite numbers to run against 100 random witnesses using the Miller-Rabin primality test. However, the results I have obtained so far are consistent with the correct answers: i.e., if a number is prime, all iterations return prime, and if a number is composite, all return composite. There are no false positives in my results.
To make my dataset more comprehensive, I would like to introduce some false positives. In particular, I am looking for an algorithm that, given a composite number can generate
random witnesses such that
is a strong pseudoprime to all of them. Alternatively, I am interested in an algorithm that, given a set
of witnesses, can produce a composite number
such that
is a strong pseudoprime to all elements in .
Additionally, I would like to know if there is an algorithm that can generate Carmichael numbers randomly, or a method for producing large Carmichael numbers. This would further help diversify my dataset, especially with composite numbers that may pass multiple primality tests.
Constraints: The data I am working with is within the range 2^64 - to 2^2048. I need to generate 50,000 records that contain false positives. My dataset is structured as follows: 1 column listing the number. 100 columns listing the random witnesses for that number. 1 additional column indicating whether the number is prime (using the Elliptic Curve Primality Proving (ECPP) test). I have reviewed a few papers related to these topics but have not come across a solution that fits my requirements. Any guidance on generating such numbers or references to relevant algorithms would be greatly appreciated!