# [Jelly], <s>12</s> 11 bytes 1*@ṾØDfƑʋ1# [Try it online!][TIO-jpvx4wof] ### How it works 1*@ṾØDfƑʋ1# Main link. Argument: n 1 Set the return value to 1. 1# Call the link to the left for k = 1, 2, ... and with right argument n, until it returns a truthy value. ʋ Combine the four links to the left into a dyadic chain. *@ Compute n**k. Ṿ Convert it to its string representation. ØD Yield "0123456789". fƑ Filter and return 1 is the result is equal to the left argument. [Jelly]: https://github.com/DennisMitchell/jelly [TIO-jpvx4wof]: https://tio.run/##AUEAvv9qZWxsef//MSpA4bm@w5hEZsaRyosxI/8yIHIgMzYg4bifIDEwIDsgMTIzNDU2Nzg5MCDCtSA7IiDDh@KCrCBH/w "Jelly – Try It Online"