OFFSET
1,2
EXAMPLE
Fractional parts of e*n: 0.718..., 0.436..., 0.154..., 0.873..., 0.591..., 0.309..., 0.027..., etc., from which the first few terms of the increasing and decreasing partition arrays can be checked.
Corner:
1 4 11 18 25 32 71 536
2 5 8 15 22 29 36 43
3 6 9 12 19 26 33 40
7 10 13 16 23 30 37 44
14 17 20 27 34 41 48 55
21 24 31 38 45 52 59 66
28 35 42 49 56 63 70 77
39 46 53 60 67 74 81 88
78 85 92 99 106 113 120 127
MATHEMATICA
highs := {Map[First, #], Most[FoldList[Plus, 1, Map[Length, #]]]} &[
Split[Rest[FoldList[Max, -\[Infinity], #]]]] &;
lows := {Map[First, #], Most[FoldList[Plus, 1, Map[Length, #]]]} &[
Split[Rest[FoldList[Min, +\[Infinity], #]]]] &;
seqS = Table[N[FractionalPart[E*n], 20], {n, 1, 1000}];
(* User: put your dense sequence S after seqS *)
indices = Range[Length[seqS]];
arrI = {}; (* start accumulating increasing partition array *)
Until[Last[arrI] == {}, AppendTo[arrI, Flatten[Map[Position[seqS, #] &,
highs[seqS[[Complement[indices, Flatten[arrI]]]]][[1]]]]]];
Grid[Take[arrI, 12]]
arrD = {}; (* start accumulating decreasing partition array *)
Until[Last[arrD] == {}, AppendTo[arrD, Flatten[Map[Position[seqS, #] &,
lows[seqS[[Complement[indices, Flatten[arrD]]]]][[1]]]]]];
Grid[Take[arrD, 12]]
(* Peter J. C. Moses, Sep 04 2025 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Oct 15 2025
STATUS
approved
