login
Lexigographically earliest sequence of distinct nonnegative integers such that a(2n)*a(2n+1) has n as substring, for all n >= 0.
0

%I #11 Dec 11 2022 12:03:44

%S 0,1,2,5,3,4,6,22,7,12,8,19,9,14,10,17,11,18,13,15,16,63,20,55,21,58,

%T 23,31,24,59,25,46,26,62,27,64,28,65,29,66,30,34,32,38,33,37,35,67,36,

%U 68,39,75,40,315,41,47,42,69,43,103,44,70,45,71,48,84,49,117,50,268,51,85,52,93,53

%N Lexigographically earliest sequence of distinct nonnegative integers such that a(2n)*a(2n+1) has n as substring, for all n >= 0.

%C Could also be defined or read as table with two columns, row k = 0, 1, 2, ... holding (a(2k), a(2k+1)).

%H Eric Angelini, <a href="http://cinquantesignes.blogspot.com/2022/12/smallest-multiplication.html">Smallest multiplication</a>, personal blog "Cinquante Signes", blogspot.com, Dec. 7, 2022

%o (Python)

%o def A357047_first(N):

%o S = [] ; used = {-1}; unused = min(used)+1

%o for n in range(N):

%o ns = str(n) ; x = unused

%o for k in range(x+1, 10**9):

%o if k not in used and ns in str(x*k): break

%o S += [ x, k ]

%o used |= { x, k }

%o while unused in used: used -= { unused-1 }; unused += 1

%o return S # _M. F. Hasler_, Dec 07 2022

%K nonn,base,tabf

%O 0,3

%A _Eric Angelini_ and _M. F. Hasler_, Dec 07 2022