cp's OEIS Frontend

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.

A327868 Number of achiral loops (necklaces or bracelets) of length n with integer entries that cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 2, 3, 8, 13, 44, 75, 308, 541, 2612, 4683, 25988, 47293, 296564, 545835, 3816548, 7087261, 54667412, 102247563, 862440068, 1622632573, 14857100084, 28091567595, 277474957988, 526858348381, 5584100659412, 10641342970443, 120462266974148, 230283190977853
Offset: 0

Views

Author

Andrew Howroyd, Sep 28 2019

Keywords

Comments

Achiral loops may also be called periodic palindromes.

Examples

			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
		

Crossrefs

Row sums of A305540.

Programs

  • 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 *)
  • 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)}

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.
a(2n-1) = A000670(n), a(2n) = A005649(n). - Michael Somos, May 04 2022