%http://jorsansa.webs.upv.es/blog/?q=intro-beamer
\documentclass[color=usenames, spanish]{beamer}
%\usepackage{amssymb, amsmath} 
%\usepackage{latexsym} 
\usepackage{beamerthemesplit}
%\usepackage{color} 
\usepackage{graphics} 
\usepackage{wrapfig}
%\usepackage[pdftex]{graphicx}
\usepackage{graphicx}
%http://oregonstate.edu/~peterseb/tex/samples/color-package.html


%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 	SPANISH
%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[spanish]{babel}
\usepackage[latin1]{inputenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 	MACROS
%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\R}{\mbox{${\mathbb R}$}} 
\newcommand{\C}{\mbox{${\mathbb C}$}} 
\newcommand{\N}{\mbox{${\mathbb N}$}} 
\newcommand{\Z}{\mbox{${\mathbb Z}$}} 
\newcommand{\Q}{\mbox{${\mathbb Q}$}} 
\def\ejer{\ \par\vskip-7pt{\bf\number\value{ejeno})\ }\addtocounter{ejeno}{1}}
\newtheorem{defi}{Definici\'{o}n}
\newtheorem{theo}{Teorema}


%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 	COLORES
%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{MyDarkBlue}{rgb}{0,0.08,0.45}
\definecolor{MedioRojo}{rgb}{0.5,0,0}


\mode<presentation>{
%\usetheme{Warsaw} %Rebordes y n\'{u}meros
\usetheme{Frankfurt} %Rebordes y n\'{u}meros indice con puntos
%\usecolortheme{seahorse} % Rebordes malvas
%\usecolortheme{rose} %Reborde azules m\'{a}s claros en bloques
%\usefonttheme[onlylarge]{structuresmallcapsserif} %\sc en t\'{\i}tulos
%\usefonttheme[onlysmall]{structurebold} % t\'{\i}tulo de arriba en negrita ??
%\setbeamerfont{title}{shape=\itshape,family=\rmfamily} %t\'{\i}tulo en it\'{a}lica
%\setbeamercolor{title}{fg=red!80!black,bg=red!20!white} %t\'{\i}tulo en rojo con algo de negro y fondo rojiblanco
}

\title{\bf La importancia de ser primo}
\subtitle{Marat\'{o}n matem\'{a}tico}
\author{Fernando Chamizo Lorente}
\date{22 de febrero de 2007}
\institute{Universidad Aut\'{o}noma de Madrid \\ {\bf http://www.uam.es/fernando.chamizo}}

\begin{document}



%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 0  %
%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\titlepage
\end{frame}



%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 0+ %
%%%%%%%%%%%%%%%%%%%%
\section*{\'{I}ndice}
\begin{frame}
\frametitle{\'{I}ndice}
%\tableofcontents[pausesections]
\tableofcontents
\end{frame}


%\end{document}

%\section{Definici\'{o}n b\'{a}sica}
%\subsection{subt\'{\i}tulo}

%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 1  %
%%%%%%%%%%%%%%%%%%%%
\section{Definici\'{o}n b\'{a}sica}
\begin{frame}
\frametitle{Definici\'{o}n b\'{a}sica}
\begin{defi}
Un  \alert{n\'{u}mero primo} es aquel que s\'{o}lo es divisible por \'{e}l mismo y por la unidad.
\end{defi}
\pause
\begin{footnotesize} 
Nota: Desde el siglo XIX se excluye el 1 de los primos por convenio.
\end{footnotesize} 
\pause 

\

\begin{wrapfigure}{r}{26mm}
\includegraphics[scale=0.3]{pie.jpg}
\end{wrapfigure}
% Los primos 
Son los n\'{u}meros malos para hacer repartos.\pause
\vskip20pt
{\bf Propiedad fundamental:} 

Los primos son los bloques con los que est\'{a}n 

compuestos el resto de los n\'{u}meros naturales.
\end{frame}


%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 2  %
%%%%%%%%%%%%%%%%%%%%
\section{Algunas propiedades}
\begin{frame}
\frametitle{Algunas propiedades}

\begin{block}{Peque\~{n}o teorema de Fermat}
Si $p$ es primo, entonces $p$ divide a $n^p-n$ para cualquier $n$.
\end{block}
\pause


\begin{tabular}{cc}
	\uncover<4->{
\kern-30pt
	\begin{footnotesize}
	\begin{tabular}{cc|c||c|}
%	\cline{3-4}
& & &
\\
	\ \includegraphics[scale=0.213]{bbb.png}\  & 
	\includegraphics[scale=0.213]{aaa.png} & 
	\includegraphics[scale=0.213]{abb.png} & 
	\includegraphics[scale=0.213]{aab.png} 
	\\ 
%	\cline{3-4}
& & &
\\
	& &
	\includegraphics[scale=0.213]{bab.png} & 
	\includegraphics[scale=0.213]{baa.png} 
	\\ 
%	\cline{3-4}
& & &
\\
	 & &
	\includegraphics[scale=0.213]{bba.png} & 
	\includegraphics[scale=0.213]{aba.png} 
	\\ 
%	\cline{3-4}
	\end{tabular}
	\end{footnotesize}
	}
&
\kern-13pt	
	\begin{tabular}{l}
	$n=2$\uncover<3->{ (\alert{colores}) } 
	$p=3$\uncover<3->{ (\alert{cuentas}) }\only<2>{$3|2^3-2$}\pause\pause
\\

\\
$\bullet$ n. de tiras $=$ $2\times 2\times 2=n^p$
\pause
\\

\\
$\bullet$ n. de collares $=$ $\frac{2\times 2\times 2-2}3+2=\frac{n^p-n}p+n$
\pause
\\

\\
\qquad
	\includegraphics[scale=0.213]{c1.png} 
\quad
	\includegraphics[scale=0.213]{c2.png} 
\quad
	\includegraphics[scale=0.213]{c3.png} 
\quad
	\includegraphics[scale=0.213]{c4.png} 

	\end{tabular}
\end{tabular}



\end{frame}


%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 3  %
%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Algunas propiedades}

\begin{itemize}
\item Se cumple la igualdad
$\displaystyle{\prod \big(1-\frac1{p^2}\big)=\frac{6}{\pi^2}}$.\pause

\item
Un n\'{u}mero $n$ es primo si y s\'{o}lo si divide a $(n-1)!+1$.\pause

\item
Los n\'{u}meros primos de la forma $20n+1$ y  $20n+9$  son exactamente los  que se pueden representar como $a^2+5b^2$.
\begin{scriptsize}
(Ej. $61=20\cdot 3+1=4^2+5\cdot 3^2$, \quad $389=20\cdot 19+9=12^2+5\cdot 7^2$)
\end{scriptsize}
\pause


\item Si el desarrollo decimal de $1/n$ tiene periodo m\'{a}ximo 
\begin{scriptsize}
($=n-1$)
\end{scriptsize}
entonces $n$ es primo.
%\pause
\end{itemize}


\vskip-10pt

\uncover<5-7>{
%	\only<5-7>{
	\[
	\frac{1}{7}= 0'\overline{142\alert<6->{857}}\dots
	\qquad 
	\frac{1}{17}= 0'\overline{05882352\alert<6->{94117647}}\dots
	\]
	}
	
	\uncover<6,7>{
	\vskip-40pt
	\[
	\phantom{\frac{1}{7}= 0'}\alert<6->{857}\phantom{142\dots}
	\qquad 
	\phantom{\frac{1}{17}= 0'}\alert<6->{94117647}\phantom{05882352\dots}
	\]
%	}
	
	\uncover<7>{
	\vskip-25pt
	\[
	\phantom{\frac{1}{7}= 0'}{\color{MyDarkBlue}\overline{999}}\phantom{142\dots}
	\qquad 
	\phantom{\frac{1}{17}=
 	0'}{\color{MyDarkBlue}\overline{99999999}}\phantom{05882352\dots}
	\]
	}
}

%\uncover<8->{
%\vskip-65pt
%\begin{scriptsize}
%\[
%\frac{1}{59}=
%0'01694915254237288135593220338\alert<9->{98305084745762711864406779661}\dots
%\]
%\end{scriptsize}
%}
%\uncover<9->{
%\vskip-45pt
%\begin{scriptsize}
%\[
%\phantom{\frac{1}{59}=0'}\alert<9->{98305084745762711864406779661}\phantom{01694915254%237288135593220338\dots}
%\]
%\end{scriptsize}
%}



\end{frame}




%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 4  %
%%%%%%%%%%%%%%%%%%%%
\section{Criptograf\'{\i}a RSA}
\begin{frame}
\frametitle{Criptograf\'{\i}a RSA}
%Rivest, Shamir, and Adleman
\vskip-35pt
La criptografia se basa en {\color{MedioRojo} funciones trampa}: operaciones f\'{a}ciles de hacer y muy dif\'{\i}ciles de deshacer sin datos especiales.
\pause

\uncover<3->{
\begin{block}{}
{\color{MedioRojo}$p$}, {\color{MedioRojo}$q$} primos de cientos de cifras,\quad ${\color{MedioRojo}n}=p\cdot q$,\quad ${\color{MedioRojo}m}=(p-1)\cdot (q-1)$,

${\color{MedioRojo}c}=$ arbitrario sin factores comunes con $m$.
\end{block}
}


\begin{wrapfigure}{l}{26mm}
\vskip-18pt\includegraphics[scale=0.3]{canpaj.jpg}
\end{wrapfigure}
\ 
\qquad {\bf\color{MyDarkBlue}\uncover<4->{Cosas f\'{a}ciles y dif\'{\i}ciles}}

\uncover<4->{
\begin{itemize}
\item
\ \uncover<5->{\alert{F}} Dados $p$ y $q$ hallar $n$ y $m$
\item
\ \uncover<6->{\alert{D}} Dados $n$ hallar $p$ y $q$ o hallar $m$
\item
\ \uncover<7->{\alert{F}} Dado $m$ resolver $cx=1+\text{mult. de }m$
\item
\ \uncover<8->{\alert{D}} Dado $n$ resolver $cx=1+\text{mult. de }m$
\end{itemize}
}



\end{frame}


%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 5  %
%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Criptograf\'{\i}a RSA}
\begin{block}{$n=pq$,\ \quad$m=(p-1)(q-1)$}
$c\longrightarrow\text{cerrojo}$,\qquad
$d\longrightarrow\text{llave}$,\qquad
$cd=1+km$

$M=$Mensaje,\quad $M<n$ sin factores comunes 
\end{block}
\pause

\

\begin{tabular}{|l|l}
\cline{1-1}
&
\uncover<3->{\underline{\begin{scriptsize}
$n=5\cdot 7$, $m=24$, $c=d=5$ 
\end{scriptsize}}}
\\
{\color{MyDarkBlue}Codif. (p\'{u}blica):} resto de $M^c\div n$
&
\uncover<3->{\begin{scriptsize}
$2^5\mapsto 32$
\end{scriptsize}}
\\
{\color{MyDarkBlue}Desc.\kern-3pt\phantom{$\bigg|$}
(privada):} resto de $(M^c)^d\div n$
&
\uncover<3->{\begin{scriptsize}
$32^5\mapsto (-3)^5=35\cdot 7+2\mapsto 2$
\end{scriptsize}}
\\
\cline{1-1}
\end{tabular}
\pause
\pause

\begin{block}{?`Por qu\'{e} funciona?}
\[
M^{cd}=M^{1+km}=nM\frac{M^{km}-1}{n}+M\alert<5>{=}\text{m\'{u}ltiplo de }n+M
\]
\end{block}



\end{frame}





%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 6  %
%%%%%%%%%%%%%%%%%%%%
\section{Distribuci\'{o}n de los primos}
\begin{frame}
\vskip-7pt
\frametitle{Distribuci\'{o}n de los primos}
?`Est\'{a}n los n\'{u}meros primos distribuidos \lq\lq al azar''?
\uncover<2>{{\alert{\[
\prod \big(1-\frac1{p^2}\big)=\frac{6}{\pi^2}
\]}}
}
\pause\pause
\vskip-52pt
\begin{block}{{\bf Gauss} 1849}
La densidad de los primos de tama\~{n}o $x$ parece ser $1/\log x$.
\end{block}
\pause

\[
\text{n. de primos menores que $x$}\approx \int_2^x\frac{dt}{\log t}
\]
\pause


\vskip-15pt
\begin{overlayarea}{\textwidth}{4cm}
\only<5>{
\qquad
\includegraphics[scale=0.45]{gauss.jpg} 
\qquad\ \qquad 
\includegraphics[scale=0.45]{tablagauss.png} 
}
\pause
\only<6->{
%\vskip-80pt
\begin{block}{\small Teorema de los n\'{u}meros primos. {\bf Hadamard} y {\bf de la Vall\'{e}e Poussin} 1896}
El error relativo en la aproximaci\'{o}n anterior tiende a cero. Es decir, el cociente de ambas cantidades se aproxima arbitrariamente a $1$ cuando $x$ crece.
\end{block}
}
\end{overlayarea}





\end{frame}


%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 7  %
%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Distribuci\'{o}n de los primos}
\vskip-15pt
\begin{block}{Riemann}
Los primos est\'{a}n relacionados con los n\'{u}meros (complejos) para los que se anula la suma
\begin{footnotesize}
\[
\frac1{1^s}-\frac1{2^s}+\frac1{3^s}-\frac1{4^s}+\frac1{5^s}-\frac1{6^s}+\dots
\]
\end{footnotesize}\end{block}

\

\begin{columns}
\column{.3\textwidth}
\includegraphics[scale=0.4]{riemann.jpg} \pause
\column{.7\textwidth}
\begin{footnotesize}
\begin{tabular}{ll}
$\rho_1=1/2+i14'134725\dots$ &
\\
$\rho_2=1/2+i21'022040\dots$ &
\\
\ldots\quad\ldots \quad(calculados $10^{13}$ de ellos)
\end{tabular}
\end{footnotesize}
\uncover<3->{\begin{block}{Hip\'{o}tesis de Riemann 1859}
Todos tienen parte real igual a $1/2$.
\end{block}}
\end{columns}
\pause
\pause

\

El error absoluto en la aproximaci\'{o}n  es m\'{\i}nimo si y s\'{o}lo si se cumple la hip\'{o}tesis de Riemann.


\end{frame}




%%%%%%%%%%%%%%%%%%%%
% TRANSPARENCIA 8  %
%%%%%%%%%%%%%%%%%%%%
\section{Conjeturas}
\begin{frame}
\frametitle{Algunas conjeturas}


\begin{block}{Nos gustar\'{\i}a saber si\ldots}
%\uncover<2->{
\begin{enumerate}
\item
?`Es cierta la hip\'{o}tesis de Riemann?
%\pause
\item
?`Es todo n\'{u}mero par 
mayor que $2$ 
suma de dos primos?
%\pause
\item
?`Hay infinitos primos gemelos (con diferencia dos)? 
%\pause
\item
?`Hay infinitos primos de la forma $n^2+1$?
%\pause
\item
?`Entre dos cuadrados hay siempre un primo?
%\pause
\item
\ldots
\end{enumerate}
%}
\end{block}

\

\pause
Hay muchos resultados parciales, pero en ninguno de estos problemas se conoce una l\'{\i}nea de ataque esperanzadora.
\end{frame}


\end{document}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\section{Bloques}
\begin{frame}
\frametitle{What’s Still To Do?}
\begin{block}{Answered Questions}
How many primes are there?
\end{block}
\pause
\begin{block}{Open Questions}
Is every even number the sum of two primes?
\end{block}
\end{frame}



\section{Bloques con columnas}
\begin{frame}
\frametitle{What’s Still To Do?}
\begin{columns}
\column{.5\textwidth}
\begin{block}{Answered Questions}
How many primes are there?
\end{block}
\column{.5\textwidth}
\begin{block}{Open Questions}
Is every even number the sum of two primes?
\end{block}
\end{columns}
\end{frame}



\section{Programa}
\begin{frame}[fragile]
\frametitle{An Algorithm For Finding Primes Numbers.}
\begin{semiverbatim}
\uncover<1->{\alert<0>{int main (void)}}
\uncover<1->{\alert<0>{\{}}
\uncover<1->{\alert<1>{ \alert<4>{std::}vector<bool> is_prime (100, true);}}
\uncover<1->{\alert<1>{ for (int i = 2; i < 100; i++)}}
\uncover<2->{\alert<2>{ if (is_prime[i])}}
\uncover<2->{\alert<0>{ \{}}
\uncover<3->{\alert<3>{ \alert<4>{std::}cout << i << " ";}}
\uncover<3->{\alert<3>{ for (int j = i; j < 100;}}
\uncover<3->{\alert<3>{ is_prime [j] = false, j+=i);}}
\uncover<2->{\alert<0>{ \}}}
\uncover<1->{\alert<0>{ return 0;}}
\uncover<1->{\alert<0>{\}}}
\end{semiverbatim}
\visible<4->{Note the use of \alert{\texttt{std::}}.}
\end{frame}

\end{document}




\documentclass[10pt]{beamer}
\usepackage{amsmath}
\usepackage{background}



\mode<beamer>{
\usetheme[hideothersubsections,
right,width=22mm]{Goettingen}
}
\title{Simple Presentation}
\author[D. Flipo]{Daniel Flipo}
\institute{U.S.T.L. \& GUTenberg}
\titlegraphic{\includegraphics[width=20mm]{logo_uam_peq.png}}
\date{2005}
\begin{document}
\begin{frame}%<handout:0>
\titlepage
\end{frame}
\overlay{d12.jpg}

\section{An Example}
\begin{frame}
\frametitle{Things to do on a Sunday Afternoon}
\begin{block}{One could \ldots}
\begin{itemize}
\item walk the dog\dots \pause
\item read a book\pause
\item confuse a cat\pause
\end{itemize}
\end{block}
and many other things
\end{frame}
\end{document}


------------------------------

\begin{align*}
\uncover<5->{
\frac{1}{7}= 0'\overline{142\alert<6>{857}}\dots
& \qquad & 
\frac{1}{17}= 0'\overline{05882352\alert<6>{94117647}}\dots
\\}
\only<6>{
\phantom{\frac{1}{7}= 0'}\alert<6>{857}\phantom{142}\dots
& \qquad & 
\frac{1}{17}= 0'\overline{05882352\alert<6>{94117647}}\dots
\\}
\notag
\end{align*}


\uncover<9->{
\[
\frac{1}{29}=0'03448275862068\alert<10->{96551724137931}\dots
\]
}
\uncover<10->{
\vskip-35pt
\[
\phantom{\frac{1}{29}=0'}\alert<10->{96551724137931}\phantom{03448275862068\dots}
\]
}


\begin{overlayarea}{\textwidth}{3cm}
\only<1>{Some text for the first slide.\\Possibly several lines long.}
\only<2>{Replacement on the second slide.}
\end{overlayarea}


\uncover<5>{
\vskip-15pt
\qquad
\includegraphics[scale=0.45]{gauss.jpg} 
\qquad\ \qquad 
\includegraphics[scale=0.45]{tablagauss.png} 
}
\pause

\only<6->{
\vskip-80pt
\begin{block}{\small Teorema de los n\'{u}meros primos. {\bf Hadamard} y {\bf de la Vallee Poussin} 1896}
El error relativo en la aproximaci\'{o}n anterior tiende a cero. Es decir, el cociente de ambas cantidades se aproxima arbitrariamente a $1$ cuando $x$ crece.
\end{block}
}

