%I #12 Aug 29 2024 17:13:49
%S 1,1,1,2,2,2,3,1,1,5,2,2,4,3,3,1,5,5,2,3,3,3,5,4,2,4,6,3,3,7,1,1,11,2,
%T 2,7,1,5,11,2,3,7,4,2,8,5,3,5,6,5,6,7,3,5,9,5,6,8,2,7,5,4,5,8,5,7,5,7,
%U 9,3,3,11,1,7,7,2,11,4,3,9,6,4,6,7,6,7
%N Lexicographically earliest sequence of positive integers such that the products of three consecutive terms are all distinct.
%C This sequence has similarities with A088177; here we consider products of three consecutive terms, there products of two consecutive terms.
%H Rémy Sigrist, <a href="/A349227/b349227.txt">Table of n, a(n) for n = 1..10000</a>
%e The first terms, alongside a(n)*a(n+1)*a(n+2), are:
%e n a(n) a(n)*a(n+1)*a(n+2)
%e -- ---- ------------------
%e 1 1 1
%e 2 1 2
%e 3 1 4
%e 4 2 8
%e 5 2 12
%e 6 2 6
%e 7 3 3
%e 8 1 5
%e 9 1 10
%e 10 5 20
%o (PARI) s=0; pp=p=1; for (n=1, 86, for (v=1, oo, if (!bittest(s, q=pp*p*v), print1 (pp", "); s+=2^q; pp=p; p=v; break)))
%o (Python)
%o def aupton(terms):
%o alst, pset = [1, 1], set()
%o for n in range(3, terms+1):
%o p = p2 = alst[-1]*alst[-2]
%o while p in pset: p += p2
%o alst.append(p//p2); pset.add(p)
%o return alst
%o print(aupton(86)) # _Michael S. Branicky_, Nov 12 2021
%Y Cf. A088177, A349228.
%K nonn
%O 1,4
%A _Rémy Sigrist_, Nov 11 2021