OFFSET
1,2
COMMENTS
This permutation of the positive integers is the inverse of A026166. - Clark Kimberling, Oct 20 2019
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
MATHEMATICA
a[1] = 1; z = 3000;
Do[{L, R} = {n - #, n + #} &[Floor[(n - 1)/2]];
If[! Head[a[L]] === Integer, a[L] = n, a[R] = n], {n, 2, z}];
a026166 = Most[Last[
Last[Reap[NestWhile[# + 1 &, 1, Head[Sow[a[#]]] === Integer &]]]]]; (* A026166 *)
Flatten[Table[Position[a026166, n], {n, 1, 1000}]] (* A026167 *)
(* Peter J. C. Moses, Oct 20 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved