#!/usr/bin/env python3

from Cryptotools.Numbers.coprime import phi
from Cryptotools.lcm import lcm
from Cryptotools.Numbers.carmi import carmi_numbers, is_carmichael, carmichael_lambda

print(f"phi(19) = {phi(19)}")

print("Carmichael's number")
l = carmi_numbers(561)
print(is_carmichael(561, l))

# Test Carmichael lambda
print("Carmichael")
print(f"12 {carmichael_lambda(12)}")
print(f"19 {carmichael_lambda(19)}")
print(f"28 {carmichael_lambda(28)}")
print(f"32 {carmichael_lambda(32)}")
print(f"33 {carmichael_lambda(33)}")
print(f"35 {carmichael_lambda(35)}")
print(f"36 {carmichael_lambda(36)}")
print(f"135 {carmichael_lambda(135)}")
print(f"1200 {carmichael_lambda(1200)}")
