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 A145198 #21 Sep 01 2025 18:02:43 %S A145198 1,2,3,4,5,7,8,9,10,11,13,14,15,16,17,18,19,21,22,23,25,26,27,28,29, %T A145198 30,31,32,33,34,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, %U A145198 54,55,57,58,59,61,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77,78,79,80 %N A145198 a(n) is the least number not already in the sequence and not the product of consecutive terms in the sequence. %H A145198 Rémy Sigrist, <a href="/A145198/b145198.txt">Table of n, a(n) for n = 1..10000</a> %o A145198 (PARI) {m=72; v=vector(m); z=2*m; u=vectorsmall(z); k=1; for(n=1, m, while(u[k], k++); v[n]=k; u[k]=1; j=n-1; p=k; while(j>0&&(p=p*v[j])<=z, u[p]=1; j--)); for(i=1, m, print1(v[i], ","))} \\ _Klaus Brockhaus_, Oct 06 2008 %o A145198 (HP 49G) %o A145198 HP 49G calculator program from _Gerald Hillier_, Oct 24 2008 %o A145198 << 0 OVER NDUPN %o A145198 ->LIST DUPDUP + 1 0 %o A145198 0 -> M V U K J P %o A145198 << 1 M %o A145198 FOR N K %o A145198 WHILE U OVER %o A145198 GET %o A145198 REPEAT 1 + %o A145198 END 'K' STO V %o A145198 N K PUT 'V' STO U K %o A145198 1 PUT N 1 - 'J' STO %o A145198 K 'P' STO %o A145198 WHILE J 0 > %o A145198 IF %o A145198 THEN P V J %o A145198 GET * DUP 'P' STO M %o A145198 2 * <= %o A145198 ELSE 0 %o A145198 END %o A145198 REPEAT P 1 %o A145198 PUT J 1 - 'J' STO %o A145198 END 'U' STO %o A145198 NEXT V %o A145198 >> %o A145198 >> %o A145198 (Python) %o A145198 from operator import mul %o A145198 from itertools import count, accumulate, islice %o A145198 from collections import deque %o A145198 def A145198_gen(): # generator of terms %o A145198 aset, alist = set(), deque() %o A145198 for k in count(1): %o A145198 if k in aset: %o A145198 aset.remove(k) %o A145198 else: %o A145198 yield k %o A145198 aset |= set(k*d for d in accumulate(alist,mul)) %o A145198 alist.appendleft(k) %o A145198 A145198_list = list(islice(A145198_gen(),50)) # _Chai Wah Wu_, Sep 01 2025 %Y A145198 Cf. A002048, A145278 (complement). %K A145198 nonn,changed %O A145198 1,2 %A A145198 _Gerald Hillier_, Oct 04 2008 %E A145198 Extended by _Klaus Brockhaus_, Oct 06 2008