
%\ydocumentstyle[12pt]{article}
\documentclass[12pt]{amsart}
%\usepackage{amssymb,amsthm,verbatim,amsfonts}
\usepackage{amssymb,amsthm,verbatim,amsfonts,amscd,psfig}
%\usepackage{amssymb,amsthm,verbatim,amsfonts,amscd}
\addtolength{\textheight}{2in}
\addtolength{\textwidth}{2in}
\addtolength{\topmargin}{-1.2in}
\addtolength{\leftmargin}{-.75in}
\hoffset -1in
\def\integers{{\Bbb Z}}
\def\complex{{\Bbb C}}



\def\sp{\samepage}
\def\TFbox{ \fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$} }
\def\digitbox5{ 
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
 }
\def\digitbox10{ 
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
\fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxx}$}
 }


\def\ANS1box{ \fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxxxx}$} }
\def\ANSbox{ \fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxxxxxxxxxxxxx}$} }
\def\Mbox{ \fbox{ \rule[-.1cm]{0cm}{.75cm}$\hphantom{xxxxxxxxxxxxxxxxxxxxx}$} }
\def\M3box{ \fbox{ \rule[-.1cm]{0cm}{1.25cm}$\hphantom{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}$} }
\def\MMbox{ \fbox{ \rule[-.1cm]{0cm}{1.75cm}$\hphantom{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}$} }
\def\fig{figures/}
\def\bigbox{\phantom{{{\sum_1^2\over\sum_1^2}
\over {\sum_1^1 \over \sum_2^2}}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}}
\def\junk{\phantom{{{\sum_1^2\over\sum_1^2}
         \over {\sum_1^1 \over \sum_2^2}}xxxxx}}
\def\junk2{\phantom{{x
         \over {\sum_1^1 \over \sum_2^2}}1}}
\def\sj{$\phantom{{{\sum_1^2}
        \over {\sum_1^1 \over \sum_2^2}}x}$}

\def\dbfive{
\begin{tabular}{|c|c|c|c|c|}\hline
 $\junk2$ & $\junk2$ & $\junk2$ & $\junk2$ & $\junk2$ 
\\ \hline 
\end{tabular}
        }
\def\dbten{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}\hline
 $\junk2$ & $\junk2$ & $\junk2$ & $\junk2$ & $\junk2$ &
 $\junk2$ & $\junk2$ & $\junk2$ & $\junk2$ & $\junk2$ 
\\ \hline  
\end{tabular}
$\hphantom{xxx}$
        }

\reversemarginpar
%\input psfig
\newcommand{\vs}{\vspace{.1in}}
\begin{document}


\noindent
{\bf  MAT 331 Fall 2017, New Practice Quiz 1, \\
Real Quiz 1 on Tuesday Sept 12, 2017 (30 minutes)}


\vskip .1in 
\noindent
%$\hphantom{xx}$
{\fbox{\rule[-.5cm]{0cm}{1cm}Name$\hphantom{xxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxx}$}}
{\fbox{\rule[-.5cm]{0cm}{1cm}ID $\hphantom{xxxxxxxxxxxxxxxxxxx}$}}
{\fbox{\rule[-.5cm]{0cm}{1cm}Score $\hphantom{xxxxxxxx}$}}

%\begin{table}[h]
%\begin{tabular}{|c|c|c|c|} \hline
%  1$\junk$&
%  2$\junk$&
%  3$\junk$&
%  total part I $\junk$  \\ \hline
%\end{tabular}
%\end{table}

\vskip .1in
\noindent
{\bf  
EVERY ANSWER IS A NUMBER AND YOU GET ONE POINT PER CORRECT DIGIT OR
DECIMAL POINT.
NOTES, TEXTBOOK  AND USE OF MATLAB ARE ALLOWED, BUT NO ASSISTANCE
FROM OTHER PEOPLE.
}
\vskip .1in


%\renewcommand{\theenumii}{\roman{enumii}} 

\noindent
{\bf For answers that are real numbers, include all non-zero
 digits to the left of the decimal place, include the decimal place 
in a box, and as many digits to the right  of the decimal place 
as will fit in the remaining boxes. Truncate, do not round, e.g., 
given five boxes for $\sqrt{7}=2.64575131106\dots$, write ``2.645''.
If a number has no digits to the left of the decimal point, start
with the decimal point, e.g., given ten boxes, write $1/\sqrt{2}$ as 
``$.707106781$''.
}
{\bf 
Right justify integer answers, and place blanks (or zeros) in any 
remaining boxes on the left. For example, given 10 boxes to write 
$2^{20}$ either write ``0001048576'' or ``1048576'' preceeded by 
three blank boxes.
}
\vskip.1in




\begin{enumerate}

\item \dbten  

\vskip.1in
Find $\sqrt{17}$. 
% 4.123105625617661
\vskip .3in 

\item \dbten

\vskip.1in
 Sum $1/\sqrt{n}$ from $n=1$ to $n=10,000$.
%198.544645
\vskip.3in

\item \dbten

\vskip.1in 
Write $2^{30}$ as an integer (usual decimal notation).
\vskip .3in
%   1073741824
\item \dbten 

\vskip.1in
Let $x_0 = 1/3 $ and for $n=1,2,3\dots$, let $x_{n+1}
 = 4 x_n(1-x_n)$ 
(e.g., $x_1= .8888\dots$ and $x_2 = .3950\dots$).  What is $x_{10}$?
(Remember the up arrows.)

%.874650876
\vskip.3in 
\item \dbten

\vskip.1in
What is the sum 
of all the integers $1\leq n \leq 10,000,000$ that are perfect 
squares and end in the  digit $1$? (A perfect square is a
integer that is the square of some integer.
You may wish to use logical indexing  the command 
\verb+mod(a,b)+ which gives the value of  $a$ modulo $b$
, i.e., the remainder when 
$a$ is divided by $b$.)


%2113629833

\vskip.3in 
\item \dbten   

\vskip.1in

Find the first place in the decimal
expansion of $\pi$ that the sequence ``999999'' occurs. 
What are the ten digits that come just before these?
Use the commmand \verb+y=char(vpa(pi,n))+ to create a string 
on the first $n$ digits (including the $3$ and the ``.'').
Then use \verb+strfind+.
%1870721134

    

\end{enumerate}


\end{document}


