OFFSET
1,3
COMMENTS
Number of rooted planar trees that can be turned over.
Also bracelets (or necklaces) with n-1 black beads and n-1 white beads such that the beads switch colors when bracelet is turned over.
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
P. K. Stockmeyer, The charm bracelet problem and its applications, pp. 339-349 of Graphs and Combinatorics (Washington, Jun 1973), Ed. by R. A. Bari and F. Harary. Lect. Notes Math., Vol. 406. Springer-Verlag, 1974.
LINKS
T. D. Noe, Table of n, a(n) for n=1..200
P. J. Stockmeyer, The charm bracelet problem and its applications, pp. 339-349 of Graphs and Combinatorics (Washington, Jun 1973), Ed. by R. A. Bari and F. Harary. Lect. Notes Math., Vol. 406. Springer-Verlag, 1974. [Scanned annotated and corrected copy]
FORMULA
Stockmeyer gives g.f.
a(n) = A003239(n)/2 + 2^(n-2). (n>=2) (corrected, Joerg Arndt, Jan 25 2013)
MATHEMATICA
a[n_] := Sum[ EulerPhi[(n-1)/k]*(Binomial[2*k, k]/(2*(n-1))), {k, Divisors[n-1]}]/2 + 2^(n-3); a[1] = 1; Table[a[n], {n, 1, 27}] (* From Jean-François Alcover, Apr 11 2012, from formula *)
PROG
(PARI)
C(n, k)=binomial(n, k);
A003239(n) = if(n<=0, n==0, sumdiv(n, d, eulerphi(n/d) * C(2*d, d)) / (2*n) );
a(n) = if ( n<=1, 1, A003239(n)/2 + 2^(n-2) );
/* Joerg Arndt, Jan 25 2013 */
(Python)
from sympy import binomial as C, totient, divisors
def a003239(n): return 1 if n<2 else sum([totient(n/d)*C(2*d, d) for d in divisors(n)])/(2*n)
def a(n): return 1 if n<2 else a003239(n)/2 + 2**(n - 2) # Indranil Ghosh, Apr 24 2017
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms, formula and additional comments from Christian G. Bower, Dec 13 2001
STATUS
approved