Check membership of an infinite list
Python 2, 43 bytes

Takes as input the target integer \$a\$, and a lambda function \$g\$. Since the list is always either strictly increasing or decreasing, we only need to check if \$a\$ appears in the next \$ |a-g(0)|+1 \$ numbers.



lambda a,g:a in map(g,range(abs(a-g(0))+1))


Try it online!