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.

A005656 Number of bracelets (turn over necklaces) with n red, 1 pink and n - 3 blue beads; also reversible strings with n red and n-3 blue beads.

Original entry on oeis.org

0, 0, 1, 3, 12, 44, 170, 651, 2520, 9752, 37854, 147070, 572264, 2229096, 8692788, 33933459, 132594480, 518584880, 2029976630, 7952706234, 31179618184, 122331419080, 480283635468, 1886828198398
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = A034851(2n-3, n-3).

Programs

  • Magma
    [(1/2)*(Binomial(2*n-3, n-3) + Binomial(n-2, Floor((n-3)/2))): n in [1..30]]; // Vincenzo Librandi, Oct 08 2017
  • Maple
    A005656:=n->(1/2)*(binomial(2*n-3, n-3) + binomial(n-2, floor((n-3)/2))): seq(A005656(n), n=1..30); # Wesley Ivan Hurt, Oct 06 2017
  • Mathematica
    Table[(1/2) (Binomial[2 n - 3, n - 3] + Binomial[n - 2, Floor[(n - 3) / 2]]), {n, 40}] (* Vincenzo Librandi, Oct 08 2017 *)
  • PARI
    C(n,k)= if(k<0||k>n,0,n!/k!/(n-k)!);
    a(n)= (1/2) *(C(2*n-3,n-3)+C(n-2,(n-3)\2));
    

Formula

a(n) = (1/2)*(binomial(2*n - 3, n - 3) + binomial(n - 2, floor((n - 3)/2))). - Michael Somos

Extensions

Sequence corrected, extended and description corrected by Christian G. Bower