%I #16 May 05 2022 04:46:05
%S 1,1,2,3,8,13,44,75,308,541,2612,4683,25988,47293,296564,545835,
%T 3816548,7087261,54667412,102247563,862440068,1622632573,14857100084,
%U 28091567595,277474957988,526858348381,5584100659412,10641342970443,120462266974148,230283190977853
%N Number of achiral loops (necklaces or bracelets) of length n with integer entries that cover an initial interval of positive integers.
%C Achiral loops may also be called periodic palindromes.
%H Andrew Howroyd, <a href="/A327868/b327868.txt">Table of n, a(n) for n = 0..200</a>
%F a(n) = (1/2)*Sum_{k=0..n} k!*(Stirling2(floor((n+1)/2), k) + Stirling2(ceiling((n+1)/2), k)) for n > 0.
%F a(2n-1) = A000670(n), a(2n) = A005649(n). - _Michael Somos_, May 04 2022
%e The a(4) = 8 achiral loops are:
%e 1111,
%e 1122, 1112, 1212, 1222,
%e 1213, 1232, 1323.
%e 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
%t 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 *)
%t a[ n_] := If[n < 0, 0, With[{m = Quotient[n+1, 2]},
%t m!*SeriesCoefficient[1/(2 - Exp@x)^Mod[n, 2, 1], {x, 0, m}]]]; (* _Michael Somos_, May 04 2022 *)
%o (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)}
%Y Row sums of A305540.
%Y Cf. A000670, A005649, A326895.
%K nonn
%O 0,3
%A _Andrew Howroyd_, Sep 28 2019
|