OFFSET
1,2
COMMENTS
This is the sequence of "fixated points" (cf. A068588) of f(n) = n!.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
42! = 1405006117752879898543142606244511569936384000000000, which contains both 42 and 24 as substrings. Hence 42 is a term of the sequence.
MAPLE
filter:= proc(n) local m, L, R, LN; uses StringTools;
L:= sprintf("%d", n);
m:= padic:-ordp(n, 10);
R:= Reverse(L)[m+1..-1];
LN:= sprintf("%d", n!);
Search(L, LN) > 0 and Search(R, LN) > 0
end proc:
select(filter, [$1..1000]); # Robert Israel, Apr 28 2021
MATHEMATICA
r = {}; Do[m = n!; s = ToString[m]; If[ StringPosition[s, ToString[n]] != {} && StringPosition[s, ToString[ FromDigits[ Reverse[ IntegerDigits[n]]]]] != {}, r = Append[r, n]], {n, 1, 321}]; r
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Joseph L. Pe, Apr 16 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Apr 19 2002
STATUS
approved