login
A131624
Square array read by antidiagonals: a(1,m) = m mod 10; a(n,1) = a(n-1,2); a(n,m) = a(n-1, a(n,m-1)+1) mod 9.
1
1, 2, 2, 3, 3, 3, 5, 5, 4, 4, 4, 4, 7, 5, 5, 8, 8, 2, 0, 6, 6, 2, 2, 2, 7, 2, 7, 7, 2, 2, 2, 2, 8, 4, 8, 8, 2, 2, 2, 2, 2, 1, 6, 0, 9, 2, 2, 2, 2, 2, 2, 5, 8, 1, 0, 2, 2, 2, 2, 2, 2, 2, 4, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 5, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 7, 5, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 6
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.
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
Cf. A001695/M2352 and A014221.
Sequence in context: A318350 A127332 A087826 * A165077 A165079 A175944
KEYWORD
nonn,tabl,easy
AUTHOR
Roger L. Bagula, Oct 02 2007
EXTENSIONS
Edited by N. J. A. Sloane, Feb 02 2008
STATUS
approved