A quick definition of a Carmicheal number:
A composite integer $n$ such that all integers $a$ relatively prime to $n$, it is true that $a^{n-1}$ $=$ $1$ $\pmod n$ (Composite numbers satisfying Fermat's Little Theorem whenever $\gcd(a, n$) $=$ $1$))
I am trying to construct a Carmichael number from scratch using algorithm C from here on page 825. Reference:
(Copied directly)
Algorithm C C1 [Start]. Choose an appropriate product of prime powers $\Lambda \leftarrow q_1^{h1} q_2^{h2} ...q_r^{hr}$ (with $q_1 = 2$ and $hj > 0$ for all $j$).
C2 [Combine qj ]. Build all p(α1, α2,...,αr) $\leftarrow 2^{α1} q_2^α2 q_r^{αr} +1$ with $1 ≤ α1 ≤ h1$ and $0 ≤ αj ≤ hj$ for $j > 1$.
C3 [Collect admissible factors]. Put all p(α1, α2,...,αr), if they are prime and different from every qj , j = 2, 3,...,r, into the set S. If Λ + 1 ∈ S, set S←S $\backslash$ {Λ+1}. [In this case, every Carmichael number with λ(N)=Λ found by the algorithm can be multiplied by Λ+1 to give another Carmichael number, see property (b).] Build $s ← (Q_p ∈ S_p) \bmod Λ$. If s = 1, set T ← ∅ and continue with C5.
C4 [Find T ]. Find a set T ⊂S with Q p∈T p ≡ s (mod Λ). C5 [Construct Carmichael number]. Now N = Y p∈SrT p is a Carmichael number.
I started with the product: $2^2*3*5*11*17*31*59*61$ $=$ $1251804180$ $=$ $P-1$. Now let $2^2*3*5*11*17*31*59*61+1$ $=$ $1251804181$ $=$ $P$ is a prime. I am confused at step two since the only prime factors in the subset $S$ are $P$ and those dividing $P-1$. Can someone help finish the construction. Thanks in advance.
I am unsure weather $P$ | $N$ where $N$ is our resulting Carmicheal number. I know from reading the .pdf file that when $q$ and $nq+1$ are primes, a Carmicheal number is never divisible by both $q$ and $nq+1$. So if $N$ | $P$ then $N\nmid (2, 3, 5, 11, 17, 31, 59, 61)$.
Despite the post earlier, I chose 6 of 62 of the primes found by Joffan:
$D$ $=$ $4013*158357*241429*310931*347821*624031$ $=$ $290539349$ $\pmod {1251804180}$.
The modulo inverse of $D$ is $895667609$. Therefore finding a number $B$ with the 62 primes factors coprime to $D$ congruent to $895667609$ $\pmod {1251804180}$, $BD$ should result in a Carmichael number. Substantially adding prime factors to these gives me a $1$ in $1.25*10^9$ chance of a Carmichael number occuring.
What about choosing other sets, say $2^5*3*5*7*73*3084468319$ = $756558389284320$ $=$ $Λ$. $13*29*41*43*71*113*337*421$ $=$ $756558389284321$ = $Λ + 1$ is not prime, however it is a Carmichael number. Would that still give me the the additional Carmichael number, $p$($Λ + 1$) for every Carmichael number $p$ I construct with the set $2^5*3*5*7*73*3084468319$ $756558389284320$ $=$ $Λ$?
Woah, where did $P$ spring from? $2^2*3*5*11*17*31*59*61$ $=$ $1251804180$ $= \Lambda$.
Now the candidate prime set is formed by taking every even factor of $\Lambda$ and adding one; if this value is prime, it is added to the candidate prime set.
This is not essential to the method. You can ignore $\Lambda+1$ - whether it is prime or not makes no difference to the method or the potential for success in constructing a Carmichael number. If it happens that $\Lambda+1$ is prime, then any Carmichael numbers $c_j$ that you generate have a "free" additional Carmichael number, $(\Lambda+1)c_j$
There are $62$ primes in the candidate set for your starting product:
$$\{ 7,13,23,67,103,311,331,367,373,661,683,709,733,1021,1123,1181,1831,1861,1871,3163,3541,3659,4013,4027,4093,6491,7789,8053,12037,13421,18911,19471,22067,23189,30091,41603,43189,56731,68443,107971,109741,158357,192883,241429,244733,310931,342211,347821,395891,624031,734197,1248061,1928821,2231381,2375341,3536171,3670981,4038079,4104277,6840461,8076157,250360837 \}$$