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 A083866 #27 Jul 08 2023 08:05:47 %S A083866 0,5,10,17,20,27,34,40,45,54,65,68,75,80,85,90,99,105,108,119,130,136, %T A083866 141,150,160,165,170,177,180,187,198,210,216,221,238,257,260,267,272, %U A083866 277,282,291,297,300,311,320,325,330,337,340,347,354,360 %N A083866 Positions of zeros in Per Nørgård's infinity sequence (A004718). %C A083866 First differences seem to be always >2. %C A083866 Many (but not all) prime members are in A005107. %C A083866 The composer Per Nørgård's name is also written in the OEIS as Per Noergaard. %H A083866 Reinhard Zumkeller, <a href="/A083866/b083866.txt">Table of n, a(n) for n = 0..10000</a> %H A083866 Yu Hin (Gary) Au, Christopher Drexler-Lemire, and Jeffrey Shallit, <a href="https://doi.org/10.1080/17459737.2017.1299807">Notes and note pairs in Norgard's infinity series</a>, Journal of Mathematics and Music, Volume 11, Issue 1, 2017, pages 1-19. %o A083866 (Haskell) %o A083866 a083866 n = a083866_list !! n %o A083866 a083866_list = filter ((== 0) . a004718) [0..] %o A083866 -- _Reinhard Zumkeller_, Mar 19 2015, Nov 10 2012 %o A083866 (Python) %o A083866 from itertools import groupby, islice %o A083866 def A083866_gen(startvalue=0): # generator of terms >= startvalue %o A083866 n, c = max(0,startvalue),0 %o A083866 for k, g in groupby(bin(n)[2:]): %o A083866 c = c+len(list(g)) if k == '1' else (-c if len(list(g))&1 else c) %o A083866 while True: %o A083866 if c == 0: yield n %o A083866 n += 1 %o A083866 c = c-t-1 if (t:=(~n & n-1).bit_length())&1 else t+1-c %o A083866 A083866_list = list(islice(A083866_gen(),20)) # _Chai Wah Wu_, Mar 02 2023 %Y A083866 Cf. A004718, A005107. %K A083866 nonn %O A083866 0,2 %A A083866 _Ralf Stephan_, May 07 2003