cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239134 Smallest k such that n^k contains k as a substring in its decimal representation.

This page as a plain text file.
%I A239134 #23 Sep 17 2024 21:09:44
%S A239134 1,6,7,6,2,6,3,4,5,1,1,1,1,1,1,1,1,1,1,6,1,4,2,3,2,4,2,4,3,7,1,2,3,3,
%T A239134 2,2,3,5,2,6,1,8,4,4,2,2,2,2,2,2,1,2,2,2,2,4,2,4,3,6,1,3,5,6,2,4,3,2,
%U A239134 3,3,1,3,2,6,2,3,2,6,2,4,1,2,4,4
%N A239134 Smallest k such that n^k contains k as a substring in its decimal representation.
%C A239134 It seems very likely a(n) < 10 for all n (even stronger, a(n) < 9 for all n).
%C A239134 It also seems very likely a(n) = {1,2,3} for sufficiently large n.
%C A239134 Counterexample: a(10^d - 2) = 6 for d >= 2. - _Robert Israel_, Sep 16 2024
%H A239134 Giovanni Resta, <a href="/A239134/b239134.txt">Table of n, a(n) for n = 1..10000</a>
%F A239134 a(A011531(k))=1, any k.
%F A239134 a(10*n) = a(n) if a(n) < 10. - _Robert Israel_, Sep 16 2024
%e A239134 5^1 = 5 does not contain a 1 but 5^2 = 25 does contain a 2 so a(5) = 2.
%e A239134 7^1 = 7 does not contain a 1, 7^2 = 49 does not contain a 2, but 7^3 = 343 does contain a 3 so a(7) = 3.
%p A239134 f:= proc(n) local k;
%p A239134   for k from 1 to 9 do
%p A239134     if member(k,convert(n^k,base,10)) then return k fi
%p A239134   od;
%p A239134   FAIL
%p A239134 end proc:
%p A239134 map(f, [$1..100]); # _Robert Israel_, Sep 16 2024
%t A239134 a[n_] := Block[{k=1}, While[{} == StringPosition[ ToString[n^k], ToString[k]], k++]; k]; Array[a, 84] (* _Giovanni Resta_, Mar 11 2014 *)
%t A239134 sk[n_]:=Module[{k=1},While[SequenceCount[IntegerDigits[n^k],IntegerDigits[k]] == 0,k++];k]; Array[sk,90] (* _Harvey P. Dale_, May 12 2022 *)
%o A239134 (Python)
%o A239134 def Sub(x):
%o A239134   for n in range(10**3):
%o A239134     if str(x**n).find(str(n)) > -1:
%o A239134       return n
%o A239134 x = 1
%o A239134 while x < 10**3:
%o A239134   print(Sub(x))
%o A239134   x += 1
%Y A239134 Cf. A045537, A061280.
%K A239134 nonn,base
%O A239134 1,2
%A A239134 _Derek Orr_, Mar 10 2014