OFFSET
1,2
COMMENTS
Suppose that f and g are strictly increasing functions for which (f(i)) and (g(j)) are integer sequences. If 0<|d|<1, the sets F={f(i): i>=1} and G={g(j)+d: j>=1} are clearly disjoint. Let f^=(inverse of f) and g^=(inverse of g). When the numbers in F and G are jointly ranked, the rank of f(n) is a(n):=n+floor(g^(f(n))-d), and the rank of g(n)+d is b(n):=n+floor(f^(g(n))+d). Therefore, the sequences a and b are a complementary pair.
Although the sequences (f(i)) and (g(j)) may not be disjoint, the sequences (f(i)) and (g(j)+d) are disjoint, and this observation enables two types of adjusted joint rankings:
(1) if 0<d<1, we call a and b the "adjusted joint rank sequences of (f(i)) and (g(j)) with f(i) before g(j) when f(i)=g(j)"; (2) if -1<d<0, we call a and b the "adjusted joint rank sequences of (f(i)) and (g(j)) with f(i) after g(j) when f(i)=g(j)".
Using f(i)=ui+v, g(j)=xj^2+yj+z, we find a and b given by
a(n)=n+floor((-y+sqrt(4x(un+v-d)+y^2))/(2x)),
b(n)=n+floor((xn^2+yn-v+d)/(2u))),
where a(n) is the rank of un+v and b(n) is the rank
xn^2+yn+z+d, and d must be chosen small enough, in
absolute value, that the sets F and G are disjoint.
EXAMPLE
First, write
1..3..5..7..9..11..13..15..17..21..23.. (odds)
1..3....6.....10.......15......21.... (triangular)
Then replace each number by its rank, where ties are settled by ranking the odd number before the triangjular:
a=(1,3,5,7,8,10,11,12,14,....)=A186350
b=(2,4,6,9,13,17,21,26,32,...)=A186351.
MATHEMATICA
(* adjusted joint rank sequences a and b, using general formula for ranking 1st degree u*n+v and 2nd degree x*n^2+y*n+z *)
d=1/2; u=2; v=-1; x=1/2; y=1/2; (* odds and triangular *)
h[n_]:=(-y+(4x(u*n+v-d)+y^2)^(1/2))/(2x);
a[n_]:=n+Floor[h[n]]; (* rank of u*n+v *)
k[n_]:=(x*n^2+y*n-v+d)/u;
b[n_]:=n+Floor[k[n]]; (* rank of x*n^2+y*n+d *)
Table[a[n], {n, 1, 120}] (* A186350 *)
Table[b[n], {n, 1, 100}] (* A186351 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 18 2011
STATUS
approved