login
Number of n-length cycles from any point in a complete graph on n nodes.
2

%I #36 Sep 22 2025 16:01:05

%S 1,2,21,204,2605,39990,720601,14913080,348678441,9090909090,

%T 261535698061,8230246567620,281241170407093,10371206370520814,

%U 410525522232055665,17361641481138401520,781282469559318055057,37275544492386193492506,1879498672877297909667781

%N Number of n-length cycles from any point in a complete graph on n nodes.

%C If M is the n X n matrix filled with ones, a(n) is the upper left element of (M-Id)^n.

%C This is the middle primitive Betti number of Dwork hypersurfaces, see Theorem 2.2 in Goutet reference with d=n. - _F. Chapoton_, Sep 12 2025

%C The formula implies that a(p+1) is divisible by p for every odd prime p, and the quotients are A056852. - _F. Chapoton_, Sep 13 2025

%H Philippe Goutet, <a href="https://arxiv.org/abs/0912.2075">Isotypic Decomposition of the Cohomology and Factorization of the Zeta Functions of Dwork Hypersurfaces</a>, arXiv:0912.2075 [math.NT], 2009.

%F a(n) = floor((n-1)^n/n) + ((-1)^n+1)/2.

%F a(n) = floor((n-1)^n/n)+1 for n odd, a(n) = floor((n-1)^n/n) for n even.

%F a(n) = ((n-1)^n+(-1)^n*(n-1)) / n. - _F. Chapoton_, Sep 12 2025

%e In a complete graph in 5 nodes, there are 204 different cycles with a length of 5, from a point to itself.

%o (SageMath)

%o [((n-1)**n+(-1)**n*(n-1)) / n for n in range(2,21)]

%Y Cf. A173499, A081216, A056852.

%K easy,nonn

%O 2,2

%A _Sébastien Dumortier_, Dec 18 2012