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 A162956 #17 Feb 24 2021 02:48:18 %S A162956 0,1,1,4,1,4,7,13,1,4,7,13,7,19,34,40,1,4,7,13,7,19,34,40,7,19,34,46, %T A162956 40,91,142,121,1,4,7,13,7,19,34,40,7,19,34,46,40,91,142,121,7,19,34, %U A162956 46,40,91,142,127,40,91,148,178,211,415,547,364,1,4,7,13,7,19,34,40,7,19,34,46 %N A162956 a(0) = 0, a(1) = 1; a(2^i + j) = 3a(j) + a(j + 1) for 0 <= j < 2^i. %C A162956 2^n term triangle by rows, analogous to A160552 but multiplier is "3" instead of "2" %C A162956 Row sums = powers of 5: (1, 5, 25, 125, 625,...). %C A162956 Rows tend to A162957, obtained by taking (1, 3, 0, 0, 0,...) * A162956. %H A162956 Alois P. Heinz, <a href="/A162956/b162956.txt">Table of n, a(n) for n = 0..16383</a> %H A162956 David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.] %H A162956 N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a> %F A162956 Follows the same analogous procedure as A160552 but multiplier is 3 instead of 2. (n+1)-th row brings down n-th row and appends to the right and equal number of terms following the rules: from left to right,let a = last term, b = current term, c = next term. Then c = 3*a + b except for the rightmost term = 3*a + 1. %e A162956 The triangle begins: %e A162956 0; %e A162956 1; %e A162956 1, 4; %e A162956 1, 4, 7, 13; %e A162956 1, 4, 7, 13, 7, 19, 34, 40; %e A162956 1, 4, 7, 13, 7, 19, 34, 40, 7, 19, 34, 46, 40, 91, 142, 121; %e A162956 ... %e A162956 Row 4 = (1, 4, 7, 13, 7, 19, 34, 40): brings down (1, 4, 7, 13) then 7 = 3*1 + 4, 19 = 3*4 + 7, 34 = 3*7 + 13, 40 = 3*13 + 1. %p A162956 a:= proc(n) option remember; `if`(n<2, n, %p A162956 (j-> 3*a(j)+a(j+1))(n-2^ilog2(n))) %p A162956 end: %p A162956 seq(a(n), n=0..100); # _Alois P. Heinz_, Jan 28 2017 %t A162956 row[0] = {0}; row[1] = {1}; row[n_] := row[n] = Join[row[n-1], 3 row[n-1] + Append[Rest[row[n-1]], 1]]; Table[row[n], {n, 0, 7}] // Flatten (* _Jean-François Alcover_, Mar 13 2017 *) %Y A162956 Cf. A162957, A162958, A160552. %Y A162956 Cf. A170838-A170852, A170854-A170872. %K A162956 nonn %O A162956 0,4 %A A162956 _Gary W. Adamson_, Jul 18 2009 %E A162956 Edited with more terms by _N. J. A. Sloane_, Jan 02 2010