\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amssymb, amsmath, graphicx, subfigure}
\usepackage{hyperref}
\usepackage{parskip}

\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}

\newcommand{\heading}[6]{
  \renewcommand{\thepage}{#1-\arabic{page}}
  \noindent
  \begin{center}
  \framebox{
    \vbox{
      \hbox to 5.78in { \textbf{#2} \hfill #3 }
      \vspace{4mm}
      \hbox to 5.78in { {\Large \hfill #6  \hfill} }
      \vspace{2mm}
      \hbox to 5.78in { \textit{Instructor: #4 \hfill #5} }
    }
  }
  \end{center}
  \vspace*{4mm}
}

\newtheorem{theorem}{Theorem}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{assumption}[theorem]{Assumption}

\newenvironment{proof}{\noindent{\bf Proof:} \hspace*{1mm}}{
	\hspace*{\fill} $\Box$ }
\newenvironment{proof_of}[1]{\noindent {\bf Proof of #1:}
	\hspace*{1mm}}{\hspace*{\fill} $\Box$ }
\newenvironment{proof_claim}{\begin{quotation} \noindent}{
	\hspace*{\fill} $\diamond$ \end{quotation}}

\newcommand{\problemset}[3]{\heading{#1}{CMSC 27100-3}{#2}{Robert Rand}{#3}{Optional Exercises I}}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PLEASE MODIFY THESE FIELDS AS APPROPRIATE
\newcommand{\problemsetnum}{7.5}          % problem set number
\newcommand{\duedate}{No due date}  % problem set deadline
\newcommand{\studentname}{}    % full name of student (i.e., you)
% PUT HERE ANY PACKAGES, MACROS, etc., ADDED BY YOU
% ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\problemset{\problemsetnum}{\duedate}{\studentname}

\section{Recurrence Relations}

\noindent{\bf{Problem 1:}} Solve the recurrence relation
\[
H_n = 3H_{n-1} - 1
\]
where $H_0 = 1$. Use the substitution method.~\\[10pt]

% \begin{align*}
% H_0 &= 1 &= 1 \\
% H_1 &= 3(1) - 1 &= 2 \\
% H_2 &= 3(2) - 1 &= 5 \\
% H_3 &= 3(5) - 1 &= 14 \\ 
% H_4 &= 3(14) - 1 &= 41 \\ 
% \end{align*}

\noindent{\bf{Problem 2:}} Solve the recurrence relation
\[
H_n = \frac{1}{2}H_{n-1} + 2
\]
where $H_0 = 2$. Use the iteration method.~\\[10pt]

% \begin{align*}
% H_n &= \frac{1}{2}H_{n-1} + 2 \\
% &= \frac{1}{4}H_{n-2} + 1 + 2 \\
% &= \frac{1}{8}H_{n-3} + 0.5 + 1 + 2 \\
% &= \dots \\
% &= \frac{1}{2^n}H_{0} + 2^{-(n-1)} + \dots + 2^{-2} + 2^{-1} + 2^{0} + 2^1 \\
% &= \frac{1}{2^n} + 2^{-(n-1)} + \dots + 2^{-2} + 2^{-1} + 2^{0} + 2^1 \\
% &= 2^{-n} + 2^{-(n-1)} + \dots + 2^{-2} + 2^{-1} + 2^{0} + 2^1 \\
% &= 4 - 2^{1-n}
% \end{align*}


\noindent{\bf{Problem 3:}} Solve the linear recurrence relation
\[
a_n = 3a_{n-1} + 4a_{n-2}
\]
where $a_0 = a_1 = 5$. 

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%