This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A382067 #12 Mar 17 2025 22:19:57 %S A382067 1,2,3,8,15,48,105,384,945,3840,10395,46080,135135,645120,2027025, %T A382067 3072,155925,256,14175,2816,170100,36608,2381400,549120,11340,32,1260, %U A382067 4,6,20,36,140,288,12600,3168,151200,24,5,144,35,1152,315,16,45,112,360,14,2880 %N A382067 Lexicographically earliest sequence of distinct positive integers such that the product of two consecutive terms is always a factorial number. %C A382067 For any prime number p, the sequence contains a multiple of p, say a(k), and this term satisfies a(k-1)*a(k) = p!. %H A382067 Rémy Sigrist, <a href="/A382067/b382067.txt">Table of n, a(n) for n = 1..10000</a> %H A382067 Rémy Sigrist, <a href="/A382067/a382067.gp.txt">PARI program</a> %e A382067 The first terms are: %e A382067 n a(n) a(n)*a(n+1) %e A382067 -- ------- ----------- %e A382067 1 1 2! %e A382067 2 2 3! %e A382067 3 3 4! %e A382067 4 8 5! %e A382067 5 15 6! %e A382067 6 48 7! %e A382067 7 105 8! %e A382067 8 384 9! %e A382067 9 945 10! %e A382067 10 3840 11! %e A382067 11 10395 12! %e A382067 12 46080 13! %e A382067 13 135135 14! %e A382067 14 645120 15! %e A382067 15 2027025 13! %e A382067 16 3072 12! %o A382067 (Python) %o A382067 from itertools import count, islice %o A382067 def agen(): # generator of terms %o A382067 fset, aset, an = set(), set(), 1 %o A382067 while True: %o A382067 yield an %o A382067 aset.add(an) %o A382067 fk = 1 %o A382067 for k in count(2): %o A382067 fk *= k %o A382067 q, r = divmod(fk, an) %o A382067 if r == 0 and q not in aset: %o A382067 an = q %o A382067 break %o A382067 print(list(islice(agen(), 48))) # _Michael S. Branicky_, Mar 14 2025 %o A382067 (PARI) \\ See Links section. %Y A382067 Cf. A000142, A375579, A382072, A382083, A382085. %K A382067 nonn %O A382067 1,2 %A A382067 _Rémy Sigrist_, Mar 14 2025