OFFSET
1,2
COMMENTS
See A186221.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n + floor(-1/2 + sqrt(2*n^2)).
EXAMPLE
See A186221.
MATHEMATICA
(* adjusted joint ranking; general formula *)
d=-1/4; u=1/2; v=1/2; w=0; x=1; y=0; z=0;
h[n_]:=-y+(4x(u*n^2+v*n+w-z-d)+y^2)^(1/2);
a[n_]:=n+Floor[h[n]/(2x)];
k[n_]:=-v+(4u(x*n^2+y*n+z-w+d)+v^2)^(1/2);
b[n_]:=n+Floor[k[n]/(2u)];
Table[a[n], {n, 1, 100}] (* A186221 *)
Table[b[n], {n, 1, 100}] (* A186222 *)
Table[n + Floor[Sqrt[2*n^2] - 1/2], {n, 1, 120}] (* G. C. Greubel, Aug 18 2018 *)
PROG
(PARI) vector(120, n, n + floor(-1/2 + sqrt(2*n^2))) \\ G. C. Greubel, Aug 18 2018
(Magma) [n + Floor(-1/2 + Sqrt(2*n^2)): n in [1..120]]; // G. C. Greubel, Aug 18 2018
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Clark Kimberling, Feb 15 2011
STATUS
approved