This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A118537 #22 Sep 08 2022 08:45:25 %S A118537 2,6,84,1020,15630,279930,5764808,134217720,3486784410,99999999990, %T A118537 3138428376732,106993205379060,3937376385699302,155568095557812210, %U A118537 6568408355712890640,295147905179352825840,14063084452067724991026 %N A118537 Number of functions f: {1, 2, ..., n} --> {1, 2, ..., n} such that f(1) != f(2), f(2) != f(3), ..., f(n-1) != f(n), f(n) != f(1). %C A118537 a(n) is also the number of circuits of length n in the complete graph on n vertices. - Thibaut Lienart (syncthib(AT)gmail.com), Jan 29 2010 %C A118537 Circuits are allowed to be self-intersecting and are directional with a designated start node. The number of (self-avoiding) directed cycles is given by A124355. - _Andrew Howroyd_, Sep 05 2018 %C A118537 a(n) is also the number of graph colorings of the cycle graph C_n with n colors. - _Orson R. L. Peters_, Jul 27 2020 %H A118537 Andrew Howroyd, <a href="/A118537/b118537.txt">Table of n, a(n) for n = 2..100</a> %F A118537 a(n) = (n-1)^n + (-1)^n*(n-1). %t A118537 a[n_]:=(n-1)^n + (-1)^n*(n-1); Array[a, 50, {2, 51}] (* _Stefano Spezia_, Sep 07 2018 *) %o A118537 (PARI) a(n) = (n-1)^n + (-1)^n*(n-1); \\ _Andrew Howroyd_, Sep 05 2018 %o A118537 (Magma) [(n-1)^n + (-1)^n*(n-1) : n in [2..20]]; // _Wesley Ivan Hurt_, Jul 27 2020 %Y A118537 Cf. A055897, A124355. %K A118537 nonn %O A118537 2,1 %A A118537 _Warut Roonguthai_, May 06 2006