OFFSET
1,2
COMMENTS
Suppose that S = (s(m)), for m >= 1, is a sequence of distinct real numbers that is dense in an open interval (a,b), such as the numbers (sin(n)), for n>=1, dense in (-1,1). The increasing partition array (p(n,k)) of the set N of positive integers is defined inductively as follows: p(1,1) = 1, and for k >= 2, p(1,k) = least m such that s(m) > s(p(1,k-1)). For n>=2, p(n,1) = least new m (that is, m is not p(h,k) for any h<=n-1 and k>=1), and for k>=2, p(n,k) = least new m such that s(m) > s(p(n,k-1)).
The decreasing partition array (p(n,k)) of N is defined as follows: p(1,1)=s(1), and for k>=2, p(1,k) = least new m such that s(m) < s(p(1,k-1)). For n>=2, p(n,1) = least new m, and for k>=2, p(n,k) = least new m such that s(m) < (p(n,k-1)).
For a guide to related partition arrays, see A388853.
EXAMPLE
Fractional parts of tan(n): 0.557..., -0.185..., -0.142..., 0.157..., -0.380..., -0.291..., etc., from which the first few terms of the increasing and decreasing partition arrays can be checked.
Corner:
1 2 5 8 11 90 630 1120
3 6 9 12 15 93 445 985
4 18 21 34 37 112 140 194
7 10 13 14 19 22 24 27
16 20 25 33 53 65 74 81
17 26 40 47 49 50 75 78
23 35 38 41 44 46 55 72
29 32 39 42 48 52 62 69
36 45 57 58 60 63 66 68
51 54 64 70 80 99 113 118
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[Tan[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 14 2025
STATUS
approved
