cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A064578 Inverse permutation to A057027.

This page as a plain text file.
%I A064578 #99 Apr 22 2024 20:16:30
%S A064578 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,
%T A064578 25,23,29,31,33,35,36,34,32,30,37,39,41,43,45,44,42,40,38,46,48,50,52,
%U A064578 54,55,53,51,49,47,56,58,60,62,64,66,65,63,61,59,57,67,69,71,73,75,77
%N A064578 Inverse permutation to A057027.
%C A064578 The sequence is an intra-block permutation of positive integers. - _Boris Putievskiy_, Mar 13 2024
%H A064578 Boris Putievskiy, <a href="/A064578/b064578.txt">Table of n, a(n) for n = 1..9870</a>
%H A064578 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [Of] Integer Sequences And Pairing Functions</a>, arXiv preprint arXiv:1212.2732 [math.CO], 2012.
%H A064578 Boris Putievskiy, <a href="https://arxiv.org/abs/2310.18466">Integer Sequences: Irregular Arrays and Intra-Block Permutations</a>, arXiv:2310.18466 [math.CO], 2023.
%H A064578 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A064578 From _Boris Putievskiy_, Mar 29 2024: (Start)
%F A064578 a(n) = A057944(n-1) + A194959(n).
%F A064578 T(n,k) = (n-1)*n/2 + min(2*k-1, 2*(n-k+1)), for 1 <= k <= n.
%F A064578 (End)
%e A064578 From _Boris Putievskiy_, Mar 13 2024: (Start)
%e A064578 Start of the sequence as a triangular array T(n,k) read by rows:
%e A064578        k=1   2   3   4   5   6
%e A064578   n=1:   1;
%e A064578   n=2:   2,  3;
%e A064578   n=3:   4,  6,  5;
%e A064578   n=4:   7,  9, 10,  8;
%e A064578   n=5:  11, 13, 15, 14, 12;
%e A064578   n=6:  16, 18, 20, 21, 19, 17;
%e A064578 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.
%e A064578 Subtracting (n-1)*n/2 from each term in row n gives A194959, in which each row is a permutation of 1..n:
%e A064578   1;
%e A064578   1, 2;
%e A064578   1, 3, 2;
%e A064578   1, 3, 4, 2;
%e A064578   1, 3, 5, 4, 2;
%e A064578   1, 3, 5, 6, 4, 2; (End)
%t A064578 T[n_, k_] := (n - 1)*n/2 + Min[2*k - 1, 2*(n - k + 1)];
%t A064578 Nmax = 6; Table[T[n, k], {n, 1, Nmax}, {k, 1, n}] // Flatten (* _Boris Putievskiy_, Mar 29 2024 *)
%o A064578 (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
%Y A064578 Cf. A057027, A057944, A194959.
%K A064578 nonn,easy
%O A064578 1,2
%A A064578 _N. J. A. Sloane_, Oct 16 2001
%E A064578 More terms from _Vladeta Jovovic_, Oct 18 2001