[go: up one dir, main page]

login
Smallest k > n such that the decimal expansion of k*n contains n as a substring of consecutive decimal digits.
1

%I #18 Feb 24 2024 20:57:15

%S 10,6,10,6,7,10,10,10,10,11,100,26,87,51,21,26,69,51,63,21,58,51,97,

%T 26,29,51,100,46,79,31,100,51,100,51,41,38,100,51,87,41,59,51,100,51,

%U 61,51,74,51,51,51,69,76,100,100,61,76,100,79,61,61,92,100,100,76,81,100,100,76,97,71

%N Smallest k > n such that the decimal expansion of k*n contains n as a substring of consecutive decimal digits.

%H Michael S. Branicky, <a href="/A369702/b369702.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) <= 10^A055642(n). - _Michael S. Branicky_, Jan 29 2024

%e a(12) = 26 because 26 is the smallest integer greater than 12 such that 12 * 26 = 312 contains 12 as a substring.

%t a[n_]:=(k=n+1;While[!StringContainsQ[ToString[n*k],ToString@n],k++];k); Array[a,70]

%o (Python)

%o from itertools import count

%o def a(n):

%o s = str(n)

%o return next(k for k in count(n+1) if s in str(k*n))

%o print([a(n) for n in range(1, 71)]) # _Michael S. Branicky_, Jan 29 2024

%Y Cf. A055642.

%K nonn,base,look

%O 1,1

%A _Giorgos Kalogeropoulos_, Jan 29 2024