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.

Showing 1-1 of 1 results.

A006840 Number of 2n-bead black-white reversible complementable necklaces with n black beads.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 35, 85, 257, 765, 2518, 8359, 28968, 101340, 361270, 1297879, 4707969, 17179435, 63068876, 232615771, 861725794, 3204236779, 11955836258, 44748176653, 167959144032, 632058070310, 2384235077576, 9013628451275
Offset: 0

Views

Author

Keywords

References

  • J. A. Hoskins, C. E. Praeger and A. P. Street, Balanced twills with bounded float length, Congress. Numerantium, 40 (1983), 77-89.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A259341.
Cf. A045629.

Programs

  • Mathematica
    b[n_] := (1/(2*n))*DivisorSum[n, EulerPhi[n/#]*Binomial[2*# - 1, # - 1] + EulerPhi[2*(n/#)]*2^(# - 1) &]; a[0] = 1; a[n_] := (b[n] + 2^(n-2) + Binomial[n - Mod[n, 2], Quotient[n, 2]]/2)/2; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Oct 08 2017, after Andrew Howroyd *)
  • PARI
    \\ here b is A045629
    b(n) = (1/(2*n)) * sumdiv(n, d, eulerphi(n/d)*binomial(2*d-1, d-1) + eulerphi(2*n/d)*2^(d-1));
    a(n) = if(n==0, 1, (b(n) + 2^(n-2) + binomial(n-n%2, n\2)/2) / 2); \\ Andrew Howroyd, Sep 27 2017

Formula

If n is odd, a(n) = (1/2) * (A045629 + (1/2) * C(n-1, (n-1)/2) + 2^(n-2)); if n is even, a(n) = (1/2) * (A045629 + (1/2) * C(n, n/2) + 2^(n-2)). - Christian G. Bower

Extensions

More terms from David W. Wilson
Showing 1-1 of 1 results.