A064788 Inverse permutation to A060736.
1, 2, 5, 3, 4, 8, 13, 9, 6, 7, 12, 18, 25, 19, 14, 10, 11, 17, 24, 32, 41, 33, 26, 20, 15, 16, 23, 31, 40, 50, 61, 51, 42, 34, 27, 21, 22, 30, 39, 49, 60, 72, 85, 73, 62, 52, 43, 35, 28, 29, 38, 48, 59, 71, 84, 98, 113, 99, 86, 74, 63, 53, 44, 36, 37, 47, 58, 70, 83, 97, 112
Offset: 1
Links
- Boris Putievskiy, Transformations Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
- Eric Weisstein's MathWorld, Pairing functions
- Index entries for sequences that are permutations of the natural numbers
Programs
-
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
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
Extensions
More terms from David Wasserman, Jan 15 2002
Comments