OFFSET
1,1
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 after the triangular:
a=(2,4,5,7,8,10,11,13,14,15,....)=A186352
b=(1,3,6,9,12,16,21,26,31,37,...)=A186353.
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}] (* A186352 *)
Table[b[n], {n, 1, 100}] (* A186353 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 18 2011
STATUS
approved