## 5.1.19

### Complimentary Primes

Definition: Complimentary primes are prime integers p such that 2k/2 mod p = p-1 where k is the order of 2 mod p.

Example: Let p = 43. It can be verified  that k = 14 since 214 mod 43 = 1 and 14 is the smallest such integer so 14 is the order of 2 mod 43. Since 27 mod 43 = 42 then 43 is a complimentary prime. Verified result

The first few complimentary primes are 5,11,13,17,19,29,37,41,43,53,59,61,67,83,97,101.

This is a sequence documented in oeis.org (more or less) as the sequence of primes p where the order of 2 mod p is even. What isn't documented there and what I find special about complimentary primes is the following conjecture that I made:

Conjecture: If p is a complimentary prime and k is the order of 2 mod p then
(2i (mod p)) + (2(k/2)+i(mod p)) = p for all i greater or equal to 0

Example: Let p = 43. Since k is the order of 2 and k = 14, then k/2 = 7
20 mod 43 = 1  and  27 mod 43 = 42,
21 mod 43 = 2 and 28 mod 43 = 41,
22 mod 43 = 4 and 29 mod 43 = 39
23 mod 43 = 8 and 210 mod 43 = 35,
24 mod 43 = 16 and 211 mod 43 = 27
25 mod 43 = 32 and 212 mod 43 = 11,
26 mod 43 = 21 and 213 mod 43 = 22
27 mod 43 = 42 and 214 mod 43 = 1

You can use the iFrame below to find powers of 2 modulo an odd integer.