A330621 Number of length n bracelets with entries covering an initial interval of positive integers and no adjacent entries equal.
0, 1, 1, 7, 27, 207, 1689, 17137, 196869, 2556856, 36878013, 585247590, 10131891315, 190024056601, 3838053182983, 83057105368627, 1917217162193175, 47021314781221603, 1221073517359584357, 33471097453271690668, 965771726172667547339, 29259595679585441629303
Offset: 1
Keywords
Examples
Case n=4: there are the following 7 bracelets: 1212, 1213, 1232, 1323, 1234, 1243, 1324.
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..200
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))))}