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 A368382 #21 Mar 06 2024 00:57:29 %S A368382 1,3,6,11,4,13,2,15,30,47,9,51,5,55,28,57,26,59,24,61,22,63,20,65,18, %T A368382 67,16,69,14,71,12,73,10,75,8,77,148,221,146,223,144,225,142,227,53, %U A368382 231,49,235,45,239,41,243,37,247,33,251,29,255,25,259,21,263,17,267,140,269,7,273,138,275,136,277,134,279,132,281 %N A368382 a(1) = 1; for n > 1, a(n) is the least positive integer not already in the sequence such that a(n) == a(n-1) (mod A004280(n)). %C A368382 Analogous to A364054, but whereas that sequence is based on the sequence of primes (2, 3, 5, 7, 11, ....), the present sequence is based on the sequence 2, 3, 5, 7, 9, 11, 13, 15, ... (2 together with the odd numbers >1, essentially A004280). %H A368382 N. J. A. Sloane, <a href="/A368382/b368382.txt">Table of n, a(n) for n = 1..10000</a> %o A368382 (Python) %o A368382 from itertools import count, islice %o A368382 def A368382_gen(): # generator of terms %o A368382 a, aset, p = 1, {0,1}, 2 %o A368382 while True: %o A368382 yield a %o A368382 for b in count(a%p,p): %o A368382 if b not in aset: %o A368382 aset.add(b) %o A368382 a, p = b, 3 if p == 2 else p+2 %o A368382 break %o A368382 A368382_list = list(islice(A368382_gen(),40)) # _Chai Wah Wu_, Mar 05 2024 %Y A368382 Cf. A004280. %Y A368382 Similar definitions: A005132, A006509, A364054. %K A368382 nonn %O A368382 1,2 %A A368382 _N. J. A. Sloane_, Mar 03 2024