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.
%I A055790 #74 May 07 2018 12:08:37 %S A055790 0,2,4,14,64,362,2428,18806,165016,1616786,17487988,206918942, %T A055790 2657907184,36828901754,547499510764,8691268384262,146725287298888, %U A055790 2624698909845026,49592184973992676,986871395973226286,20630087248996393888,451982388752415571082 %N A055790 a(n) = n*a(n-1) + (n-2)*a(n-2), a(0) = 0, a(1) = 2. %C A055790 With offset 1, permanent of (0,1)-matrix of size n X (n+d) with d=1 and n-1 zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, p. 201-202. - _Jaap Spies_, Dec 12 2003 %C A055790 With a(0) = 1, number of degree-(n+1) permutations p such that p(i) != i+2 for each i=1,2,...,n+1. - _Vladeta Jovovic_, Jan 03 2003 %C A055790 Equivalently number of degree-(n+1) permutations p such that p(i) != i-2 for each i=1,2,...,n+1. %C A055790 With a(0) = 1, number of degree-(n+1) permutations without fixed points between 2 and n. - _Olivier Gérard_, Jul 29 2016 %C A055790 Also column 3 of Euler's difference table (third diagonal in example of A068106). - _Enrique Navarrete_, Oct 31 2016 %C A055790 For n>=2, the number of circular permutations (in cycle notation) on [n+2] that avoid substrings (j,j+3), 1<=j<=n-1. For example, for n=2, the 4 circular permutations in S4 that avoid the substring {14} are (1234),(1243),(1324),(1342). Note that each of these circular permutations represent 4 permutations in one-line notation (see link 2017). - _Enrique Navarrete_, Feb 15 2017 %D A055790 Brualdi, Richard A. and Ryser, Herbert J., Combinatorial Matrix Theory, Cambridge NY (1991), Chapter 7. %H A055790 Reinhard Zumkeller, <a href="/A055790/b055790.txt">Table of n, a(n) for n = 0..250</a> %H A055790 T. Mansour and M. Shattuck, <a href="http://dx.doi.org/10.1016/j.disc.2015.12.004">Counting permutations by the number of successors within cycles</a>, Discr. Math., 339 (2016), 1368-1376. %H A055790 Enrique Navarrete, <a href="https://arxiv.org/abs/1610.06217">Generalized K-Shift Forbidden Substrings in Permutations</a>, arXiv:1610.06217 [math.CO], 2016. %H A055790 Enrique Navarrete, <a href="https://arxiv.org/abs/1702.02637">Forbidden Substrings in Circular K-Successions</a>, arXiv:1702.02637 [math.CO], 2017. %H A055790 Seok-Zun Song et al., <a href="http://dx.doi.org/10.1016/S0024-3795(03)00382-3">Extremes of permanents of (0,1)-matrices</a>, Special issue on the Combinatorial Matrix Theory Conference (Pohang, 2002). Linear Algebra Appl. 373 (2003), pp. 197-210. %F A055790 For n > 0, a(n) = round[(n+3+1/n)*n!/e] = 2*A000153(n) = A000255(n-1)+A000255(n) = A000166(n-1)+2*A000166(n)+A000166(n+1). %F A055790 G.f.: Q(0)*(1+x)/x - 1/x - 2, where Q(k)= 1 + (2*k + 1)*x/( (1+x) - 2*x*(1+x)*(k+1)/(2*x*(k+1) + (1+x)/Q(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 08 2013 %F A055790 G.f.: (1+x)^2/x/Q(0) - 1/x - 2, where Q(k)= 1 - 2*k*x - x^2*(k + 1)^2/Q(k+1); (continued fraction). - _Sergei N. Gladkovskii_, May 08 2013 %F A055790 G.f.: 2*(1+x)/G(0) - 1-x, where G(k)= 1 + 1/(1 - x*(2*k+2)/(x*(2*k+1) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 31 2013 %F A055790 G.f.: W(0) -1, where W(k) = 1 - x*(k+2)/( x*(k+1) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - _Sergei N. Gladkovskii_, Aug 26 2013 %F A055790 a(n) ~ sqrt(Pi/2)*n^n*sqrt(n)*(12*n + 37)/(6*exp(n+1)). - _Ilya Gutkovskiy_, Jul 29 2016 %F A055790 0 = a(n)*(+a(n+1) + 3*a(n+2) - a(n+3)) + a(n+1)*(-a(n+1) + 2*a(n+2) - a(n+3)) + a(n+2)*(+a(n+2)) for n>=0. - _Michael Somos_, Nov 01 2016 %e A055790 G.f. = 2*x + 4*x^2 + 14*x^3 + 64*x^4 + 362*x^5 + 2428*x^6 + ... %e A055790 a(3) = 3*a(2)+(3-2)*a(1) = 12+2 = 14. %e A055790 for n=1, the 2 permutations of [2] matches: %e A055790 12, 21 %e A055790 for n=2, the 4 permutations of [3] without 2 as a fixed point are %e A055790 132, 213, 231, 312. %e A055790 for n=3, the 14 permutations of [4] without fixed point at 2 or 3 are %e A055790 1324 1342 1423 2143 2314 2341 2413 %e A055790 3124 3142 3412 3421 4123 4312 4321 %p A055790 f := proc(n) option remember; if n <= 1 then 2*n else n*f(n-1)+(n-2)*f(n-2); fi; end; %t A055790 a[0] = 0; a[1] = 2; a[n_] := a[n] = a[n] = n*a[n - 1] + (n - 2)*a[n - 2]; %t A055790 Table[a[n], {n, 0, 21}] (* _Jean-François Alcover_, Nov 14 2017 *) %t A055790 RecurrenceTable[{a[0]==0,a[1]==2,a[n]==n*a[n-1]+(n-2)a[n-2]},a,{n,30}] (* _Harvey P. Dale_, May 07 2018 *) %o A055790 (Haskell) %o A055790 a055790 n = a055790_list !! n %o A055790 a055790_list = 0 : 2 : zipWith (+) %o A055790 (zipWith (*) [0..] a055790_list) (zipWith (*) [2..] $ tail a055790_list) %o A055790 -- _Reinhard Zumkeller_, Mar 05 2012 %o A055790 (PARI) a(n) = if(n==0, 0, round((n+3+1/n)*n!/exp(1))) \\ _Felix Fröhlich_, Jul 29 2016 %Y A055790 Cf. A000166 (Derangements, permutations without fixed points ). %Y A055790 Cf. A000255 (permutations with p(i)!=i+1, same type of recurrence). %Y A055790 Cf. A000153, A000261, A001909, A001910, A090010, A090012-A090016. %Y A055790 Apart from first term, appears in triangles A047920 or A068106 of differences of factorials, i.e. as third term of A000142, A001563, A001564, A001565 etc. %K A055790 nonn %O A055790 0,2 %A A055790 _Henry Bottomley_, Jul 13 2000 %E A055790 Comments corrected, new interpretation and examples by _Olivier Gérard_, Jul 29 2016