login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
0
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,2
EXAMPLE
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.
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 *)
CROSSREFS
A333722 (presents the same idea, but without the constraint of the substring being n).
Sequence in context: A083683 A294139 A255766 * A015447 A072822 A239656
KEYWORD
base,nonn
AUTHOR
STATUS
approved