OFFSET
1,2
COMMENTS
Suppose u,v,p,q are positive integers and 0<|d|<1. Let
a(n)=n+floor(((u*n^p-d)/v)^(1/q)),
b(n)=n+floor(((v*n^q+d)/u)^(1/p)).
When the disjoint sets {u*i^p} and {v*j^q+d} are jointly ranked, the rank of u*n^p is a(n) and the rank of v*n^q+d is b(n). Therefore a and b are a pair of complementary sequences. Choosing d carefully serves as a basis for two types of adjusted joint rankings of non-disjoint sets {u*i^p} and {v*j^q}.
First, if we place u*i^p before v*j^q whenever u*i^p=v*j^q, then with 0<d<1, a(n) and b(n) are the ranks of u*n^p and v*j^q, respectively. For the second type, if we place u*i^p after v*j^q whenever u*i^p=v*j^q, then with -1<d<0, a(n) and b(n) are ranks of u*n^p and v*j^q, respectively.
EXAMPLE
Write the squares and cubes thus:
1..4....9..16..25....36..49..64..81
1.....8...........27.........64.....
Replace each by its rank, where ties are settled by ranking the square before the cube:
a=(1,3,5,6,7,9,10,11,13,...)
b=(2,4,8,12,...)
MATHEMATICA
d=1/2;
a[n_]:=n+Floor[(n^2-d)^(1/3)]; (* rank of n^2 *)
b[n_]:=n+Floor[(n^3+d)^(1/2)]; (* rank of n^3+1/2 *)
Table[a[n], {n, 1, 100}]
Table[b[n], {n, 1, 100}]
(* end *)
(* A more general program follows. *)
d=1/2; u=1; v=1; p=2; q=3;
h[n_]:=((u*n^p-d)/v)^(1/q);
a[n_]:=n+Floor[h[n]]; (* rank of u*n^p *)
k[n_]:=((v*n^q+d)/u)^(1/p);
b[n_]:=n+Floor[k[n]]; (* rank of v*n^q *)
Table[a[n], {n, 1, 100}]
Table[b[n], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 13 2011
STATUS
approved