OFFSET
0,6
COMMENTS
A 3 X 3 matrix Hofstadter type sequence.
EXAMPLE
We have A[1](1,1)=1, A[0](1,2)=1 and so A[2]=A[2-1]+A[2-1]=2A[1], a matrix with entries (2,2,4,2,2,4,4,8,14), yielding the 19th,20th,...,27th terms of the sequence.
MAPLE
with(linalg): A[0]:=matrix(3, 3, [0, 1, 1, 1, 1, 2, 1, 2, 4]): A[1]:=matrix(3, 3, [1, 1, 2, 1, 1, 2, 2, 4, 7]): for n from 2 to 10 do A[n]:=evalm(A[n-A[n-1][1, 1]]+A[n-A[n-2][1, 2]]) od: seq(seq(seq(A[k][i, j], j=1..3), i=1..3), k=0..10);
MATHEMATICA
Clear[A] (* Hofstadter 3 X 3 Matrix sequence*) digits=50 A[n_]:=A[n]=A[n-A[n-1][[1, 1]]]+A[n-A[n-2][[1, 2]]]; A[0]:={{0, 1, 1}, {1, 1, 2}, {1, 2, 4}}; A[1]:={{1, 1, 2}, {1, 1, 2}, {2, 4, 7}}; (* flattened sequence of 3 X 3 matrices made with a Hofstadter recurrence*) b=Flatten[Table[A[n], {n, 0, digits}]] ListPlot[b, PlotJoined->True]
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Aug 30 2004
EXTENSIONS
Edited by N. J. A. Sloane, May 13 2006
STATUS
approved