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 A330772 #14 Dec 30 2019 19:32:48 %S A330772 2,2,2,4,2,4,4,4,8,4,8,4,8,4,8,8,8,16,4,16,8,16,8,16,8,16,8,8,32,2,16, %T A330772 16,16,16,32,4,32,4,32,8,32,16,32,16,16,64,2,32,16,32,32,8,32,16,8,4, %U A330772 16,64,2,32,16,32,4,4,64,4,64,4,8,32,8,8,8,128 %N A330772 a(n) = 1 for n<1; for n >= 0, a(n+1) = 2*a(n-a(n)). %C A330772 From the current term count back the same number of terms and double it to obtain the next term. Because a(n) can exceed n, negative indexes are also occasionally referenced. %e A330772 a(1) = 2*a(0-a(0)) = 2*a(-1) = 2. %e A330772 a(2) = 2*a(1-a(1)) = 2*a(-1) = 2. %e A330772 a(3) = 2*a(2-a(2)) = 2*a(0) = 2. %e A330772 a(4) = 2*a(3-a(3)) = 2*a(1) = 4. %o A330772 (Python) %o A330772 a = [2] %o A330772 for n in range(1000): %o A330772 if(a[n] > n): %o A330772 a.append(2) %o A330772 else: %o A330772 a.append(2*a[n-a[n]]) %Y A330772 Cf. A281130, A070867, A004001. %K A330772 nonn %O A330772 1,1 %A A330772 _Rok Cestnik_, Dec 30 2019