The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A181372 Square array read by antidiagonals: a(p,n) is the number of inversions in all p-ary words of length n on {0,1,2,...,p-1} (p>=2, n>=2). 0
 1, 3, 6, 6, 27, 24, 10, 72, 162, 80, 15, 150, 576, 810, 240, 21, 270, 1500, 3840, 3645, 672, 28, 441, 3240, 12500, 23040, 15309, 1792, 36, 672, 6174, 32400, 93750, 129024, 61236, 4608, 45, 972, 10752, 72030, 291600, 656250, 688128, 236196, 11520 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 2,2 COMMENTS a(2,n)=A001788(n-1). a(3,n)=A129530(n). a(4,n)=A129532(n). LINKS FORMULA a(p,n)=n(n-1)(p-1)p^{n-1}/4. EXAMPLE a(2,3)=6 because the words 010, 100, 101, 110 have 1, 2, 1, 2 inversions, respectively, while 000, 001, 011 and 111 have none. a(3,2)=3 because each of the words 10, 20, 21 has 1 inversion, while 00, 01, 02, 11, 12, 22 have none. Square array starts: 1,6,24,80,240, ...; 3,27,162,810,3645, ... ; 6,72,576, 3840,23040, ... ; 10,150,1500,12500, 93750,...; MAPLE a := proc (p, n) options operator, arrow: (1/4)*n*(n-1)*(p-1)*p^(n-1) end proc: for p from 2 to 8 do seq(a(p, n), n = 2 .. 8) end do; # yields the first seven rows and seven columns of the square array CROSSREFS Cf. A001788, A129530, A129532. Sequence in context: A304335 A223048 A319446 * A168426 A065931 A137497 Adjacent sequences:  A181369 A181370 A181371 * A181373 A181374 A181375 KEYWORD nonn,tabl AUTHOR Emeric Deutsch, Oct 31 2010 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 22 06:53 EDT 2020. Contains 337289 sequences. (Running on oeis4.)