OFFSET
0,5
COMMENTS
A003239(n) is the number of 2n-bead balanced bicolor necklaces, and A000013(n) is the number of those that are self-complementary (i.e., can be rotated so that all beads change color). Their difference 2*a(n) is the number of those that are not self-complementary. a(n) is the number pairs of distinct complements.
Doubled entries: 0, 0, 0, 2, 6, 22, 72, 236, 790, 2674, 9196, 31972, 112540, 399708, 1432264, ...
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..1670
EXAMPLE
0 | 1 1 | 0 0
1 | 1 1 | 0 0
2 | 2 2 | 0 0
3 | 4 2 | 2 1
4 | 10 4 | 6 3
5 | 26 4 | 22 11
6 | 80 8 | 72 36
7 | 246 10 | 236 118
8 | 810 20 | 790 395
9 | 2704 30 | 2674 1337
10 | 9252 56 | 9196 4598
Examples for n=4 with necklaces of length 8:
A000013(4) = 4 necklaces are self-complementary:
00001111, 00110011, 01010101, 00101101 (compare A385665)
There are a(n) = 3 pairs of complementary necklaces:
(00110101, 00101011), (00100111, 00011011), (00010111, 00011101)
MATHEMATICA
a[0]=0; a[n_]:=( Sum[ EulerPhi[n/k]*Binomial[2k, k]/(2n), {k, Divisors[n]}]- Fold[ #1 + EulerPhi[2#2]2^(n/#2)/(2n) &, 0, Divisors[n]])/2; Array[a, 29, 0] (* James C. McMahon, Jul 30 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Tilman Piesk, Jul 20 2025
STATUS
approved
