OFFSET
1,2
COMMENTS
a(n) = n for 1, 5, 6, 10, 11, 16, 17.
Records for a(1) = 1, a(2) = 35, a(4) = 61, a(30) = 69, a(1061) = 84, a(1256) = 91, ...
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..1000
EXAMPLE
2^35 = 34359738368 and 35 is a substring;
35^2 = 1225 and 2 is a substring.
MAPLE
P:=proc(q) local a, b, j, k, n, ok; for n from 1 to q do a:=convert(n, string); ok:=1; for k from 1 to q do if ok=1 then if searchtext(a, convert(k^n, string))>0 then b:=convert(k, string);
for j from 1 to q do if searchtext(b, convert(n^k, string))>0 then print(k); ok:=0; break; fi; od; fi; fi; od; od; end: P(10^3);
MATHEMATICA
Table[k = 1; While[Or[Length@ SequencePosition[IntegerDigits[k^n], IntegerDigits[n]] == 0, Length@ SequencePosition[IntegerDigits[n^k], IntegerDigits[k]] == 0], k++]; k, {n, 120}] (* Michael De Vlieger, Sep 28 2016, Version 10.1 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 28 2016
STATUS
approved