OFFSET
1,2
FORMULA
{s(i),s(i+1)} => {s(i),s(i)+s(i+1), s(i+1)}, if s(i)+s(i+1) is odd, otherwise {s(i),s(i+1)} => {s(i), abs(s(i)-s(i+1)), s(i+1)}.
EXAMPLE
Triangle begins:
1,2
1,3,2
1,2,3,5,2
1,3,2,5,3,2,5,7,2
1,2,3,5,2,7,5,2,3,5,2,7,5,2,7,9,2
1,3,2,5,3,2,5,7,2,9,7,2,5,7,2,5,3,2,5,7,2,9,7,2,5,7,2,9,7,2,9,11,2
MATHEMATICA
s={1, 2}; Do[t=s; ti=1; Do[If[OddQ[su=s[[i]]+s[[i+1]]], t=Insert[t, su, i+ti], t=Insert[t, Abs[s[[i]]-s[[i+1]]], i+ti]]; ti++, {i, Length[s]-1}]; Print[t]; s=t, {8}]
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Zak Seidov, Mar 13 2007
STATUS
approved