login
a(n) = Sum_{k=1..n-1} k*A110971(n,k).
4

%I #23 Oct 28 2024 14:49:10

%S 1,3,8,21,52,126,296,685,1556,3498,7768,17122,37416,81308,175568,

%T 377469,807604,1721970,3657464,7746838,16357496,34459428,72407728,

%U 151851986,317777032,663908196,1384524656,2883208740,5994736336,12448784824,25816193952,53479331357,110652549620

%N a(n) = Sum_{k=1..n-1} k*A110971(n,k).

%H Paolo Xausa, <a href="/A152086/b152086.txt">Table of n, a(n) for n = 2..1000</a>

%H M. A. Michels and U. Knauer, <a href="http://dx.doi.org/10.1016/j.disc.2008.11.022">The congruence classes of paths and cycles</a>, Discr. Math., 309 (2009), 5352-5359. See p. 5356.

%F a(n) = A102699(n)/2. - _Paolo Xausa_, Oct 13 2024, from _N. J. A. Sloane_ formula in A102699.

%t A110971[n_] := (n+1)*2^(n-2) - If[OddQ[n], (n-1/2)*Binomial[n-1, (n-1)/2], 2*(n-1)*Binomial[n-2, (n-2)/2]];

%t Array[A110971, 50, 2] (* _Paolo Xausa_, Oct 13 2024 *)

%o (Python)

%o from math import comb

%o def A152086(n): return ((n+1<<n-2)-(((n<<1)-1)*comb(n-1,n-1>>1)>>1 if n&1 else (n-1)*comb(n-2,n-2>>1)<<1)) # _Chai Wah Wu_, Oct 28 2024

%Y Cf. A110971, A102699.

%Y Main diagonal of A377000.

%K nonn,changed

%O 2,2

%A _N. J. A. Sloane_, Sep 20 2009

%E More terms from _Paolo Xausa_, Oct 13 2024