OFFSET
1,2
EXAMPLE
Fractional parts of n*sqrt(5): 0.236..., 0.472..., 0.708..., 0.944..., 0.180..., 0.416..., etc., from which the first few terms of the increasing and decreasing partition arrays can be checked.
Corner:
1 2 3 4 21 38 55 72 377
5 6 7 8 25 42 59 76 93
9 10 11 12 29 46 63 80 97
13 14 15 16 33 50 67 84 101
17 18 19 20 37 54 71 88 105
22 23 24 41 58 75 92 109 126
26 27 28 45 62 79 96 113 130
30 31 32 49 66 83 100 117 134
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[n*Sqrt[5]], 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 19 2025
STATUS
approved
