cp's OEIS Frontend

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.

A240769 Triangle read by rows: T(1,1) = 1; T(n+1,k) = T(n,k+1), 1 <= k < n; T(n+1,n) = 2*T(n,1); T(n+1,n+1) = 2*T(n,1) - 1.

This page as a plain text file.
%I A240769 #11 Apr 15 2014 02:27:48
%S A240769 1,2,1,1,4,3,4,3,2,1,3,2,1,8,7,2,1,8,7,6,5,1,8,7,6,5,4,3,8,7,6,5,4,3,
%T A240769 2,1,7,6,5,4,3,2,1,16,15,6,5,4,3,2,1,16,15,14,13,5,4,3,2,1,16,15,14,
%U A240769 13,12,11,4,3,2,1,16,15,14,13,12,11,10,9,3,2
%N A240769 Triangle read by rows:  T(1,1) = 1; T(n+1,k) = T(n,k+1), 1 <= k < n; T(n+1,n) = 2*T(n,1); T(n+1,n+1) = 2*T(n,1) - 1.
%C A240769 Let h be the initial term of row n, to get row n+1, remove h and then append 2*h and 2*h+1;
%C A240769 A080079(n) = T(n,1); T(n,T(n,1)) = 1.
%H A240769 Reinhard Zumkeller, <a href="/A240769/b240769.txt">Rows n = 1..128 of triangle, flattened</a>
%e A240769 .   1:   1
%e A240769 .   2:   2   1
%e A240769 .   3:   1   4   3
%e A240769 .   4:   4   3   2   1
%e A240769 .   5:   3   2   1   8   7
%e A240769 .   6:   2   1   8   7   6   5
%e A240769 .   7:   1   8   7   6   5   4   3
%e A240769 .   8:   8   7   6   5   4   3   2   1
%e A240769 .   9:   7   6   5   4   3   2   1  16  15
%e A240769 .  10:   6   5   4   3   2   1  16  15  14  13
%e A240769 .  11:   5   4   3   2   1  16  15  14  13  12  11
%e A240769 .  12:   4   3   2   1  16  15  14  13  12  11  10   9 .
%o A240769 (Haskell)
%o A240769 a240769 n k = a240769_tabl !! (n-1) !! (k-1)
%o A240769 a240769_row n = a240769_tabl !! (n-1)
%o A240769 a240769_tabl = iterate (\(x:xs) -> xs ++ [2*x, 2*x-1]) [1]
%Y A240769 Cf. A062383 (row maxima).
%K A240769 nonn,tabl,look
%O A240769 1,2
%A A240769 _Reinhard Zumkeller_, Apr 13 2014