
%\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}{-1in}
\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, Practice Quiz  2  \\
Quiz 2 on   Tuesday Sept 26, 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}

%\renewcommand{\theenumii}{\roman{enumii}} 
\vskip.1in
\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'' preceded by 
three blank boxes.
}


\vskip.2in

\begin{enumerate}


\item \dbten 

\vskip.1in \noindent  

What is the 1000th prime number?
\vskip .5in 
%7919

\item \dbten

\vskip.1in \noindent  
What is the sum of the first 1000 prime numbers?
%3682913

\vskip.5in

\item \dbten 

\vskip.1in  \noindent 

\vskip.1in  \noindent 
How many primes are less  than 5000?
%669

\vskip.5in

\item \dbten 

\vskip.1in  \noindent 
How many twin prime pairs are there less than 100,000. (A pair 
of primes  $(p,q)$ are twin primes if $q = p+2$, that is, they
are consequtive odd  numbers. It is a famous conjecture that there
are infinitely many such pairs.)
%205


\vskip.5in 
\item \dbten  

\vskip.1in  \noindent 
How any primes between 1 and 1,000,000 are
palindromic, that is they are the same number if
you reverse the digits?
For example, 10501 is such a prime.
It is unknown if there are infinitely many such primes.
% 113

\begin{comment}
counter=0;
for k=1:L
  a=num2str(primes(k));
  b=a([length(a):-1:1]);
  if a==b
    counter=counter+1;
  end
end % for k
\end{comment}


\vskip.5in 

\item \dbten

\vskip.1in  \noindent 
In the list  prime numbers between 1 and 1,000,000, compute
how many times each digit occurs. How many times does the 
most frequent digit occur?
%59634
\begin{comment}

0 30350
1 59634 *
2 39572
3 58770
4 39006
5 38911
6 38714
7 58327
8 38541
9 58145

function counter=prime(primes)
L=length(primes);
counter=zeros(10,1);
for k=1:L
  a=num2str(primes(k));
  for j=1:length(a)
    n=str2num(a(j))+1;
    counter(n)=counter(n)+1;
  end
end % for k
return

\end{comment}


    

\end{enumerate}


\end{document}


What is largest prime factor of 152416048119187?  1234567891 x 123457

What is the first prime that comes after 1,000,000,000? 100000007.


