login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #8 Mar 30 2012 17:34:21

%S 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,

%T 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,

%U 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

%N 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.

%C A double-modulus Ackermann recursion.

%D Harry R. Lewis and Christos H. Papadimitriou, Elements of the Theory of Computation, Prentice-Hall, 1981, pages 296 and 345

%D Wolfram, S., A New Kind of Science. Champaign, IL: Wolfram Media, p. 906, 2002.

%H Eric Weisstein, <a href="http://mathworld.wolfram.com/AckermannFunction.html">Ackermann Function</a>

%e 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,...

%e 2,3,4,5,6,7,8,0,1,2,3,4,5,6,7,8,0,1,2,3,..

%e 3,5,7,0,2,4,6,8,1,3,5,7,0,2,4,6,8,1,3,5,...

%e 5,4,2,7,8,1,5,4,2,7,8,1,5,4,2,7,8,1,5,4,..

%e 4,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,...

%e 8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,...

%p 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:

%t 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]

%Y Cf. A001695/M2352 and A014221.

%K nonn,tabl,easy

%O 1,2

%A _Roger L. Bagula_, Oct 02 2007

%E Edited by _N. J. A. Sloane_, Feb 02 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 14:31 EDT 2024. Contains 372481 sequences. (Running on oeis4.)