OFFSET
1,2
COMMENTS
This is a permutation of the natural numbers, with inverse permutation A277679.
LINKS
MATHEMATICA
x = Range[500];
NestWhile[# + 1 &, 1, (t = 1/2 # (1 + #);
x = Flatten[{Take[x, t],
Map[Reverse, Partition[Drop[x, t], # + 1]]}];
Length[x] > t) &]; x (* A277679 *)
Take[Ordering[#], Position[Differences[Sort[#]], Except[1]][[2]][[1]]]&[x] (* A277680 *) (* Peter J. C. Moses, Nov 13 2016 *)
CROSSREFS
KEYWORD
AUTHOR
Clark Kimberling, Nov 14 2016
STATUS
approved