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 A277405 #26 Mar 08 2025 01:35:46 %S A277405 1,5,40,524,10776,327732,13920096,788050944,57348311040,5215111879680, %T A277405 579420628853760,77220215372770560,12157472554474222080, %U A277405 2232192933566250681600,472721150641130889523200,114371049117960857921126400,31350167446592485414541721600,9664519305841281076219121664000,3328880054333616589332111409152000,1273663039174670323519439513960448000 %N A277405 a(n) equals the constant term in the sum of all permutations of compositions of functions (1 + k*x) for k=1..n. %C A277405 A277406(n) = (n!)^2 + a(n). %C A277405 The sum of all permutations of the compositions of functions (1+k*x), for k=1..n, equals: (n!)^2*x + a(n); this sequence gives the constant term. %F A277405 a(n) = Sum_{k=0..n-1} k!*(n-k)! * Sum_{i=0..n-k+1} (-1)^(n-i+1) * Stirling2(i,n-k+1) * Stirling1(n+1,i). %e A277405 Illustration of initial terms. %e A277405 a(1) = 1, the constant term of (1+x); %e A277405 a(2) = 5, the constant term of the sum of permutations of compositions of functions (1+x) and (1+2*x): (1+x)o(1+2*x) + (1+2*x)o(1+x) = (2*x + 2) + (2*x + 3) = 4*x + 5. %e A277405 a(3) = 40, the constant term of the sum of permutations of compositions of functions (1+x), (1+2*x), and (1+3*x): (1+x)o(1+2*x)o(1+3*x) + (1+x)o(1+3*x)o(1+2*x) + (1+2*x)o(1+1*x)o(1+3*x) + (1+2*x)o(1+3*x)o(1+1*x) + (1+3*x)o(1+1*x)o(1+2*x) + (1+3*x)o(1+2*x)o(1+1*x) = (6*x + 4) + (6*x + 5) + (6*x + 5) + (6*x + 9) + (6*x + 7) + (6*x + 10) = 36*x + 40. %e A277405 etc. %e A277405 Alternatively, %e A277405 a(2) = 5 = Sum_{i=1..2} (1+i), %e A277405 a(3) = 40 = Sum_{i=1..3, j=1..3, j<>i} (1 + i*(1+j)), %e A277405 a(4) = 524 = Sum_{i=1..4, j=1..4, k=1..4, k<>j<>i, k<>i} (1 + i*(1 + j*(1+k))), etc. %o A277405 (PARI) {a(n) = sum(k=0, n-1, k!*(n-k)! * sum(i=0, n-k+1, (-1)^(n-i+1) * stirling(i, n-k+1, 2) * stirling(n+1, i, 1)))} %o A277405 for(n=1, 20, print1(a(n), ", ")) %Y A277405 Cf. A277406, A277407. %K A277405 nonn %O A277405 1,2 %A A277405 _Paul D. Hanna_, Oct 16 2016