CSharp Code

Brute force starting from a high number picked based on factors.
Binary