OFFSET
0,3
COMMENTS
Achiral loops may also be called periodic palindromes.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..200
FORMULA
a(n) = (1/2)*Sum_{k=0..n} k!*(Stirling2(floor((n+1)/2), k) + Stirling2(ceiling((n+1)/2), k)) for n > 0.
EXAMPLE
The a(4) = 8 achiral loops are:
1111,
1122, 1112, 1212, 1222,
1213, 1232, 1323.
G.f. = 1 + x + 2*x^2 + 3*x^3 + 8*x^4 + 13*x^5 + 44*x^6 + 75*x^7 + ... - Michael Somos, May 04 2022
MATHEMATICA
a[ n_] := If[n < 0, 0, Sum[ k!*(StirlingS2[Quotient[n+1, 2], k] + StirlingS2[Quotient[n+2, 2], k]), {k, 0, n+1}]/2]; (* Michael Somos, May 04 2022 *)
a[ n_] := If[n < 0, 0, With[{m = Quotient[n+1, 2]},
m!*SeriesCoefficient[1/(2 - Exp@x)^Mod[n, 2, 1], {x, 0, m}]]]; (* Michael Somos, May 04 2022 *)
PROG
(PARI) a(n)={if(n<1, n==0, sum(k=0, n, k!*(stirling((n+1)\2, k, 2)+stirling(n\2+1, k, 2)))/2)}
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Sep 28 2019
STATUS
approved