OFFSET
1,1
COMMENTS
Note that A246694 has offset 0, so the values here are off by 1 from the positions as given by the indices (b-file or list) in that sequence. - M. F. Hasler, Nov 17 2014
EXAMPLE
A246694 begins with 1, 1, 2, 3, 2, 4, 3, 5, 4, 6, 7, 5, 8, 6, 9, 7, so that, for a(n) = position of first n and b(n) = position of last n, we have a = (1,3,4,6,8,10,...) and b = (2,5,7,9,12,...).
MATHEMATICA
z = 25; t[0, 0] = 1; t[1, 0] = 1; t[1, 1] = 2;
t[n_, 0] := If[OddQ[n], t[n - 1, n - 2] + 1, t[n - 1, n - 1] + 1];
t[n_, 1] := If[OddQ[n], t[n - 1, n - 1] + 1, t[n - 1, n - 2] + 1];
t[n_, k_] := t[n, k - 2] + 1;
u = Flatten[Table[t[n, k], {n, 0, z}, {k, 0, n}]]; (*A246694*)
w[n_] := Flatten[Position[u, n]]; A246706 = Table[Last[w[n]], {n, 1, 3*z}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 02 2014
STATUS
approved