OFFSET
1,2
COMMENTS
Suppose that a number n has base-b digits b(m), b(m-1), ..., b(0). The base-b down-variation of n is the sum DV(n,b) of all d(i)-d(i-1) for which d(i) > d(i-1); the base-b up-variation of n is the sum UV(n,b) of all d(k-1)-d(k) for which d(k) < d(k-1). The total base-b variation of n is the sum TV(n,b) = DV(n,b) + UV(n,b). See A297330 for a guide to related sequences and partitions of the natural numbers.
Every positive integer occurs exactly once in the array, so that as a sequence this is a permutation of the positive integers.
Conjecture: each column, after some number of initial terms, satisfies a homogeneous linear recurrence relation.
EXAMPLE
Northwest corner:
1 2 3 5 6 7 10 15
4 9 14 16 17 18 19 20
8 13 24 29 32 33 34 35
12 28 44 48 49 50 51 52
76 136 141 156 196 201 206 216
140 200 205 220 396 456 461 476
204 460 716 780 796 812 816 817
MATHEMATICA
g[n_, b_] := Differences[IntegerDigits[n, b]];
b = 4; z = 200000; u = Table[-Total[Select[g[n, b], # < 0 &]], {n, 1, z}] ;
p[n_] := Position[u, n]; TableForm[Table[Take[Flatten[p[n]], 15], {n, 0, 9}]]
v[n_, k_] := p[k - 1][[n]];
Table[v[k, n - k + 1], {n, 10}, {k, n, 1, -1}] // Flatten
CROSSREFS
KEYWORD
AUTHOR
Clark Kimberling, Jan 21 2018
STATUS
approved