login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199855 Inverse permutation of A210521. 1
1, 4, 2, 5, 3, 6, 11, 7, 12, 8, 13, 9, 14, 10, 15, 22, 16, 23, 17, 24, 18, 25, 19, 26, 20, 27, 21, 28, 37, 29, 38, 30, 39, 31, 40, 32, 41, 33, 42, 34, 43, 35, 44, 36, 45, 56, 46, 57, 47, 58, 48, 59, 49, 60, 50, 61, 51, 62, 52, 63, 53, 64, 54, 65, 55, 66, 79 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Permutation of the 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.

Enumeration table T(n,k). The order of the list:

T(1,1)=1;

T(2,1), T(2,2), T(1,2), T(1,3), T(3,1),

. . .

T(2,n-1), T(4,n-3), T(6,n-5),...T(n,1),

T(2,n),   T(4,n-2), T(6,n-4),...T(n,2),

T(1,n),   T(3,n-2), T(5,n-4),...T(n-1,2),

T(1,n+1), T(3,n-1), T(5,n-3),...T(n+1,1),

. . .

The order of the list elements of adjacent antidiagonals. Let m be integer number, m>0.

Movement by antidiagonal {T(1,2*m), T(2*m,1)}     from T(2,2*m-1) to T(2*m,1)   length of step is 2,

movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(2,2*m)   to T(2*m,2)   length of step is 2,

movement by antidiagonal {T(1,2*m), T(2*m,1)}     from T(1,2*m)   to T(2*m-1,2) length of step is 2,

movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(1,2*m+1) to T(2*m+1,1) length of step is 2.

Table contains:

row  1 is alternation of elements A001844 and A084849,

row  2 is alternation of elements A130883 and A058331,

row  3 is alternation of elements A051890 and A096376,

row  4 is alternation of elements A033816 and A005893,

row  6 is alternation of elements A100037 and A093328;

row  5  accommodates elements A097080 in odd places,

row  7  accommodates elements A137882 in odd places,

row 10  accommodates elements A100038 in odd places,

row 14  accommodates elements A100039 in odd places;

column 1 is A093005 and alternation of elements A000384 and A001105,

column 2 is alternation of elements A046092 and A014105,

column 3 is A105638 and alternation of elements A014106 and A056220,

column 4 is alternation of elements A142463 and A014107,

column 5 is alternation of elements A091823 and A054000,

column 6 is alternation of elements A090288 and |A168244|,

column 8 is alternation of elements A059993 and A033537;

column  7 accommodates elements  A071355  in odd  places,

column  9 accommodates elements |A147973| in even places,

column 10 accommodates elements  A139570  in odd  places,

column 13 accommodates elements  A130861  in odd  places.

LINKS

Boris Putievskiy, Rows n = 1..140 of triangle, flattened

Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO]

Eric W. Weisstein, MathWorld: Pairing functions

Index entries for sequences that are permutations of the natural numbers

FORMULA

As table

T(n,k) = (2*k^2+(4*n-5)*k+2*n^2-3*n+2+(2+(-1)^k)*((1-(k+n-1)*(-1)^i)))/4.

As linear sequence

a(n) = (2*j^2+(4*i-5)*j+2*i^2-3*i+2+(2+(-1)^j)*((1-(t+1)*(-1)^i)))/4, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=int((math.sqrt(8*n-7) - 1)/ 2).

EXAMPLE

The start of the sequence as table:

1....4...5...11...13...22...25...37...41...56...61...

2....3...7....9...16...19...29...33...46...51...67...

6...12..14...23...26...38...42...57...62...80...86...

8...10..17...20...30...34...47...52...68...74...93...

15..24..27...39...43...58...63...81...87..108..115...

18..21..31...35...48...53...69...75...94..101..123...

28..40..44...59...64...82...88..109..116..140..148...

32..36..49...54...70...76...95..102..124..132..157...

45..60..65...83...89..110..117..141..149..176..185...

50..55..71...77...96..103..125..133..158..167..195...

66..84..90..111..118..142..150..177..186..216..226...

. . .

The start of the sequence as triangle array read by rows:

1;

4,2;

5,3,6;

11,7,12,8;

13,9,14,10,15;

22,16,23,17,24,18;

25,19,26,20,27,21,28;

37,29,38,30,39,31,40,32;

41,33,42,34,43,35,44,36,45;

56,46,57,47,58,48,59,49,60,50;

61,51,62,52,63,53,64,54,65,55,66;

. . .

The start of the sequence as array read by rows, the length of row r is 4*r-3.

First 2*r-2 numbers are from the row number 2*r-2 of  triangle array, located above.

Last  2*r-1 numbers are from the row number 2*r-1 of  triangle array, located above.

1,

4,2,5,3,6;

11,7,12,8,13,9,14,10,15;

22,16,23,17,24,18,25,19,26,20,27,21,28;

37,29,38,30,39,31,40,32,41,33,42,34,43,35,44,36,45;

56,46,57,47,58,48,59,49,60,50,61,51,62,52,63,53,64,54,65,55,66;

. . .

Row number r contains permutation numbers 4*r-3 from 2*r*r-5*r+4 to 2*r*r-r:

2*r*r-3*r+2,2*r*r-5*r+4, 2*r*r-3*r+3, 2*r*r-5*r+5,2*r*r-3*r+4,2*r*r-5*r+6,...2*r*r-3*r+1,2*r*r-r.

. . .

PROG

(Python)

t=int((math.sqrt(8*n-7) - 1)/ 2)

i=n-t*(t+1)/2

j=(t*t+3*t+4)/2-n

result=(2*j**2+(4*i-5)*j+2*i**2-3*i+2+(2+(-1)**j)*((1-(t+1)*(-1)**i)))/4

CROSSREFS

Cf. A210521, A001844, A084849, A130883, A058331, A051890, A096376, A033816, A005893, A100037, A093328, A097080, A137882, A100038, A100039, A093005, A000384, A001105, A046092, A014105, A105638, A014106, A056220, A142463, A014107, A091823, A054000, A090288, A168244, A059993, A033537, A071355, A147973, A139570, A130861.

Sequence in context: A267185 A065187 A185511 * A127914 A218035 A090964

Adjacent sequences:  A199852 A199853 A199854 * A199856 A199857 A199858

KEYWORD

nonn,tabl

AUTHOR

Boris Putievskiy, Feb 04 2013

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 06:57 EST 2019. Contains 329784 sequences. (Running on oeis4.)