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 A186219 #13 Sep 08 2022 08:45:55 %S A186219 1,3,5,7,8,10,12,13,15,17,19,20,22,24,25,27,29,31,32,34,36,37,39,41, %T A186219 43,44,46,48,49,51,53,54,56,58,60,61,63,65,66,68,70,72,73,75,77,78,80, %U A186219 82,83,85,87,89,90,92,94,95,97,99,101,102,104,106,107,109,111,113,114,116,118,119,121,123,124,126,128,130,131,133,135,136,138,140,142,143,145,147,148,150,152,153,155,157,159,160,162,164,165,167,169,171 %N A186219 Adjusted joint rank sequence of (f(i)) and (g(j)) with f(i) before g(j) when f(i)=g(j), where f and g are the triangular numbers and squares. Complement of A186220. %C A186219 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. %C A186219 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: %C A186219 (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)". %C A186219 Using f(i)=ui^2+vi+w and g(j)=xj^2+yj+z, we can carry out adjusted joint rankings of any pair of polygonal sequences (triangular, square, pentagonal, etc.) In this case, %C A186219 a(n)=n+floor((-y+sqrt(4x(un^2+vn+w-z-d)+y^2))/(2x)), %C A186219 b(n)=n+floor((-v+sqrt(4u(xn^2+yn+z-w+d)+v^2)/(2u)), %C A186219 where a(n) is the rank of un^2+vn+w and b(n) is the rank %C A186219 of xn^2+yn+z+d, where d must be chosen small enough, in %C A186219 absolute value, that the sets F and G are disjoint. %C A186219 Example: f=A000217 (triangular numbers) and g=A000290 (squares) yield adjusted rank sequences a=A186219 and b=A186220 for d=1/4 and a=A186221 and b=A186222 for d=-1/4. %H A186219 G. C. Greubel, <a href="/A186219/b186219.txt">Table of n, a(n) for n = 1..10000</a> %F A186219 a(n) = n + floor(sqrt((n^2+n)/2 - 1/4)), (A186219). %F A186219 b(n) = n + floor((-1 + sqrt(8*n^2+3))/2), (A186220). %e A186219 First, write %e A186219 1..3...6..10..15...21..28..36..45... (triangular) %e A186219 1....4.. 9......16...25....36....49.. (square) %e A186219 Replace each number by its rank, where ties are settled by ranking the triangular number before the square: %e A186219 a=(1,3,5,7,8,10,12,13,...) %e A186219 b=(2,4,6,9,11,14,16,18,...). %t A186219 (* adjusted joint ranking of triangular numbers and squares, using general formula *) %t A186219 d=1/4; u=1/2; v=1/2; w=0; x=1; y=0; z=0; %t A186219 h[n_]:=-y+(4x(u*n^2+v*n+w-z-d)+y^2)^(1/2); %t A186219 a[n_]:=n+Floor[h[n]/(2x)]; (* rank of triangular n(n+1)/2 *) %t A186219 k[n_]:=-v+(4u(x*n^2+y*n+z-w+d)+v^2)^(1/2); %t A186219 b[n_]:=n+Floor[k[n]/(2u)]; (* rank of square n^2 *) %t A186219 Table[a[n],{n,1,100}] (* A186219 *) %t A186219 Table[b[n],{n,1,100}] (* A186220 *) %o A186219 (PARI) vector(100, n, n + floor(sqrt((n^2 + n)/2 - 1/4))) \\ _G. C. Greubel_, Aug 26 2018 %o A186219 (Magma) [n + Floor(Sqrt((n^2 + n)/2 - 1/4)): n in [1..100]]; // _G. C. Greubel_, Aug 26 2018 %Y A186219 Cf. A186145 (joint ranks of squares and cubes), %Y A186219 A000217 (triangular numbers), %Y A186219 A000290 (squares), %Y A186219 A186220 (complement of A186119) %Y A186219 A186221 ("after" instead of "before") %Y A186219 A186222 (complement of A186221). %K A186219 nonn %O A186219 1,2 %A A186219 _Clark Kimberling_, Feb 15 2011