login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A nonsense sequence
0

%I #15 Dec 18 2022 07:03:22

%S 0,1,1,2,3,4,5,5,6,6,7,8,8,9,9,10,11,11,11,12,12,13,14,14,15,15,16,17,

%T 17,17,18,18,19,20,20,21,22,20,22,22,21,24,24,25,25,24,27,28,24,26,31,

%U 27,30,31,27,32,30,33,31,27,38

%N A nonsense sequence

%F A[n_]:=If[(n<33||n>33)&&(n<42||n>45)&&(n<56||n>59), a[[n]].A[n-1], c[[32]].A[n-1]] where A[0] = {{0, 1, 1, 2}, {1, 1, 2, 3}, {1, 2, 3, 4}, {2, 3, 4, 5}};

%t digits=60

%t Hofstadter[n_Integer?Positive] :=Hofstadter[n] =Hofstadter[n - Hofstadter[n-1]] + Hofstadter[n - Hofstadter[n-4]] Hofstadter[1] = Hofstadter[2] =1;Hofstadter[3] =2;

%t Hofstadter[0]= 0; Hofstadter[4]= 3;

%t n0=4

%t (* pattern matrices of the chaotic sequence*)

%t A[k_]=Table[Hofstadter[k+i+j-2], {i, 1, n0}, {j, 1, n0}]

%t M=Array[f, {n0, n0}]

%t m1=Flatten[M]

%t (* linear Markov matrix solutions *)

%t a=Table[Flatten[M/.Solve[A[n]-M.A[n-1]==0, m1], 1], {n, 1, digits}]; (* function for average matrix calculation*)

%t ave[n_Integer?Positive] :=ave[n] = (ave[n-1]*(n-1)+a[[n]])/n

%t ave[1]=a[[1]];

%t c=Table[ave[n], {n, 1, 32}]; c[[32]]

%t (* Matrix reconstruction tensors skipping the "bad spots" by substitution of an average matrix*)

%t B[n_]:=If[(n<33||n>33)&&(n<42||n>45)&&(n<56||n>59), a[[n]].B[n-1], c[[32]].B[n-1]]

%t B[0] = {{0, 1, 1, 2}, {1, 1, 2, 3}, {1, 2, 3, 4}, {2, 3, 4, 5}};

%t (* output sequence of the reconstruction*)

%t b=Flatten[Table[Floor[B[n][[1, 1]]], {n, 0, digits}]]

%t ListPlot[b, PlotJoined->True, PlotRange->All]

%K nonn,less,uned

%O 0,4

%A _Roger L. Bagula_, Sep 01 2004