editing
approved
editing
approved
op(select(n->searchtext(convert(n, string), convert(6^n, string))>0, [$1..240])); # Paolo P. Lava, Sep 05 2018
approved
editing
proposed
approved
editing
proposed
David A. Corneth, <a href="/A049304/b049304.txt">Table of n, a(n) for n = 1..10000</a>
(PARI) is(n) = { my(digs6n, digsn, streak, i, j); digs6n = digits(6^n); digsn = digits(n); for(i = 1, #digs6n + 1 - #digsn, streak = 0; for(j = 1, #digsn, if(digs6n[i + j - 1] == digsn[j], streak++ , next(2) ) ); if(streak == #digsn, return(1) ) ); 0 } \\ David A. Corneth, Aug 13 2021
9 is in the sequence because 6^9 = 10077696 contains 9 as a substring. - David A. Corneth, Aug 13 2021
proposed
editing
editing
proposed
(Python)
def ok(n): return str(n) in str(6**n)
print(list(filter(ok, range(241)))) # Michael S. Branicky, Aug 13 2021
proposed
editing
editing
proposed