OFFSET
1,2
COMMENTS
For typical large k, the string corresponding to k^k has length on the order of k log_10(k); heuristically, each substring of length d = log_10(k) has probability 10^(-d) ~ 1/k of matching k, and the probability that none of these matches is about exp(-log_10(k)) = k^(-log_10(e)) ~ k^(-0.434). Thus we should expect that most large k are in the sequence, but infinitely many are not. - Robert Israel, Jul 14 2015
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MAPLE
filter:= proc(n) local L, Ln;
L:= convert(n, string);
Ln:= convert(n^n, string);
StringTools:-Search(L, Ln) <> 0
end proc:
select(filter, [$1..1000]); # Robert Israel, Jul 13 2015
MATHEMATICA
ssQ[n_] := Module[{idn = IntegerDigits[n]}, MemberQ[Partition[ IntegerDigits[ n^n], Length[idn], 1], idn]]; Select[Range[120], ssQ] (* Harvey P. Dale, Apr 01 2011 *)
Select[Range[120], SequenceCount[IntegerDigits[#^#], IntegerDigits[#]]>0&] (* Harvey P. Dale, Sep 18 2023 *)
CROSSREFS
KEYWORD
base,nonn,easy,nice
AUTHOR
STATUS
approved