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.

A330621 Number of length n bracelets with entries covering an initial interval of positive integers and no adjacent entries equal.

Original entry on oeis.org

0, 1, 1, 7, 27, 207, 1689, 17137, 196869, 2556856, 36878013, 585247590, 10131891315, 190024056601, 3838053182983, 83057105368627, 1917217162193175, 47021314781221603, 1221073517359584357, 33471097453271690668, 965771726172667547339, 29259595679585441629303
Offset: 1

Views

Author

Andrew Howroyd, Dec 20 2019

Keywords

Examples

			Case n=4: there are the following 7 bracelets:
  1212,
  1213, 1232, 1323,
  1234, 1243, 1324.
		

Crossrefs

Row sums of A330341.
Cf. A208544.

Programs

  • PARI
    \\ here U(n, k) is A208544(n, k) for n > 1.
    U(n, k) = (sumdiv(n, d, eulerphi(n/d)*(k-1)^d)/n + if(n%2, 1-k, k*(k-1)^(n/2)/2))/2;
    a(n)={if(n<1, n==0, sum(j=1, n, U(n,j)*sum(k=j, n, (-1)^(k-j)*binomial(k, j))))}