A336621 Lexicographically earliest sequence of distinct positive terms starting with a(1) = 2 such that the product of the last two digits of the sequence (when extended with a new term) is not in the sequence.
2, 3, 4, 5, 7, 8, 9, 10, 11, 16, 23, 26, 27, 29, 30, 32, 34, 36, 37, 38, 40, 43, 45, 46, 47, 50, 53, 54, 55, 57, 60, 61, 62, 63, 64, 67, 68, 70, 73, 74, 75, 76, 77, 78, 80, 83, 86, 87, 89, 90, 92, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 116, 120, 123, 126, 127, 129, 130, 132
Offset: 1
Examples
As a(1) = 2 and a(2) = 3, the product 2 * 3 = 6 cannot be in the sequence; as a(2) = 3 and a(3) = 4, the product 3 * 4 = 12 cannot be in the sequence; (...) as a(6) = 8 and a(7) = 9, the product 8 * 9 = 72 cannot be in the sequence; as a(8) = 10, the product 1 * 0 = 0 cannot be in the sequence; as a(9) = 11, the product 1 * 1 = 1 cannot be in the sequence; etc.
Crossrefs
Cf. A203565.
Programs
-
Mathematica
lst={};a[1]=2;a[n_]:=a[n]=Block[{k=2},While[s=Array[a,n-1];AppendTo[lst,p=Times@@(Flatten[IntegerDigits/@Join[Last@s,{k}]][[-2;;]])];MemberQ[s,p]||MemberQ[s,k]||MemberQ[lst,k],k++;lst=Most@lst];k];Array[a,73] (* Giorgos Kalogeropoulos, May 12 2022 *)