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.

A036276 a(n) = A001864(n+1)/2.

This page as a plain text file.
%I A036276 #35 Jul 08 2025 21:43:53
%S A036276 0,1,12,156,2360,41400,831012,18832576,476200944,13301078400,
%T A036276 406907517500,13534968927744,486470108273448,18790567023993856,
%U A036276 776343673316956500,34165751933338828800,1595693034061797583328,78831769938218360930304,4107393289066148637198444
%N A036276 a(n) = A001864(n+1)/2.
%C A036276 This is Sum_{all n^(n-2) labeled trees T on n nodes} Sum_{1<=i<j<=n} distance(node i, node j).
%C A036276 a(n) is the total number of all defects in defective parking functions of length n+1. - _Alois P. Heinz_, Nov 28 2015
%C A036276 With offset 1, a(n) is the number of unordered pairs {f,g} where for some nonempty proper subset S of [n], f:S->S and g:[n]\S->[n]\S. - _Geoffrey Critzer_, Apr 23 2017
%H A036276 Alois P. Heinz, <a href="/A036276/b036276.txt">Table of n, a(n) for n = 0..380</a>
%H A036276 J. Riordan and N. J. A. Sloane, <a href="http://dx.doi.org/10.1017/S1446788700007527">Enumeration of rooted trees by total height</a>, J. Austral. Math. Soc., vol. 10 pp. 278-282, 1969.
%H A036276 Peter Winkler, <a href="https://doi.org/10.1016/0166-218X(90)90137-2">Mean distance in a tree</a>, in Computational algorithms, operations research and computer science (Burnaby, BC, 1987).  Discrete Appl. Math. 27 (1990), no. 1-2, 179-185. [For background information only.]
%F A036276 a(n) = Sum_{k>0} k * A264902(n+1,k). - _Alois P. Heinz_, Nov 28 2015
%t A036276 Table[Sum[Binomial[n, k] (n - k)^(n - k) k^k, {k, n - 1}]/2, {n, 18}] (* _Michael De Vlieger_, Apr 24 2017, after _Harvey P. Dale_ at A001864 *)
%o A036276 (Python)
%o A036276 from math import math
%o A036276 def A036276(n): return sum(comb(n+1,k)*(n+1-k)**(n+1-k)*k**k for k in range(1,(n>>1)+1)) + (comb(n+1,m:=n+1>>1)*m**(n+1)>>1 if n&1 else 0) # _Chai Wah Wu_, Apr 26 2023
%Y A036276 Cf. A001864, A264902.
%K A036276 nonn,easy
%O A036276 0,3
%A A036276 _N. J. A. Sloane_