This site is supported by donations to The OEIS Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A060736 Array of square numbers read by antidiagonals in up direction. 12
 1, 2, 4, 5, 3, 9, 10, 6, 8, 16, 17, 11, 7, 15, 25, 26, 18, 12, 14, 24, 36, 37, 27, 19, 13, 23, 35, 49, 50, 38, 28, 20, 22, 34, 48, 64, 65, 51, 39, 29, 21, 33, 47, 63, 81, 82, 66, 52, 40, 30, 32, 46, 62, 80, 100 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS A simple permutation of natural numbers. a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers. - Boris Putievskiy, Jan 09 2013 LINKS Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO]. Eric W. Weisstein, MathWorld: Pairing functions FORMULA T(n+1, k)=n*n+k, T(k, n+1)=(n+1)*(n+1)+1-k, 1 <= k <= n+1. a(n)=i^2-j+1 if i >= j, a(n)=(j-1)^2 + i if i <  j, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Jan 09 2013 EXAMPLE 1 4 9 16 .. => a(1)= 1 2 3 8 15 .. => a(2)= 2, a(3)=4 5 6 7 14 .. => a(4)= 5, a(5)=3, a(6)=9 10 11 12 13 .. => a(7)=10, a(8)=6, a(9)=8, a(10)=16 MATHEMATICA Table[ If[n < 2*k-1, k^2 + k - n, (n-k)^2 + k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 09 2013 *) PROG (Python) # Boris Putievskiy, Jan 09 2013 t=int((math.sqrt(8*n-7) - 1)/ 2) i=n-t*(t+1)/2 j=(t*t+3*t+4)/2-n if i>=j:    result=i**2-j+1 else:    result=(j-1)**2+i CROSSREFS Cf. A060734. Inverse permutation: A064788, the first inverse function (numbers of rows) A194258, the second inverse function (numbers of columns) A194195. Sequence in context: A026206 A117606 A245814 * A097292 A269780 A038776 Adjacent sequences:  A060733 A060734 A060735 * A060737 A060738 A060739 KEYWORD nonn,tabl AUTHOR Frank Ellermann, Apr 23 2001 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 15 20:47 EST 2019. Contains 319184 sequences. (Running on oeis4.)