Project Euler 757 - Stealthy numbers

Official link:

Thought Process

It will be hard to brute force for 10^14, still manageable for 10^6, so we need a smarter way to generate Stealthy numbers, I came up with the below.

Apparently these numbers are known as Bipronic numbers (OEIS link)

Interactive Code

Enter a number (yourinput) < 10^10

Code will output the number of stealthy numbers less than yourinput