OFFSET
1,2
LINKS
Boris Putievskiy, Transformations Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
Eric Weisstein's MathWorld, Pairing functions
FORMULA
a(n) = (i+j-1)*(i+j-2)/2+j, where i=min(t; t^2-n+1), j=min(t; n-(t-1)^2), t=floor(sqrt(n-1))+1. - Boris Putievskiy, Dec 24 2012
PROG
(PARI) A064788(n)={my(t=sqrtint(n-1)+1); A000217(min(t, t^2-n+1)-2+n=min(t, n-(t-1)^2))+n} \\ recall: A000217(n)=(n+1)*n/2 \\ M. F. Hasler, Jan 13 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
N. J. A. Sloane, Oct 20 2001
EXTENSIONS
More terms from David Wasserman, Jan 15 2002
STATUS
approved