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 A098916 #43 May 17 2022 03:41:37 %S A098916 0,4,36,288,2400,21600,211680,2257920,26127360,326592000,4390848000, %T A098916 63228211200,971415244800,15866448998400,274611617280000, %U A098916 5021469573120000,96746980442112000,1959126353952768000 %N A098916 Permanent of the n X n (0,1)-matrices with ij-th entry equal to zero iff (i=1,j=1),(i=1,j=n),(i=n,j=1) and (i=n,j=n). %C A098916 The number of all possible ways to permute n distinct aligned balls, one is blue, 2 are red and the remaining are green, such that no red ball occurs by the side of the blue ball. It may generalized to r red balls: a(n,r) = (n-r-1)(n-r)(n-2)!. - Alessandro Nicolosi (xxalenicxx(AT)hotmail.com), Jul 12 2006 %C A098916 A formula for the permanents of these n X n matrices(A) can be easily derived by minor expansion along the first row: a(n)=per(A)=(n-2)*per(B), where B is the n-1 X n-1 (0,1)-matrix with bij=0 iff (i=n,j=1) and (i=n,j=n). A new minor expansion along the last row of B yields: per(B)=(n-3)*per(C)=(n-3)*(n-2)! since C is the n-2 X n-2 1-matrix. Hence: a(n)=(n-2)*(n-3)*(n-2)!. - Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007 %C A098916 Number of permutations of n-1 having exactly 4 points P on the boundary of their bounding square. (A bounding square for a permutation of n is the square with sides parallel to the coordinate axis containing (1,1) and (n,n), and the set of points P of a permutation p is the set {(k,p(k)) for 0<k<n+1}). - _David Nacin_, Feb 27 2012 %C A098916 a(n) is also the number of permutations of n symbols that 4-commute with a transposition (see A233440 for definition): a permutation p of {1,...,n} has exactly four points on the boundary of their bounding square if and only if p 4-commutes with transposition (1, n). - _Luis Manuel Rivera MartÃnez_, Feb 27 2014 %H A098916 Vincenzo Librandi, <a href="/A098916/b098916.txt">Table of n, a(n) for n = 3..200</a> %H A098916 Emeric Deutsch, <a href="http://webbox.lafayette.edu/~gordong/MathMagProblems.pdf">Permutations and their bounding squares</a>, Math Magazine, 85(1) (2012), p. 63. %H A098916 Luis Manuel Rivera, <a href="http://arxiv.org/abs/1406.3081">Integer sequences and k-commuting permutations</a>, arXiv preprint arXiv:1406.3081 [math.CO], 2014-2015. %F A098916 a(n) = (n-2)*(n-3)*(n-2)!. - Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007 %F A098916 From _Amiram Eldar_, May 17 2022: (Start) %F A098916 Sum_{n>=4} 1/a(n) = 3 - e, where e = A001113. %F A098916 Sum_{n>=4} (-1)^n/a(n) = 2*(gamma - Ei(-1)) - 1/e - 1, where gamma = A001620 and Ei(-1) = -A099285. (End) %e A098916 a(3) = 0 because no configuration is allowed, the 2 red balls always occurs by the side of the blue ball. a(4) = 4 because we can have 4 possible permutations: b,g1,r1,r2 b,g1,r2,r1 r1,r2,g1,b r2,r1,g1,b. %p A098916 a:= n->(n-2)*(n-3)*(n-2)!: seq(a(n), n=3..20); # _Zerinvary Lajos_, Jul 01 2007 %t A098916 a[n_,r_] := (n-r-1)(n-r)(n-2)! (* Alessandro Nicolosi (xxalenicxx(AT)hotmail.com), Jul 12 2006 *) %t A098916 Table[(n-2)*(n-3)*(n-2)!,{n,3,30}] (* _Vincenzo Librandi_, Feb 27 2012 *) %o A098916 (PARI) permRWNb(a)=n=matsize(a)[1]; if(n==1,return(a[1,1])); sg=1; in=vectorv(n); x=in; x=a[,n]-sum(j=1,n,a[,j])/2; p=prod(i=1,n,x[i]); for(k=1,2^(n-1)-1,sg=-sg; j=valuation(k,2)+1; z=1-2*in[j]; in[j]+=z; x+=z*a[,j]; p+=prod(i=1,n,x[i],sg)); return(2*(2*(n%2)-1)*p) %o A098916 for(n=3,24,a=matrix(n,n,i,j,1); a[1,1]=0; a[1,n]=0; a[n,1]=0; a[n,n]=0; print1(permRWNb(a)", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007 %o A098916 (PARI) for(n=3,24,print1((n-2)*(n-3)*(n-2)!", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007 %o A098916 (Python) %o A098916 import math %o A098916 def a(n): %o A098916 return (n-2)*(n-3)*math.factorial(n-2) # _David Nacin_, Feb 27 2012 %Y A098916 Cf. A208528, A208529. %Y A098916 Cf. A001113, A001620, A099285. %K A098916 nonn %O A098916 3,2 %A A098916 _Simone Severini_, Oct 17 2004 %E A098916 More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007