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 A367067 #20 Dec 16 2023 14:16:09 %S A367067 3,5,1,8,2,11,13,4,16,18,6,21,7,24,26,9,29,10,32,34,12,37,39,14,42,15, %T A367067 45,47,17,50,52,19,55,20,58,60,22,63,23,66,68,25,71,73,27,76,28,79,81, %U A367067 30,84,31,87,89,33,92,94,35,97,36,100,102,38,105 %N A367067 a(1)=3, thereafter a(n) is the least positive integer not yet in the sequence such that Sum_{i=1..n} a(i) == 3 (mod n+3). %C A367067 This is the Avdispahić-Zejnulahi sequence AZ(3). %C A367067 Note that AZ(3) is the third term in a sequence of permutations of the set of positive integers defined by a specific divisibility property (see Links section and Crossrefs for details). %H A367067 Muharem Avdispahić and Faruk Zejnulahi, <a href="https://www.researchgate.net/publication/341726940_AN_INTEGER_SEQUENCE_WITH_A_DIVISIBILITY_PROPERTY">An integer sequence with a divisibility property</a>, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333. %H A367067 Jeffrey Shallit, <a href="https://arxiv.org/abs/2308.06544">Proving properties of some greedily-defined integer recurrences via automata theory</a>, arXiv:2308.06544 [cs.DM], 2023. %t A367067 lst = {3}; %t A367067 f[s_List] := Block[{k = 1, len = 4 + Length@lst, t = Plus @@ lst}, %t A367067 While[MemberQ[s, k] || Mod[k + t, len] != 3, k++]; %t A367067 AppendTo[lst, k]]; Nest[f, lst, 100] %o A367067 (Python) %o A367067 z_list=[-1,3,5] %o A367067 m_list=[-1,0,1] %o A367067 n=2 %o A367067 for n in range(2, 100): %o A367067 if m_list[n] in z_list: %o A367067 m_list.append(m_list[n] + 1) %o A367067 z_list.append(m_list[n+1] + n+3) %o A367067 else: %o A367067 m_list.append(m_list[n]) %o A367067 z_list.append(m_list[n+1]) %o A367067 print(z_list[1:]) %Y A367067 Cf. A340510, A367065. %K A367067 nonn %O A367067 1,1 %A A367067 _Zenan Sabanac_, Nov 03 2023