reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
proposed
approved
editing
proposed
allocated Rectangular array: T(n,k) is the position in s = A004713 at which the block s(1)..s(n) occurs for Clark Kimberlingthe kth time.
1, 3, 1, 4, 4, 1, 6, 6, 4, 1, 8, 8, 6, 42, 1, 14, 14, 42, 66, 66, 1, 17, 20, 66, 72, 78, 136, 1, 18, 24, 72, 78, 89, 195, 195, 1, 19, 28, 78, 89, 136, 370, 437, 775, 1, 20, 37, 89, 96, 144, 437, 504, 782, 775, 1, 23, 42, 96, 113, 195, 504, 676, 1170, 782
1,2
A004713 gives the positions of 1 in the base 2 expansion of 1/sqrt(2), which begins thus: 1,0,1,1,0,1,0,1,0,0,0,0,0,1,0,0,1,1,1,1. The block consisting of the first 1 terms is 1, and it occurs at positions 1,3,4,6,8,14,..., so that this is row 1 of A246340. The block consisting of the first 5 terms is 1,0,1,1,0, and it begins at the positions shown in row 5.
The first 6 rows follow:
1 .. 3 ... 4 ... 6 ... 8 ... 14 ...
1 .. 4 ... 6 ... 8 ... 14 .. 20 ...
1 .. 4 ... 6 ... 42 .. 66 .. 72 ...
1 .. 42 .. 66 .. 72 .. 78 .. 89 ...
1 .. 66 . 78 .. 89 .. 136 . 144 ..
1 .. 136 . 195 . 370 . 437 . 504 ..
z = 150000; s = RealDigits[1/Sqrt[2], 2, z][[1]]; Flatten[Position[s, 1]];
b[m_, n_] := b[m, n] = Take[s, {m, n}]; z1 = 100000; z2 = 12; t[k_] :=
t[k] = Take[Select[Range[1, z1], b[#, # + k] == b[1, 1 + k] &], z2]
Column[Table[t[k], {k, 0, z2}]](* A246340, array *)
w[n_, k_] := t[n][[k + 1]]; tt = Table[w[n - k, k], {n, 0, z2 - 1}, {k, n, 0, -1}] // Flatten (* A246340, sequence *)
allocated
nonn,easy,tabl
Clark Kimberling, Aug 24 2014
approved
editing
allocated for Clark Kimberling
allocated
approved