New answers tagged

1

The fastest way is likely going to be to compute the base-$b$ representation of $n$, and then scan over it to see whether it contains the desired digit. That is a linear-time algorithm. Solving a Diophantine equation is far harder.


Top 50 recent answers are included