A333933 Lexicographically earliest sequence of distinct positive integers such that a(n), a(n+1) and the product a(n)*a(n+1) have in common the substring n.
1, 12, 23, 134, 145, 65, 567, 278, 289, 910, 110, 10112, 1213, 1413, 15014, 16154, 16817, 17018, 18719, 19201, 2120, 2218, 10223, 2324, 24251, 2526, 27026, 52827, 28291, 29303, 30310, 3231, 32733, 6334, 34351, 35036, 36373, 37388, 39385, 139240, 4041, 41428, 34342, 15443, 4445, 45461, 46847, 34847, 48149
Offset: 1
Examples
a(1) = 1, a(2) = 12 and the product a(1)*a(2) = 12 have n = 1 in common; a(2) = 12, a(3) = 23 and the product a(2)*a(3) = 276 have n = 2 in common; a(3) = 23, a(4) = 134 and the product a(3)*a(4) = 3082 have n = 3 in common; a(4) = 134, a(5) = 145 and the product a(4)*a(5) = 19430 have n = 4 in common; ... a(120) = 11912061, a(121) = 1012120 and their product 12056435179320 share the substring 120; etc.
Crossrefs
A333722 (presents the same idea, but without the constraint of the substring being n).
Programs
-
Mathematica
a[1]=1;a[n_]:=a[n]=Block[{k=1},While[MemberQ[Array[a,n-1],k]||!(Q=StringContainsQ)[(T=ToString)@k,T@n]||!And@@(Q[T@#,T[n-1]]&/@{a[n-1],k,a[n-1]*k}),k++];k];Array[a,26] (* Giorgos Kalogeropoulos, May 12 2022 *)