|
|
A235052
|
|
a(n) = smallest number > 1 such that a(n)^n contains a(n) as a substring.
|
|
2
|
|
|
2, 5, 4, 5, 2, 4, 2, 2, 2, 2, 2, 3, 2, 4, 2, 3, 2, 2, 2, 3, 2, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 4, 3, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
It is very probable that a(n) = 2 for n > 169.
|
|
LINKS
|
|
|
EXAMPLE
|
4 is the smallest number such that 4^3 contains a 4 and 4^6 contains a 4, so a(3) = 4 and a(6) = 4.
|
|
MATHEMATICA
|
a[n_] := Block[{k = 2}, While[StringPosition[ToString[k^n], ToString@k] == {}, k++]; k]; Array[a, 80] (* Giovanni Resta, Jan 11 2014 *)
|
|
PROG
|
(Python)
def f(x):
for n in range(2, 10**3):
if str(n**x).count(str(n)) > 0:
return n
x = 1
while x < 200:
print(f(x))
x += 1
(Python)
def a(n): return min(k for k in range(2, 6) if str(k) in str(k**n))
(Haskell)
import Data.List (isInfixOf)
a235052 n = head [x | x <- [2..], show x `isInfixOf` (show $ x ^ n)]
(PARI) a(n) = my(k=2); while(#strsplit(Str(k^n), Str(k))==1, k++); k; \\ Michel Marcus, Jan 25 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|