carmichael implementation take 1

Signed-off-by: Beni Lev <beniloew@gmail.com>