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 A285715 #8 Apr 25 2017 11:47:28 %S A285715 0,1,2,3,1,4,5,2,6,7,3,8,2,1,9,10,4,3,11,5,12,13,2,14,3,6,15,4,7,16, %T A285715 17,3,5,18,8,19,20,2,4,21,1,22,6,9,23,5,10,7,24,4,25,26,3,27,28,11,29, %U A285715 8,5,6,4,12,2,30,13,31,7,2,32,33,14,5,9,3,34,35,6,10,36,15,8,37,4,38,5,7,39,3,16,40,41,17,11,6,3,42,43,5,44,45,18,9,12,8,7 %N A285715 a(n) = A000120(A245611(n)). %H A285715 Antti Karttunen, <a href="/A285715/b285715.txt">Table of n, a(n) for n = 1..8192</a> %F A285715 a(1) = 0, a(2) = 1, for n > 2, a(n) = a(A285712(n)) + [n <> 2 mod 3]. (Where [] is Iverson bracket, giving here 1 if n is of the form 3k or 3k+1, and 0 if it is of the form 3k+2.) %F A285715 a(n) = A000120(A245611(n)). %o A285715 (Scheme) %o A285715 ;; First implementation uses memoization-macro definec: %o A285715 (definec (A285715 n) (if (<= n 2) (- n 1) (+ (if (= 2 (modulo n 3)) 0 1) (A285715 (A285712 n))))) %o A285715 (define (A285715 n) (A000120 (A245611 n))) %Y A285715 Cf. A000120, A245611, A285712, A285714, A285716. %Y A285715 Cf. A007051 (positions of 0 and 1's). %K A285715 nonn %O A285715 1,3 %A A285715 _Antti Karttunen_, Apr 25 2017