|
|
A045683
|
|
Number of 2n-bead balanced binary necklaces of fundamental period 2n which are equivalent to their reverse, complement and reversed complement.
|
|
10
|
|
|
1, 1, 1, 1, 2, 3, 3, 7, 8, 14, 15, 31, 30, 63, 63, 123, 128, 255, 252, 511, 510, 1015, 1023, 2047, 2040, 4092, 4095, 8176, 8190, 16383, 16365, 32767, 32768, 65503, 65535, 131061, 131040, 262143, 262143, 524223, 524280, 1048575, 1048509, 2097151
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{d|n, d odd} mu(d) * 2^floor((n/d-1)/2) for n > 0.
G.f.: 1 + Sum_{k>0} mu(2*k-1)*x^(2*k-1)*(1 + x^(2*k-1))/(1 - 2*x^(4*k-2)).
(End)
|
|
MAPLE
|
option remember ;
if p = 0 then
return 1;
end if;
a := 2^(floor((p+1)/2)-1) ;
for d in numtheory[divisors](p) do
if d >1 and type(d, 'odd') then
a := a-procname(p/d) ;
end if;
end do:
a ;
end proc:
|
|
MATHEMATICA
|
b[0] = 1; b[n_] := Module[{t = 0, r = n}, While[EvenQ[r], r = Quotient[r, 2]; t += 2^(r-1)]; t + 2^Quotient[r, 2]];
a[0] = 1; a[n_] := DivisorSum[n, MoebiusMu[n/#]*b[#]&];
|
|
PROG
|
(PARI) a(n)={if(n<1, n==0, sumdiv(n, d, if(d%2, moebius(d)*2^((n/d-1)\2))))} \\ Andrew Howroyd, Oct 01 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|