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 A151882 #11 Mar 10 2017 19:36:14 %S A151882 1,5,17,80,424,2744,19928,166984,1543176,15939792,178966512, %T A151882 2200820544,29089668672,415261531008,6316101256320,102692213061120, %U A151882 1766690411927040,32235156493470720,618870347081671680,12523381062124032000,265423904312781312000 %N 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. %H A151882 N. J. A. Sloane and Alois P. Heinz, <a href="/A151882/b151882.txt">Table of n, a(n) for n = 1..450</a> (first 30 terms from N. J. A. Sloane) %p A151882 with(combinat): %p A151882 b:= proc(n, i) option remember; `if`(n=0, [1,0], `if`(i<1, 0, %p A151882 add(multinomial(n,n-i*j,i$j)/j!*(i-1)!^j*(p-> p+ %p A151882 [0, p[1]*j^2])(b(n-i*j, i-1)), j=0..n/i))) %p A151882 end: %p A151882 a:= n-> b(n$2)[2]: %p A151882 seq(a(n), n=1..30); # _Alois P. Heinz_, Oct 21 2015 %t A151882 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_ *) %Y A151882 Cf. A000254, A151881, A151883. %K A151882 nonn %O A151882 1,2 %A A151882 _N. J. A. Sloane_, Jul 22 2009