\documentclass[12pt]{article}

\usepackage[margin=1in,dvips]{geometry}
\usepackage{fancyhdr,lastpage}
\usepackage{amsmath,amsfonts}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{substr}

\IfSubStringInString{\detokenize{solution}}{\jobname}{%
  % Solutions
  \newcommand\qfill{}
  \newcommand\qpage{}
  \newcommand\qonly[1]{}
  \newcommand\answer[1]{#1}
  \newcommand\question[1]{{\em #1}}
  \newcommand\rubric[1]{}
}
{%
  \newcommand\qfill{\vfill}
  \newcommand\qpage{\newpage}
  \newcommand\qonly[1]{#1}
  \newcommand\answer[1]{}
  \newcommand\question[1]{#1}
  \newcommand\rubric[1]{}
}

\pagestyle{fancy}
\lhead{MATH 387-01}
\chead{Problem Set \#5\answer{ solutions}}
\rhead{\qonly{Name: \framebox{\phantom{Your name goes here}}}}
\lfoot{}
\cfoot{Page \thepage\ of \pageref{LastPage}}
\rfoot{{\bf due November 6, 2015}}

\begin{document}
\begin{enumerate}
\item {\bf (10 points)} \question{Let $a_n$ represent the number of
    ways to distribute $n$ blank balls to three labeled boxes such
    that the first box contains an even number of balls, the second
    contains an odd number of balls, and the third contains at least 2
    balls.}

  \begin{enumerate}
  \item \question{Find a closed form for the generating function
      $f(x)=\sum_{n=0}^\infty a_nx^n$.}

    \answer{}

  \item \question{Decompose this generating function into partial
      fractions (a calculator or equation-solving system may help).}

    \answer{}

  \item \question{Using your partial fraction decomposition, determine
      a formula for $a_n$.}

    \answer{}
  \end{enumerate}

\item {\bf (10 points)} \question{Let $a_n$ be the coefficient on
    $x^n$ in the power-series expansion of
    $f(x)=\frac{(1+x^2+x^4)x^2}{(1-x)^3(1-x^3)(1-x^{10})}$ (or,
    equivalently, you could let $a_n=n!f^{(n)}(0)$, using the
    Maclaurin series). Describe a combinatorial question to which
    $a_n$ is the answer (i.e., ``there are $a_n$ ways to perform the
    following process\ldots'').}

  \answer{}

\item {\bf (10 points)} \question{Explore the conjugates of the
    partitions of $n$ into distinct parts. What property defines
    these partitions, and what is the generating function for the
    number of partitions with this property?}

  \answer{}

\item {\bf (10 points)} \question{Let $a_n$ be the number of
    $n$-letter strings consisting of the letters A, B, C, and D with
    at least one A and an even number of Cs.}
  \begin{enumerate}
  \item \question{Find a formula for the exponential generating
      function $\sum_{n=0}^\infty \frac{a_n}{n!}x^n$.}

    \answer{}
    
  \item \question{Using the above generating function, find a closed
      formula for $a_n$.}

    \answer{}
  \end{enumerate}
\end{enumerate}

\vfill
\begin{center}
  \fbox{
    \begin{minipage}{6in}
      A matematikus olyan g\'ep, amely k\'av\'eb\'ol t\'eteleket gy\'art.
      \hfill ---Alfr\'ed R\'enyi
    \end{minipage}
  }
\end{center}

\end{document}
