|
|
A201452
|
|
Number of permutations of [n] with both a fixed point and a succession.
|
|
3
|
|
|
0, 0, 1, 1, 8, 37, 248, 1749, 14284, 130343, 1318194, 14630853, 176881314, 2313878809, 32567413038, 490762544907, 7883735348152, 134496767915753, 2428518101193448, 46270707955530689, 927734890186657436
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
A succession of a permutation p is the appearance of [k,k+1], e.g. in 23541, 23 is a succession.
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 8 because we have 1234, 1243, 1342, 1423, 2134, 2314, 3124 and 4231.
|
|
PROG
|
(PARI) A201452(n)=my(p, c); sum(k=1, n!, p=numtoperm(n, k); c=(p[1]==1); for(j=2, n, p[j]==j&c!=1&c++==3&break; p[j]-1==p[j-1]&c!=2&(c+=2)==3&break); c==3) \\ - M. F. Hasler, Jan 13 2013
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|