OFFSET
1,2
EXAMPLE
5 is a term. See below table:
.
base | 5 in base | 5^5 in base
---------+-------------+-------------
10 5 3125
9 5 4252
8 5 6065
7 5 12053
6 5 22245
5 10 100000
4 11 300311
3 12 11021202
2 101 110000110101
.
5^5 in all bases contains 5 in that base as a substring.
PROG
(Python)
from sympy.ntheory import digits
def nstr(n, b): return "".join(map(str, digits(n, b=b)[1:]))
def ok(k): return all(nstr(k, b) in nstr(k**k, b) for b in range(10, 1, -1))
print(list(filter(ok, range(900)))) # Michael S. Branicky, Apr 25 2021
(PARI) str(v) = my(s=""); for (k=1, #v, s = concat(s, Str(v[k]))); s;
isok(k) = {for (b=2, 10, my(kb = digits(k, b), kkb = digits(k^k, b)); if (#strsplit(str(kkb), str(kb)) <=1 , return (0)); ); return (1); } \\ Michel Marcus, Apr 26 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Apr 21 2021
STATUS
approved