The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A056011 Unique triangle such that (1) every positive integer occurs exactly once; (2) row n consists of n consecutive numbers; (3) odd-numbered rows are increasing; and (4) even-numbered rows are decreasing. 12
 1, 3, 2, 4, 5, 6, 10, 9, 8, 7, 11, 12, 13, 14, 15, 21, 20, 19, 18, 17, 16, 22, 23, 24, 25, 26, 27, 28, 36, 35, 34, 33, 32, 31, 30, 29, 37, 38, 39, 40, 41, 42, 43, 44, 45, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Self-inverse permutation of the natural numbers. Mirror image of triangle in A056023. - Philippe Deléham, Apr 04 2009 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, Dec 24 2012 For generalizations see A218890, A213927. - Boris Putievskiy, Mar 10 2013 LINKS Reinhard Zumkeller, Rows n = 1..125 of table, flattened Boris Putievskiy, Transformations Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012. Eric W. Weisstein, MathWorld: Pairing functions FORMULA a(n) = ((i+j-1)*(i+j-2)+((-1)^t+1)*i - ((-1)^t-1)*j)/2, 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, Dec 24 2012 EXAMPLE The start of the sequence as table:    1,  3,  4, 10, 11, 21, ...    2,  5,  9, 12, 20, 23, ...    6,  8, 13, 19, 24, 34, ...    7, 14, 18, 25, 33, 40, ...   15, 17, 26, 32, 41, 51, ...   ... Enumeration by boustrophedonic ("ox-plowing") diagonal method. - Boris Putievskiy, Dec 24 2012 The start of the sequence as triangle array read by rows:    1;    3,  2;    4,  5,  6;   10,  9,  8,  7;   11, 12, 13, 14, 15;   ... MAPLE A056011 := proc(n, k)         if type(n, 'even') then                 A131179(n)-k+1 ;         else                 A131179(n)+k-1 ;         end if; end proc: # R. J. Mathar, Sep 05 2012 MATHEMATICA Flatten[If[EvenQ[Length[#]], Reverse[#], #]&/@Table[c=(n(n+1))/2; Range[ c-n+1, c], {n, 20}]] (* Harvey P. Dale, Mar 25 2012 *) PROG (Haskell) a056011 n = a056011_tabl !! (n-1) a056011_list = concat a056011_tabl a056011_tabl = ox False a000027_tabl where   ox turn (xs:xss) = (if turn then reverse xs else xs) : ox (not turn) xss a056011_row n = a056011_tabl !! (n-1) -- Reinhard Zumkeller, Nov 08 2013 CROSSREFS Cf. A079826, A131179 (first column), A218890, A213927. Cf. A000027, A038722. Sequence in context: A113001 A036812 A039906 * A117123 A116966 A182187 Adjacent sequences:  A056008 A056009 A056010 * A056012 A056013 A056014 KEYWORD nonn,tabl,nice,easy AUTHOR Clark Kimberling, Aug 01 2000 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 September 25 00:02 EDT 2020. Contains 337333 sequences. (Running on oeis4.)