OFFSET
2,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 2..1000
M. A. Michels and U. Knauer, The congruence classes of paths and cycles, Discr. Math., 309 (2009), 5352-5359. See p. 5356.
FORMULA
MATHEMATICA
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]];
Array[A110971, 50, 2] (* Paolo Xausa, Oct 13 2024 *)
PROG
(Python)
from math import comb
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
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 20 2009
EXTENSIONS
More terms from Paolo Xausa, Oct 13 2024
STATUS
approved