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 A059126 #20 Nov 03 2018 12:32:45 %S A059126 1,2,1,3,4,3,1,2,1,5,6,5,1,2,1,3,4,3,1,2,1,7,8,7,1,2,1,3,4,3,1,2,1,5, %T A059126 6,5,1,2,1,3,4,3,1,2,1,9,10,9,1,2,1,3,4,3,1,2,1,5,6,5,1,2,1,3,4,3,1,2, %U A059126 1,7,8,7,1,2,1,3,4,3,1,2,1,5,6,5,1,2,1,3,4,3,1,2,1,11,12,11,1,2,1,3,4,3 %N A059126 A hierarchical sequence (W2{2} according to the description in the attached file - see link). %H A059126 Antti Karttunen, <a href="/A059126/b059126.txt">Table of n, a(n) for n = 0..12287</a> %H A059126 J. Wallgren, <a href="/A059126/a059126.txt">Hierarchical sequences</a> %F A059126 a(3n+1) = 2*A001511(1+n), a(3n) = a(3n+2) = a(3n+1) - 1. - _Antti Karttunen_, May 28 2017 %t A059126 Array[IntegerExponent[2 #, 2] /. k_ :> ({# - 1, #, # - 1} &[2 k]) &, 36] // Flatten (* _Michael De Vlieger_, Nov 02 2018 *) %o A059126 (Scheme, with memoization-macro definec) %o A059126 (definec (A059126 n) (cond ((zero? (modulo n 3)) (- (A059126 (+ 1 n)) 1)) ((= 1 (modulo n 3)) (* 2 (A001511 (/ (+ 2 n) 3)))) (else (- (A059126 (+ -1 n)) 1)))) %o A059126 ;; _Antti Karttunen_, May 28 2017 %Y A059126 Cf. A001511, A059127, A059128, A059129, A059132, A059133. %K A059126 easy,nonn %O A059126 0,2 %A A059126 _Jonas Wallgren_, Jan 19 2001