login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A131619
A general two modulo Ackermann recursion at 6 and 5.
0
1, 2, 2, 3, 3, 3, 0, 0, 4, 4, 3, 3, 2, 0, 5, 1, 1, 4, 4, 1, 0, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 0, 3, 3, 2, 1, 1, 1, 1, 3, 3, 0, 4, 3, 1, 1, 1, 1, 1, 1, 4, 2, 0, 4
OFFSET
1,2
COMMENTS
This double modulo Ackermann function was inspired by the tiling problem given in "Elements of the Theory of Computation" which resembles an Ackermann recursion. The {a,b}->{5,6} was designed for the 10 X 10 output given to be active. Without the modulo this function is effectively limited to 4 X 4 in Mathematica by computation time.
REFERENCES
S. Wolfram, A New Kind of Science. Champaign, IL: Wolfram Media, p. 906, 2002.
Harry R. Lewis and Christos H. Papadimitriou, Elements of the Theory of Computation, Prentice-Hall, 1981, page 296 and 345.
LINKS
Eric Weisstein's World of Mathematics, Ackermann function.
FORMULA
a(1, n) = n mod 6; a(m, 1) = a(m - 1, 2); a(m, n) = a(m - 1, a(m, n - 1) + 1) mod 5.
aout(n,m) = AntidiagonalTransform(a(n,m)).
EXAMPLE
{1},
{2, 2},
{3, 3, 3},
{0, 0, 4, 4},
{3, 3, 2, 0, 5},
{1, 1, 4, 4, 1, 0},
{1, 1, 3, 1, 1, 2, 1},
{1, 1, 1, 1, 0, 3, 3, 2},
{1, 1, 1, 1, 3, 3, 0, 4, 3},
{1, 1, 1, 1, 1, 1, 4, 2, 0, 4}
MATHEMATICA
f[1, n_] := Mod[n, 6]; f[m_, 1] := f[m - 1, 2]; f[m_, n_] := Mod[f[m - 1, f[m, n - 1] + 1], 5];
a0 = Table[f[a, b], {a, 1, 10}, {b, 1, 10}];
ListDensityPlot[%, ColorFunction -> (Hue[2# ] &)];
Dimensions[a0];
(* antidiagonal transform*)
c = Delete[Table[Reverse[Table[a0[[n, l - n]], {n, 1, l - 1}]], {l, 1, Dimensions[a0][[1]] + 1}], 1];
Flatten[c]
CROSSREFS
Sequence in context: A036012 A084401 A236465 * A048485 A127714 A283763
KEYWORD
nonn,tabl,uned
AUTHOR
Roger L. Bagula, Oct 02 2007
STATUS
approved