A246141 Index sequence for limit-block extending A006337 (difference sequence of the Beatty sequence for sqrt(2)) with first term as initial block.
1, 3, 6, 8, 15, 20, 27, 32, 37, 49, 66, 78, 90, 107, 119, 136, 148, 160, 177, 189, 206, 235, 247, 276, 305, 317, 346, 375, 404, 416, 445, 474, 486, 515, 556, 585, 614, 655, 684, 725, 754, 783, 824, 853, 894, 923, 964, 993, 1022, 1063, 1092, 1133, 1162, 1191
Offset: 1
Keywords
Examples
S = A006337, with B = (s(1)); that is, (m,k) = (1,0) S = (1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2,...) B'(0) = (1) B'(1) = (1,2) B'(2) = (1,2,1) B'(3) = (1,2,1,1) B'(4) = (1,2,1,1,2) B'(5) = (1,2,1,1,2,1) S^ = (1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1,...), with index sequence (1,3,6,8,15,...)
Links
- G. C. Greubel, Table of n, a(n) for n = 1..550
Programs
-
Mathematica
seqPosition1[list_, seqtofind_] := If[Length[#] > Length[list], {}, Last[Last[ Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 1]]]] &[seqtofind]; s = Differences[Table[Floor[n*Sqrt[2]], {n, 10000}]]; Take[s, 60] t = {{1}}; p[0] = seqPosition1[s, Last[t]]; s = Drop[s, p[0]]; Off[Last::nolast]; n = 1; While[(p[n] = seqPosition1[s, Last[t]]) > 0, (AppendTo[t, Take[s, {#, # +Length[Last[t]]}]]; s = Drop[s, #]) &[p[n]]; n++]; On[Last::nolast]; Last[t] (* A246140 *) Accumulate[Table[p[k], {k, 0, n - 1}]] (* A246141 *)
Comments