OFFSET
0,8
FORMULA
A[n_]:=A[n]=A[n-A[n-1][[1, 1]]]+A[n-A[n-2][[1, 2]]]; A[0]:={{0, 1}, {1, 1}}; A[1]:={{1, 1}, {1, 2}};
MATHEMATICA
Clear[A, M] (* Hofstadter 2 X 2 Matrix sequence*) (* by Roger L. Bagula *) digits=100 A[n_]:=A[n]=A[n-A[n-1][[1, 1]]]+A[n-A[n-2][[1, 2]]]; A[0]:={{0, 1}, {1, 1}}; A[1]:={{1, 1}, {1, 2}}; (* flattened sequence of 2 X 2 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 28 2004
STATUS
approved