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 A022916 #43 Nov 14 2023 16:44:12 %S A022916 1,1,2,6,12,30,90,210,560,1680,4200,11550,34650,90090,252252,756756, %T A022916 2018016,5717712,17153136,46558512,133024320,399072960,1097450640, %U A022916 3155170590,9465511770,26293088250,75957810500,227873431500,638045608200,1850332263780,5550996791340 %N A022916 Multinomial coefficient n!/([n/3]![(n+1)/3]![(n+2)/3]!). %C A022916 Number of permutation patterns modulo 3. This matches the multinomial formula. - _Olivier Gérard_, Feb 25 2011 %C A022916 Also the number of permutations of n elements where p(k-3) < p(k) for all k. - _Joerg Arndt_, Jul 23 2011 %C A022916 Also the number of n-step walks on cubic lattice starting at (0,0,0), ending at (floor(n/3), floor((n+1)/3), floor((n+2)/3)), remaining in the first (nonnegative) octant and using steps (0,0,1), (0,1,0), and (1,0,0). - _Alois P. Heinz_, Oct 11 2019 %H A022916 Alois P. Heinz, <a href="/A022916/b022916.txt">Table of n, a(n) for n = 0..1000</a> (first 101 terms from Vincenzo Librandi) %F A022916 Recurrence: (n+1)*(n+2)*(3*n+1)*a(n) = 3*(3*n^2 + 3*n + 2)*a(n-1) + 27*(n-1)*(n+2)*a(n-2) + 27*(n-2)*(n-1)*(3*n+4)*a(n-3). - _Vaclav Kotesovec_, Feb 26 2014 %F A022916 a(n) ~ 3^(n+3/2) / (2*Pi*n). - _Vaclav Kotesovec_, Feb 26 2014 %e A022916 Starting from n=4, several permutations have the same pattern. Both (3,1,4,2) and (3,4,1,2) have pattern (0, 1, 1, 2) modulo 3. %p A022916 a:= n-> combinat[multinomial](n, floor((n+i)/3)$i=0..2): %p A022916 seq(a(n), n=0..24); # _Alois P. Heinz_, Oct 11 2019 %t A022916 Table[ n!/(Quotient[n, 3]!*Quotient[n + 1, 3]!*Quotient[n + 2, 3]!), {n, 0, 30}] %t A022916 Table[n!/Times@@(Floor/@((n+{0,1,2})/3)!),{n,0,30}] (* _Harvey P. Dale_, Jul 13 2012 *) %t A022916 Table[Multinomial[Floor[n/3], Floor[(n+1)/3], Floor[(n+2)/3]], {n, 0, 30}] (* _Jean-François Alcover_, Jun 24 2015 *) %o A022916 (PARI) a(n)=n!/((n\3)!*((n+1)\3)!*((n+2)\3)!) %o A022916 (PARI) {a(n)= if(n<0, 0, n!/(n\3)!/((n+1)\3)!/((n+2)\3)!)} /* _Michael Somos_, Jun 20 2007 */ %Y A022916 A006480(n) = a(3*n). %Y A022916 Cf. A001405 (permutation patterns mod 2). %Y A022916 Cf. A022917 (permutation patterns mod 4). %K A022916 nonn,easy,nice %O A022916 0,3 %A A022916 _Clark Kimberling_, Jun 14 1998 %E A022916 Corrected by _Michael Somos_, Jun 20 2007