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!)
A277427 Prime permutations, ordered lexicographically. 5

%I #18 Apr 10 2019 04:44:40

%S 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 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 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 Prime permutations, ordered lexicographically.

%C 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 Row n in the triangle consists of all permutations consisting of n followed by a permutation of 1..n-1, in lexicographic order.

%H Gus Wiseman, <a href="/A277427/b277427.txt">Table of n, a(n) for n = 1..5912</a>

%e The sequence of prime permutations begins:

%e 1,

%e 21,

%e 312, 321,

%e 4123, 4132, 4213, 4231, 4312, 4321,

%e ...

%p seq(op(map(t -> (n,op(t)), combinat:-permute(n-1))), n=1..6); # _Robert Israel_, Nov 07 2016

%t row[n_] := Join[{n}, #]& /@ Permutations[Range[n-1]];

%t Array[row, 5] // Flatten (* _Jean-François Alcover_, Apr 10 2019 *)

%Y Cf. A215474, A254040, A060223, A005117.

%K nonn,tabf

%O 1,2

%A _Gus Wiseman_, Oct 14 2016

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 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)