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 A358406 #10 Nov 14 2022 09:59:39 %S A358406 1,3,5,10,16,8,19,141,14,190,25,22,416,70,54,162,32,308,169,67,93,203, %T A358406 118,513,196,29,40,200,861,37,74,1081,82,216,208,363,90,46,375,1675, %U A358406 1091,333,1407,812,166,78,51,1099,115,193,1243,64,595,98,58,367,617,235,325,766,2137,272,124 %N A358406 The index of A358405 where n first appears, or 0 if n never appears. %C A358406 See A358405 for further details. %o A358406 (Python) %o A358406 from itertools import count, islice %o A358406 def agen(): %o A358406 k, an, first, prev = 0, 0, {0: 1}, {0: 1} %o A358406 for n in count(2): %o A358406 while k in first: yield first[k]; k += 1 %o A358406 an1 = 0 if first[an] == n-1 else max(n-1-prev[an], first[an]) %o A358406 if an1 not in first: first[an1] = prev[an1] = n %o A358406 prev[an] = n-1 %o A358406 an = an1 %o A358406 print(list(islice(agen(), 63))) # _Michael S. Branicky_, Nov 14 2022 %Y A358406 Cf. A358405, A358402, A358403, A181391. %K A358406 nonn %O A358406 0,2 %A A358406 _Scott R. Shannon_, Nov 14 2022