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 A082404 #14 Aug 14 2017 02:09:07 %S A082404 1,2,1,3,2,1,4,2,1,5,4,2,1,6,3,2,1,7,6,3,2,1,8,4,2,1,9,8,4,2,1,10,5,4, %T A082404 2,1,11,10,5,4,2,1,12,6,3,2,1,13,12,6,3,2,1,14,7,6,3,2,1,15,14,7,6,3, %U A082404 2,1,16,8,4,2,1,17,16,8,4,2,1 %N A082404 Triangle in which n-th row gives trajectory of n under the map x -> x/2 if x is even, x -> x-1 if x is odd, stopping when we reach 1. %C A082404 If you write down 0 when dividing by 2, 1 when subtracting 1, the trajectory gives the binary expansion of n. %C A082404 The length of the n-th row of the triangle is A056792(n). - _Nathaniel Johnston_, Apr 21 2011 %H A082404 Nathaniel Johnston, <a href="/A082404/b082404.txt">Table of n, a(n) for n = 1..10000</a> %F A082404 T(n, 1) = n, T(n, 2) = A029578(n). %e A082404 Triangle begins: %e A082404 1; %e A082404 2, 1; %e A082404 3, 2, 1; %e A082404 4, 2, 1, %e A082404 5, 4, 2, 1; %e A082404 6, 3, 2, 1; %e A082404 7, 6, 3, 2, 1; %e A082404 8, 4, 2, 1; %e A082404 9, 8, 4, 2, 1; %e A082404 ... %p A082404 A082404 := proc(n,k) option remember: if(k = 1)then return n:elif(A082404(n,k-1) mod 2 = 0)then return A082404(n,k-1)/2: else return A082404(n,k-1)-1: fi: end: %p A082404 for n from 1 to 20 do k:=1: while A082404(n,k)>=1 do printf("%d, ",A082404(n,k)); k:=k+1: od:printf("\n");od: # _Nathaniel Johnston_, Apr 21 2011 %Y A082404 Cf. A056792, A080825. %K A082404 easy,nonn,tabf %O A082404 1,2 %A A082404 _Cino Hilliard_, Apr 14 2003 %E A082404 More terms and changed offset from _Nathaniel Johnston_, Apr 21 2011