OFFSET
0,4
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..16383
David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, 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.]
N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
FORMULA
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.
EXAMPLE
The triangle begins:
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, 40, 91, 142, 121;
...
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.
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
(j-> 3*a(j)+a(j+1))(n-2^ilog2(n)))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Jan 28 2017
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Jul 18 2009
EXTENSIONS
Edited with more terms by N. J. A. Sloane, Jan 02 2010
STATUS
approved