User blog comment:Ikosarakt1/Apocalyptic function/@comment-25418284-20130324192805/@comment-5529393-20130325003321

It depends on the specifics, but in general it looks like you can only solve it by searching the digits of \(a_i\) for \(d\). If the \(a_i\) grows exponentially, then there should be only finitely many non-apocalyptic numbers;  if the \(a_i\) grows like a polynomial, then it depends on the growth rate of the polynomial. For example, for b = 10, d = 666, \(a_n = n^c\), there should be infinitely many non-apocalyptic numbers if and only if c < 7646.