This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A186145 #9 Sep 24 2021 10:42:02 %S A186145 1,3,5,6,7,9,10,11,13,14,15,17,18,19,21,22,23,24,26,27,28,29,31,32,33, %T A186145 34,35,37,38,39,40,42,43,44,45,46,48,49,50,51,52,54,55,56,57,58,60,61, %U A186145 62,63,64,65,67,68,69,70,71,72,74,75,76,77,78,79,81,82,83,84,85,86,88,89,90,91,92,93,95,96,97,98,99,100,102,103,104,105,106,107,108,110,111,112,113,114,115,116,118,119,120,121 %N A186145 Rank of n^2 when {i^2: i>=1} and {j^3: j>=1} are jointly ranked with i^2 before j^3 when i^2=j^3. Complement of A186146. %C A186145 Suppose u,v,p,q are positive integers and 0<|d|<1. Let %C A186145 a(n)=n+floor(((u*n^p-d)/v)^(1/q)), %C A186145 b(n)=n+floor(((v*n^q+d)/u)^(1/p)). %C A186145 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}. %C A186145 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. %C A186145 More generally, if u=h/k and v=s/t are positive rational numbers in lowest terms, then a(n) and b(n) are the respective ranks of u*n^p and v*n^q, adjusted as described above, according as d=1/(2kq) or d=-1/(2kq). Examples: A186148-A186159. %F A186145 a(n)=n+floor((n^2-1/2)^(1/3)) (A186145). %F A186145 b(n)=n+floor((n^3+1/2)^(1/2)) (A186146). %e A186145 Write the squares and cubes thus: %e A186145 1..4....9..16..25....36..49..64..81 %e A186145 1.....8...........27.........64..... %e A186145 Replace each by its rank, where ties are settled by ranking the square before the cube: %e A186145 a=(1,3,5,6,7,9,10,11,13,...) %e A186145 b=(2,4,8,12,...) %t A186145 d=1/2; %t A186145 a[n_]:=n+Floor[(n^2-d)^(1/3)]; (* rank of n^2 *) %t A186145 b[n_]:=n+Floor[(n^3+d)^(1/2)]; (* rank of n^3+1/2 *) %t A186145 Table[a[n],{n,1,100}] %t A186145 Table[b[n],{n,1,100}] %t A186145 (* end *) %t A186145 (* A more general program follows. *) %t A186145 d=1/2; u=1; v=1; p=2; q=3; %t A186145 h[n_]:=((u*n^p-d)/v)^(1/q); %t A186145 a[n_]:=n+Floor[h[n]]; (* rank of u*n^p *) %t A186145 k[n_]:=((v*n^q+d)/u)^(1/p); %t A186145 b[n_]:=n+Floor[k[n]]; (* rank of v*n^q *) %t A186145 Table[a[n],{n,1,100}] %t A186145 Table[b[n],{n,1,100}] %Y A186145 Cf. A186146. %K A186145 nonn %O A186145 1,2 %A A186145 _Clark Kimberling_, Feb 13 2011