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.

A201452 Number of permutations of [n] with both a fixed point and a succession.

This page as a plain text file.
%I A201452 #29 Jul 06 2021 16:58:17
%S A201452 0,0,1,1,8,37,248,1749,14284,130343,1318194,14630853,176881314,
%T A201452 2313878809,32567413038,490762544907,7883735348152,134496767915753,
%U A201452 2428518101193448,46270707955530689,927734890186657436
%N A201452 Number of permutations of [n] with both a fixed point and a succession.
%C A201452 A succession of a permutation p is the appearance of [k,k+1], e.g. in 23541, 23 is a succession.
%e A201452 a(4) = 8 because we have 1234, 1243, 1342, 1423, 2134, 2314, 3124 and 4231.
%o A201452 (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
%Y A201452 Cf. A002467, A180191, A207819, A207821.
%K A201452 nonn,more
%O A201452 0,5
%A A201452 _Jon Perry_, Jan 09 2013
%E A201452 Values a(1..10) double-checked by _M. F. Hasler_, Jan 13 2013
%E A201452 a(11)-a(13) from _Alois P. Heinz_, Jan 18 2013
%E A201452 a(14)-a(20) from _Alois P. Heinz_, Jul 06 2021