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.

A277427 Prime permutations, ordered lexicographically.

This page as a plain text file.
%I A277427 #18 Apr 10 2019 04:44:40
%S A277427 1,2,1,3,1,2,3,2,1,4,1,2,3,4,1,3,2,4,2,1,3,4,2,3,1,4,3,1,2,4,3,2,1,5,
%T A277427 1,2,3,4,5,1,2,4,3,5,1,3,2,4,5,1,3,4,2,5,1,4,2,3,5,1,4,3,2,5,2,1,3,4,
%U A277427 5,2,1,4,3,5,2,3,1,4,5,2,3,4,1,5,2,4,1,3,5,2,4,3,1,5,3,1,2,4,5,3,1,4,2,5,3,2,1
%N A277427 Prime permutations, ordered lexicographically.
%C A277427 A permutation of {1..n} is prime (in the sense of A215474) iff it is of the form (n, q_1, q_2, ..., q_{n-1}).
%C A277427 Row n in the triangle consists of all permutations consisting of n followed by a permutation of 1..n-1, in lexicographic order.
%H A277427 Gus Wiseman, <a href="/A277427/b277427.txt">Table of n, a(n) for n = 1..5912</a>
%e A277427 The sequence of prime permutations begins:
%e A277427 1,
%e A277427 21,
%e A277427 312, 321,
%e A277427 4123, 4132, 4213, 4231, 4312, 4321,
%e A277427 ...
%p A277427 seq(op(map(t -> (n,op(t)), combinat:-permute(n-1))), n=1..6); # _Robert Israel_, Nov 07 2016
%t A277427 row[n_] := Join[{n}, #]& /@ Permutations[Range[n-1]];
%t A277427 Array[row, 5] // Flatten (* _Jean-François Alcover_, Apr 10 2019 *)
%Y A277427 Cf. A215474, A254040, A060223, A005117.
%K A277427 nonn,tabf
%O A277427 1,2
%A A277427 _Gus Wiseman_, Oct 14 2016