OFFSET
1,1
LINKS
Reed Kelly, Collatz-Pascal Triangle
FORMULA
Define a(n, m) for integers m, n: a(0, 0)=4, a(n, m) := 0 for m<0 and n<m, set x(n+1, m) = a(n, m)+a(n, m-1), if ( x(n+1, m) is even ), then a(n+1, m) = x(n+1, m)/2, otherwise a(n+1, m) = x(n+1, m). Now consider the terms a(2n, n).
MATHEMATICA
(*Returns the center row of the CPT*) CollatzPascalCenter[init_, n_] := Module[{CPT, CENTER, ROWA, ROWB, a, i, j}, If[ListQ[init], CPT = {init}, CPT = {{0, 4, 0}}]; CENTER = {4}; For[i = 1, i < n, i++, ROWA = CPT[[i]]; ROWB = {0}; For[j = 1, j < Length[ROWA], j++, a = ROWA[[j]] + ROWA[[j + 1]]; a = a/(2 - Mod[a, 2]); If[And[EvenQ[Length[ROWA]], (j == Length[ROWA]/2)], CENTER = Append[CENTER, a], ]; ROWB = Append[ROWB, a]; ]; ROWB = Append[ROWB, 0]; CPT = Append[CPT, ROWB]; ]; CENTER] CollatzPascalCenter[, 200]
CROSSREFS
KEYWORD
AUTHOR
Reed Kelly, Oct 14 2006
STATUS
approved