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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A194982 Inverse permutation to A194981; every positive integer occurs exactly once. 7
1, 2, 3, 4, 6, 5, 7, 9, 10, 8, 11, 13, 15, 14, 12, 16, 18, 20, 21, 19, 17, 22, 24, 26, 27, 28, 25, 23, 29, 31, 33, 34, 36, 35, 32, 30, 37, 39, 41, 42, 44, 45, 43, 40, 38, 46, 48, 50, 51, 53, 55, 54, 52, 49, 47, 56, 58, 60, 61, 63, 65, 66, 64, 62, 59, 57, 67, 69, 71 (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 positive integers. - Boris Putievskiy, Jan 08 2013

Enumeration table T(n,k) n,k >0 by diagonals. Symmetrical movement from edges to center diagonal. The order of the list - if n is odd: T(1,n), T(n,1), T(2,n-1), T(n-1,2), ..., T (floor(n+1)/2,floor(n+1)/2); if n is even: T(1,n), T(n,1), T(2,n-1), T(n-1,2),...T(floor(n+1)/2-1,floor(n+1)/2+1), T(floor(n+1)/2+1,floor(n+1)/2-1). - Boris Putievskiy, Jan 08 2013

LINKS

Table of n, a(n) for n=1..69.

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

Eric Weisstein's World of Mathematics, Pairing functions

Index entries for sequences that are permutations of the natural numbers

FORMULA

From Boris Putievskiy, Jan 08 2013: (Start)

a(n) = i*(2*i-1) + (j-i)*(3*i+j-3)/2, if i<=j,

a(n) = j*(2*i-1) + (i-j)*(3*j+i-3)/2 +1, 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). (End)

EXAMPLE

The start of the sequence as table:

   1,  2,  4,  7, 11, 16, ...

   3,  6,  9, 13, 18, 24, ...

   5, 10, 15, 20, 26, 33, ...

   8, 14, 21, 28, 35, 43, ...

  12, 19, 27, 36, 45, 54, ...

  17, 25, 34, 44, 55, 66, ...

  ...

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

   1;

   2,  3;

   4,  6,  5;

   7,  9, 10,  8;

  11, 13, 15, 14, 12;

  16, 18, 20, 21, 19, 17;

  ...

Row number r (r > 1) contains permutation of r numbers

<(r^2-r+2)/2, (r^2-r+2)/2 + 1 ,...,(r^2+r-2)/2 + 1>:

(r^2-r+2)/2, (r^2-r+2)/2+2, ... (r^2-r+2)/2+3, (r^2-r+2)/2+1. - Boris Putievskiy, Jan 08 2013

MATHEMATICA

See A194981.

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

if j>=i:

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

else:

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

CROSSREFS

Cf. A194980, A194981, A188568.

Sequence in context: A132284 A131966 A194970 * A064578 A194969 A194981

Adjacent sequences:  A194979 A194980 A194981 * A194983 A194984 A194985

KEYWORD

nonn,tabl

AUTHOR

Clark Kimberling, Sep 07 2011

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 May 13 19:36 EDT 2021. Contains 343868 sequences. (Running on oeis4.)