OFFSET
0,2
COMMENTS
Turning the necklace over doesn't count as a different necklace.
For k beads chosen from n distinct ones, we can have n!/(n-k)! possible permutations, then eliminate the cyclic permutations and reversals (2k). The case k=2 is special in that a cyclic permutation is equivalent to a reversal.
LINKS
FORMULA
a(n) = 1 + n + n(n-1)/2 + Sum_{k=3..n} n!/(2k(n-k)!).
EXAMPLE
For example for n=4 we have {}, {1}, {2}, {3}, {4}, {1,2}, {1,3}, {1,4}, {2,3}, {2,4}, {3,4}, {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}, {1,2,3,4}, {1,2,4,3}, {1,3,2,4}.
MAPLE
a:= proc(n) option remember; `if`(n<4, 2^n, `if`(n=4, 18,
((n^3-4*n^2+n)*a(n-1) -(2*n-2)*(n^2-4*n+2)*a(n-2)
+n*(n-2)*(n-3)*a(n-3)) / ((n-1)*(n-4))))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Jul 22 2016
MATHEMATICA
a[n_] := 1 + n + n(n-1)/2 + Sum[n!/(2k(n-k)!), {k, 3, n}];
a /@ Range[0, 30] (* Jean-François Alcover, Nov 09 2020 *)
PROG
(PARI) a(n) = 1 + n + n*(n-1)/2 + sum(k=3, n, n!/(2*k*(n-k)!)); \\ Michel Marcus, Nov 09 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Rodney Stephenson (rod.stephenson(AT)gmail.com), Mar 19 2008
EXTENSIONS
More terms from Washington Bomfim, Aug 29 2008
STATUS
approved