A246140 Limiting block extension of A006337 (difference sequence of the Beatty sequence for sqrt(2)) with first term as initial block.
1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1
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