OFFSET
2,2
COMMENTS
If M is the n X n matrix filled with ones, a(n) is the upper left element of (M-Id)^n
FORMULA
a(n) = floor((n-1)^n/n) + ((-1)^n+1)/2
a(n) = floor((n-1)^n/n)+1 for n odd, a(n) = floor((n-1)^n/n) for n even.
EXAMPLE
In a complete graph in 5 nodes, there are 204 different cycles with a length of 5, from a point to itself.
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Sébastien Dumortier, Dec 18 2012
STATUS
approved