OFFSET
1,5
COMMENTS
Note that we keep one edge in the circular graph even when there's only one node (so there are 0 colorings of one node with k colors).
Number of closed walks of length n on the complete graph K_{k}. - Andrew Howroyd, Mar 12 2017
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1274
FORMULA
a(n, k) = (k-1)^n + (-1)^n * (k-1).
EXAMPLE
From Andrew Howroyd, Mar 12 2017: (Start)
Table begins:
0 0 0 0 0 0 0 0 0 ...
0 2 6 12 20 30 42 56 72 ...
0 0 6 24 60 120 210 336 504 ...
0 2 18 84 260 630 1302 2408 4104 ...
0 0 30 240 1020 3120 7770 16800 32760 ...
0 2 66 732 4100 15630 46662 117656 262152 ...
0 0 126 2184 16380 78120 279930 823536 2097144 ...
0 2 258 6564 65540 390630 1679622 5764808 16777224 ...
0 0 510 19680 262140 1953120 10077690 40353600 134217720 ...
(End)
a(4,3) = 18 because there are three choices for the first node's color (call it 1) and then two choices for the second node's color (call it 2) and then the remaining two nodes can be 12, 13, or 32. So in total there are 3*2*3 = 18 ways. a(3,4) = 4*3*2 = 24 because the three nodes must be three distinct colors.
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Joshua Zucker, May 29 2005
EXTENSIONS
a(67) corrected by Andrew Howroyd, Mar 12 2017
STATUS
approved