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 A230871 #58 Nov 11 2024 10:54:23 %S A230871 0,1,1,3,2,2,4,8,3,5,3,5,7,9,11,21,5,7,7,13,5,7,7,13,11,17,13,23,19, %T A230871 25,29,55,8,12,10,18,12,16,18,34,8,12,10,18,12,16,18,34,18,26,24,44, %U A230871 22,30,32,60,30,46,36,64,50,66,76,144,13,19,17,31,17,23 %N A230871 Construct a triangle as in the Comments, read nodes from left to right starting at the root and proceeding downwards. %C A230871 The rule for constructing the tree is the following: %C A230871 .....x %C A230871 .....| %C A230871 .....y %C A230871 ..../ \ %C A230871 ..y+x..3y-x %C A230871 and the tree begins like this: %C A230871 .........0...... %C A230871 .........|...... %C A230871 .........1...... %C A230871 ......./ \.... %C A230871 ......1.....3.... %C A230871 ...../ \.../ \... %C A230871 ....2...2.4...8.. %C A230871 and so on. %C A230871 Column 1 : 0, 1, 1, 2, 3, 5, 8, ... = A000045 (Fibonacci numbers). %C A230871 Column 2 : 3, 2, 5, 7, 12, 19, 31, ... = A013655. %C A230871 Column 3 : 4, 3, 7, 10, 17, 27, 44, ... = A022120. %C A230871 Column 4 : 8, 5, 13, 18, 31, 49, 80, ... = A022138. %C A230871 Column 5 : 7, 5, 12, 17, 29, 46, 75, ... = A022137. %C A230871 Column 6 : 9, 7, 16, 23, 39, 62, 101, ... = A190995. %C A230871 Column 7 : 11, 7, 18, 25, 43, 68, 111, ... = A206419. %C A230871 Column 8 : 21, 13, 34, 47, 81, 128, 209, ... = ? %C A230871 Column 9 : 11, 8, 19, 27, 46, 73, 119, ... = A206420. %C A230871 The lengths of the rows are 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, ... = A011782 . %C A230871 The final numbers in the rows are 0, 1, 3, 8, 21, 55, 144, ... = A001906. %C A230871 The middle numbers in the rows are 1, 2, 5, 13, 34, 89, ... = A001519 . %C A230871 Row sums for n>=1: 1, 4, 16, 64, 256, 1024, ... = 4^(n-1). %H A230871 Reinhard Zumkeller, <a href="/A230871/b230871.txt">Rows n = 0..13 of triangle, flattened</a> %e A230871 The successive rows are: %e A230871 0 %e A230871 1 %e A230871 1, 3 %e A230871 2, 2, 4, 8 %e A230871 3, 5, 3, 5, 7, 9, 11, 21 %e A230871 5, 7, 7, 13, 5, 7, 7, 13, 11, 17, 13, 23, 19, 25, 29, 55 %e A230871 ... %p A230871 T:= proc(n, k) T(n, k):= `if`(k=1 and n<2, n, (d->(1+2*d)* %p A230871 T(n-1, r)+(1-2*d)*T(n-2, iquo(r+1, 2)))(irem(k+1, 2, 'r'))) %p A230871 end: %p A230871 seq(seq(T(n, k), k=1..max(1, 2^(n-1))), n=0..7); # _Alois P. Heinz_, Nov 07 2013 %t A230871 T[n_, k_] := T[n, k] = If[k==1 && n<2, n, Function[d, r = Quotient[k+1, 2]; (1+2d) T[n-1, r] + (1-2d) T[n-2, Quotient[r+1, 2]]][Mod[k+1, 2]]]; %t A230871 Table[T[n, k], {n, 0, 7}, {k, 1, Max[1, 2^(n-1)]}] // Flatten (* _Jean-François Alcover_, Apr 11 2017, after _Alois P. Heinz_ *) %o A230871 (Haskell) %o A230871 data Dtree = Dtree Dtree (Integer, Integer) Dtree %o A230871 a230871 n k = a230871_tabf !! n !! k %o A230871 a230871_row n = a230871_tabf !! n %o A230871 a230871_tabf = [0] : map (map snd) (rows $ deleham (0, 1)) where %o A230871 rows (Dtree left (x, y) right) = %o A230871 [(x, y)] : zipWith (++) (rows left) (rows right) %o A230871 deleham (x, y) = Dtree %o A230871 (deleham (y, y + x)) (x, y) (deleham (y, 3 * y - x)) %o A230871 -- _Reinhard Zumkeller_, Nov 07 2013 %Y A230871 Cf. A230872, A230873. %Y A230871 Cf. A231330, A231331, A231335. %K A230871 nonn,tabf %O A230871 0,4 %A A230871 _Philippe Deléham_, Nov 06 2013 %E A230871 Incorrect formula removed by _Michel Marcus_, Sep 23 2023