OFFSET
1,2
COMMENTS
A double-modulus Ackermann recursion.
REFERENCES
Harry R. Lewis and Christos H. Papadimitriou, Elements of the Theory of Computation, Prentice-Hall, 1981, pages 296 and 345
Wolfram, S., A New Kind of Science. Champaign, IL: Wolfram Media, p. 906, 2002.
LINKS
Eric Weisstein, Ackermann Function
EXAMPLE
1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,...
2,3,4,5,6,7,8,0,1,2,3,4,5,6,7,8,0,1,2,3,..
3,5,7,0,2,4,6,8,1,3,5,7,0,2,4,6,8,1,3,5,...
5,4,2,7,8,1,5,4,2,7,8,1,5,4,2,7,8,1,5,4,..
4,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,...
8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,...
MAPLE
A131624 := proc(n, m) option remember; if n =1 then m mod 10 ; elif m = 1 then procname(n-1, 2) ; else procname((n-1), 1+procname(n, m-1)) mod 9 ; end if; end proc:
MATHEMATICA
Clear[f] f[1, n_] := Mod[n, 10]; f[m_, 1] := f[m - 1, 2]; f[m_, n_] := Mod[f[m - 1, f[m, n - 1] + 1], 9]; 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
KEYWORD
AUTHOR
Roger L. Bagula, Oct 02 2007
EXTENSIONS
Edited by N. J. A. Sloane, Feb 02 2008
STATUS
approved