A245933 Limit-reverse of A006337 (the difference sequence of Beatty sequence for sqrt(2)), with first term as initial block.
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, 2, 1, 2, 1, 2, 1, 1
Offset: 1
Keywords
Examples
S = A006337 (re-indexed to start with s(0) = 1, with B = (s(0)); that is, (m,k) = (0,0) S = (1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2,...) B'(0) = (1) B'(1) = (2,1) 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, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1,...), with index sequence (1, 3, 5, 8, 13, 20, 25, 32, 37,...)
Links
- Clark Kimberling, Table of n, a(n) for n = 1..300
Programs
-
Mathematica
z = 100; seqPosition2[list_, seqtofind_] := Last[Last[Position[Partition[list, Length[#], 1], Flatten[{_, #, _}], 1, 2]]] &[seqtofind]; x = Sqrt[2]; s = Differences[Table[Floor[n*x], {n, 1, z^2}]] ; ans = Join[{s[[p[0] = pos = seqPosition2[s, #] - 1]]}, #] &[{s[[1]]}]; cfs = Table[s = Drop[s, pos - 1]; ans = Join[{s[[p[n] = pos = seqPosition2[s, #] - 1]]}, #] &[ans], {n, z}]; rcf = Last[Map[Reverse, cfs]]
Comments