OFFSET
1,3
COMMENTS
Definition: n is a k-morphic number if n^k ends with n.
PROG
(PARI) k=11; for(n=1, 10000, if((n^k)%(10^ceil(log(n)/log(10)))==n, print1(n, ", "))); \\ starting with 4, 5, ...
(Sage)
def automorphic(maxdigits, pow, base=10) :
morphs = [[0]]
for i in range(maxdigits):
T=[d*base^i+x for x in morphs[-1] for d in range(base)]
morphs.append([x for x in T if x^pow % base^(i+1) == x])
res = list(set(sum(morphs, []))); res.sort()
return res
# (call with pow=11 for this sequence), Eric M. Schmidt, Jul 30 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 19 2002
EXTENSIONS
Sequence corrected by Eric M. Schmidt, Jul 30 2013
STATUS
approved