cp's OEIS Frontend

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.

A385366 a(n) = Sum_{permutations p of [n]} des(p^2), where des(p) is the number of descents of p.

This page as a plain text file.
%I A385366 #19 Jul 14 2025 06:41:34
%S A385366 0,0,2,24,192,1560,13680,131040,1370880,15603840,192326400,2554675200,
%T A385366 36404121600,554204851200,8979363993600,154305575424000,
%U A385366 2803653844992000,53708801642496000,1082001156268032000,22869278876860416000,506043617700741120000,11699825757321461760000
%N A385366 a(n) = Sum_{permutations p of [n]} des(p^2), where des(p) is the number of descents of p.
%H A385366 Paolo Xausa, <a href="/A385366/b385366.txt">Table of n, a(n) for n = 1..445</a>
%F A385366 a(n) = 0 if n <= 2; a(n) = (n-1)!*(n^2-n-4)/2 if n >= 3.
%e A385366 For the permutation p = (2, 3, 4, 1), p^2 = (3, 4, 1, 2), and des(p) = des(p^2) = 1 (because 4 > 1).
%t A385366 A385366[n_] := If[n <= 2, 0, (n - 1)!*(n^2 - n - 4)/2];
%t A385366 Array[A385366, 25] (* _Paolo Xausa_, Jul 14 2025 *)
%o A385366 (PARI) a(n)=if(n>2,(n-1)!*(n^2-n-4)/2, 0);
%Y A385366 Cf. A001286.
%K A385366 nonn,easy
%O A385366 1,3
%A A385366 _Yifan Xie_, Jun 26 2025