login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333921 a(n) is the least k such that the decimal representation of n appears as a substring in the concatenation of 0, 1, ..., k. 3

%I #10 Apr 12 2020 13:57:36

%S 0,1,2,3,4,5,6,7,8,9,10,11,2,13,14,15,16,17,18,19,20,13,22,3,24,25,26,

%T 27,28,29,30,14,24,33,4,35,36,37,38,39,40,15,25,35,44,5,46,47,48,49,

%U 50,16,26,36,46,55,6,57,58,59,60,17,27,37,47,57,66,7,68

%N a(n) is the least k such that the decimal representation of n appears as a substring in the concatenation of 0, 1, ..., k.

%C Every nonnegative integer appears finitely many times in this sequence.

%H Rémy Sigrist, <a href="/A333921/b333921.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) <= n with equality iff n = 0 or n belongs to A131881.

%F a(A007908(n)) = n for any n > 0.

%o (PARI) a(n, base=10) = { my (w=base^#digits(n, base), m=0); for (k=0, oo, my (d=if (k, digits(k, base), [0])); for (i=1, #d, m=(base*m+d[i])%w; if (m==n, return (k)))) }

%Y Cf. A007908, A116700, A131881, A333920 (binary variant).

%K nonn,base

%O 0,3

%A _Rémy Sigrist_, Apr 10 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 09:30 EDT 2024. Contains 376007 sequences. (Running on oeis4.)