The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A151882 Let g be a permutation of [1..n] having say j_i cycles of length i, with Sum_i i*j_i = n; sequence gives Sum_g Sum_i (j_i)^2. 4
1, 5, 17, 80, 424, 2744, 19928, 166984, 1543176, 15939792, 178966512, 2200820544, 29089668672, 415261531008, 6316101256320, 102692213061120, 1766690411927040, 32235156493470720, 618870347081671680, 12523381062124032000, 265423904312781312000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
N. J. A. Sloane and Alois P. Heinz, Table of n, a(n) for n = 1..450 (first 30 terms from N. J. A. Sloane)
MAPLE
with(combinat):
b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,
add(multinomial(n, n-i*j, i$j)/j!*(i-1)!^j*(p-> p+
[0, p[1]*j^2])(b(n-i*j, i-1)), j=0..n/i)))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=1..30); # Alois P. Heinz, Oct 21 2015
MATHEMATICA
multinomial[n_, k_] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]] ]/j! * (i-1)!^j*Function[p, p+{0, p[[1]]*j^2}][b[n-i*j, i-1]], {j, 0, n/i}] ] ]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Mar 10 2017, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A307052 A369262 A053418 * A359206 A149749 A149750
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 22 2009
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 11 08:50 EDT 2024. Contains 373295 sequences. (Running on oeis4.)