login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064578 Inverse permutation to A057027. 5
1, 2, 3, 4, 6, 5, 7, 9, 10, 8, 11, 13, 15, 14, 12, 16, 18, 20, 21, 19, 17, 22, 24, 26, 28, 27, 25, 23, 29, 31, 33, 35, 36, 34, 32, 30, 37, 39, 41, 43, 45, 44, 42, 40, 38, 46, 48, 50, 52, 54, 55, 53, 51, 49, 47, 56, 58, 60, 62, 64, 66, 65, 63, 61, 59, 57, 67, 69, 71, 73, 75, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The sequence is an intra-block permutation of positive integers. - Boris Putievskiy, Mar 13 2024
LINKS
Boris Putievskiy, Transformations [Of] Integer Sequences And Pairing Functions, arXiv preprint arXiv:1212.2732 [math.CO], 2012.
Boris Putievskiy, Integer Sequences: Irregular Arrays and Intra-Block Permutations, arXiv:2310.18466 [math.CO], 2023.
FORMULA
From Boris Putievskiy, Mar 29 2024: (Start)
a(n) = A057944(n-1) + A194959(n).
T(n,k) = (n-1)*n/2 + min(2*k-1, 2*(n-k+1)), for 1 <= k <= n.
(End)
EXAMPLE
From Boris Putievskiy, Mar 13 2024: (Start)
Start of the sequence as a triangular array T(n,k) read by rows:
k=1 2 3 4 5 6
n=1: 1;
n=2: 2, 3;
n=3: 4, 6, 5;
n=4: 7, 9, 10, 8;
n=5: 11, 13, 15, 14, 12;
n=6: 16, 18, 20, 21, 19, 17;
Row n contains a permutation block of the n numbers (n-1)*n/2+1, (n-1)*n/2+2, ..., (n-1)*n/2+n to themselves.
Subtracting (n-1)*n/2 from each term in row n gives A194959, in which each row is a permutation of 1..n:
1;
1, 2;
1, 3, 2;
1, 3, 4, 2;
1, 3, 5, 4, 2;
1, 3, 5, 6, 4, 2; (End)
MATHEMATICA
T[n_, k_] := (n - 1)*n/2 + Min[2*k - 1, 2*(n - k + 1)];
Nmax = 6; Table[T[n, k], {n, 1, Nmax}, {k, 1, n}] // Flatten (* Boris Putievskiy, Mar 29 2024 *)
PROG
(PARI) a(n) = my(A = (sqrtint(8*n) + 1)\2, B = A*(A - 1)/2, C = n - B); B + if(C <= (A+1)\2, 2*C - 1, 2*(A - C + 1)) \\ Mikhail Kurkov, Mar 12 2024
CROSSREFS
Sequence in context: A360371 A194970 A194982 * A371247 A361251 A194969
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Oct 16 2001
EXTENSIONS
More terms from Vladeta Jovovic, Oct 18 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)