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 A256184 #20 Sep 02 2021 08:19:16 %S A256184 0,-2,-1,2,-4,-3,1,-3,-2,-2,0,1,4,-6,-5,3,-5,-4,-1,-1,0,3,-5,-4,2,-4, %T A256184 -3,2,-4,-3,0,-2,-1,-1,-1,0,-4,2,3,6,-8,-7,5,-7,-6,-3,1,2,5,-7,-6,4, %U A256184 -6,-5,1,-3,-2,1,-3,-2,0,-2,-1,-3,1,2,5,-7,-6,4,-6,-5 %N A256184 First of two variations by Per Nørgård of his "infinity sequence", cf. A004718: u(0) = 0; u(3*n) = -u(n); u(3*n+1) = u(n) - 2; u(3*n+2) = u(n) - 1. %C A256184 Per Nørgård's surname is also written as Noergaard. %C A256184 Not squarefree in contrast to A004718, first repetition of order 3: a(32) = a(33) = a(34) = -1, see link. %H A256184 Reinhard Zumkeller, <a href="/A256184/b256184.txt">Table of n, a(n) for n = 0..10000</a> %H A256184 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>, J. of Mathematics and Music (2017). %H A256184 Christopher Drexler-Lemire and Jeffrey Shallit, <a href="http://arxiv.org/abs/1402.3091">Notes and Note-Pairs in Noergaard's Infinity Series</a>, arXiv:1402.3091 [math.CO], 2014, page 13. %o A256184 (Haskell) %o A256184 a256184 n = a256184_list !! n %o A256184 a256184_list = 0 : concat (transpose [map (subtract 2) a256184_list, %o A256184 map (subtract 1) a256184_list, %o A256184 map negate $ tail a256184_list]) %o A256184 (Python) %o A256184 from functools import lru_cache %o A256184 @lru_cache(maxsize=None) %o A256184 def a(n): return 0 if n == 0 else (a(n//3) - (3-n%3)) if n%3 else -a(n//3) %o A256184 print([a(n) for n in range(72)]) # _Michael S. Branicky_, Sep 02 2021 %Y A256184 Cf. A004718, A256185, A087808, A085144, A255723. %K A256184 sign %O A256184 0,2 %A A256184 _Reinhard Zumkeller_, Mar 19 2015