Question: How to find “almost Carmichael” numbers

n is a Carmichael number iff for every prime factor p of n, p-1/n-1.

Question: How to find odd squarefree composite numbers n having k distinct prime divisors, and the property that exactly k-1 prime divisors satisfy the Carmichael requirement, p-1/n-1 ?

Examples: 231,1045,1635. In these cases k=3 and the prime divisors satisfying the criteria are the greatest and smallest. I have a code for this but would like to compute the general case, where the criteria is satisfied for precisely any k-1 divisors.

Any assistance greatly appreciated.

David. 

 

Please Wait...