<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Okashini &#187; Matemáticas y números</title>
	<atom:link href="http://okashini.com/matematicas-y-numeros/feed/" rel="self" type="application/rss+xml" />
	<link>http://okashini.com</link>
	<description>Curiosidades, programación, tecnología, actualidad, astronomía y cualquier tema que se me pase por la cabeza</description>
	<lastBuildDate>Wed, 16 May 2012 20:41:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Doblar un papel 45 veces</title>
		<link>http://okashini.com/doblar-papel-45-veces/</link>
		<comments>http://okashini.com/doblar-papel-45-veces/#comments</comments>
		<pubDate>Sun, 13 May 2012 12:39:24 +0000</pubDate>
		<dc:creator>Kamugo</dc:creator>
				<category><![CDATA[Curiosidades]]></category>
		<category><![CDATA[Matemáticas y números]]></category>
		<category><![CDATA[matemáticas]]></category>

		<guid isPermaLink="false">http://okashini.com/?p=2777</guid>
		<description><![CDATA[Domingo, comida familiar. Quiero reírme un rato, así que reto a alguien a ver si puede doblar sobre sí mismo un papel 15 veces. La mayoría acepta. Normalmente empiezan con un papel pequeño, lo doblan 7 u 8 veces y paran. Muchos en este momento decidirán ir a por un papel más grande para no [...]]]></description>
			<content:encoded><![CDATA[<p>
	Domingo, comida familiar. Quiero reírme un rato, así que reto a alguien a ver si puede doblar sobre sí mismo un papel 15 veces. La mayoría acepta. Normalmente empiezan con un papel pequeño, lo doblan 7 u 8 veces y paran. Muchos en este momento decidirán ir a por un papel más grande para no perder su orgullo. Después de intentarlo, volverán a fracasar, no saben que <b>necesitan un papel exponencialmente más grande</b> para poder hacer más pliegues.
</p>
<p>
	Cuando ya han decidido darlo por imposible les explico qué pasa, y es que la función que nos indica el grosor de la hoja después de doblarla <img src='http://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> veces es <img src='http://s0.wp.com/latex.php?latex=2%5En&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='2^n' title='2^n' class='latex' />. Esto significa que por cada pliegue que hagamos, <b>multiplicaremos el grosor por 2</b>. El crecimiento al principio no se llega a notar, lo que hace pensar que, al hacer 4 o 5 pliegues fácilmente, el resto van a ser iguales. Pero esto es falso, ya que a cada pliegue extra multiplicará por 2 la dificultad (imaginad una montaña que empieza siendo casi plana y acaba siendo vertical).
</p>
<h2>En la vida real, por favor</h2>
<p>
	Imaginad que tenemos un papel de periódico con un grosor de 0.001 centímetros (un papel MUY fino). Entonces, si <img src='http://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> es el número de pliegues, la función que define el grosor es <img src='http://s0.wp.com/latex.php?latex=0.001+%5Ccdot+2%5En&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='0.001 &#92;cdot 2^n' title='0.001 &#92;cdot 2^n' class='latex' /> centímetros. Hasta los 5 pliegues la dificultad es mínima, sólo tenemos que aplicar la fórmula con <img src='http://s0.wp.com/latex.php?latex=n%3D4&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n=4' title='n=4' class='latex' />, lo que nos da un grosor de 0.032 centímetros. Llegar a los 10 pliegues ya es más difícil con papeles pequeños, porque habríamos alcanzado algo más de 1 centímetro. Aún así, los 10 pliegues parecen asumibles, pero 15 pliegues hacen dispararse la cifra hasta los 32 centímetros.
</p>
<div align="center">
	<img title="Grosor del papel de 0 a 10 pliegues" alt="En este gráfico vemos el comportamiento de la función exponecial" src="http://okashini.com/wp-content/uploads/2012/05/Función-exponencial.png"/>
	<img title="Grosor del papel de 0 a 15 pliegues" alt="En este gráfico comparamos como varía el grosor comparando 10 a 15 pliegues" src="http://okashini.com/wp-content/uploads/2012/05/Función-exponencial-2.png"/>
</div>
<p>
	En las imagenes vemos bien cómo sería el grosor del papel. En la primera tenemos el grosor hasta 10 pliegues, y en la otra hasta 15 pliegues. En esta última se ve que los 10 pliegues son ridículos ahora comparado con los 15. Con 20 los 15 serán ridículos, y así hasta el infinito.
</p>
<h2>Hasta el espacio, y más allá&#8230;</h2>
<p>
	Aún sabiendo esto, el cerebro no es muy bueno imaginando estas cifras y se pierde llegado a cierto punto. He probado a preguntar a la gente que retaba cuánto creían que sería el grosor haciendo 45 pliegues, la mayoría dijo cientos de metros o algún que otro kilómetro. Ninguno se llegó siquiera a acercar. Vamos a substituir la fórmula otra vez con <img src='http://s0.wp.com/latex.php?latex=n%3D45&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n=45' title='n=45' class='latex' />. Para más comodidad cambiamos la fórmula a kilómetros, que quedaría como <img src='http://s0.wp.com/latex.php?latex=10%5E%7B-8%7D+%5Ccdot+2%5En&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='10^{-8} &#92;cdot 2^n' title='10^{-8} &#92;cdot 2^n' class='latex' />. Substituímos y, ¡TACHÁN!, aparecen unos <b>351 mil kilómetros</b>. ¡Más o menos la distancia que hay hasta la Luna! Si aún no habéis entendido el crecimiento exponencial, significa que haciendo otro pliegue conseguiríamos ir a la Luna y, además, volver de nuevo. 
</p>
<p>
	En el siguiente vídeo se explica esto de forma más gráfica, eso sí, en inglés.
</p>
<span style="text-align:center; display: block;"><a href="http://okashini.com/doblar-papel-45-veces/"><img src="http://img.youtube.com/vi/AmFMJC45f1Q/2.jpg" alt="" /></a></span>
<p>
	Ahora vamos un poco más lejos. Para ir hasta Urano (que <a href="http://www.wolframalpha.com/input/?i=distance+from+earth+to+uranus">está a unos 2872 millones de kilómetros</a>) sólo tendriamos que hacer <b>58 pliegues</b>. Vamos más lejos. Próxima Centauri (la estrella más próxima al Sol) está a unos 4.2 años luz (unas 14000 veces más que Urano). Ahora necesitamos unos <b>72 pliegues</b>, sólo 14 más que para llegar al planeta azul. Así podemos seguir, y en no mucho tiempo llegaríamos al final de universo conocido.
</p>]]></content:encoded>
			<wfw:commentRss>http://okashini.com/doblar-papel-45-veces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>El conjunto de Mandelbrot</title>
		<link>http://okashini.com/el-fractal-de-mandelbrot/</link>
		<comments>http://okashini.com/el-fractal-de-mandelbrot/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 11:14:30 +0000</pubDate>
		<dc:creator>Kamugo</dc:creator>
				<category><![CDATA[Matemáticas y números]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[fractales]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mandelbrot]]></category>
		<category><![CDATA[matemáticas]]></category>
		<category><![CDATA[programación]]></category>

		<guid isPermaLink="false">http://okashini.com/?p=1991</guid>
		<description><![CDATA[Un fractal, como muchos sabréis, es una estructura que se repite a diferentes escalas. El fractal más conocido es el de Mandelbrot, estudiado por el matemático polaco, ya fallecido, Benoît Mandelbrot, recientemente fallecido, en la década de los 70 del siglo pasado. Mandelbrot pensaba que lo que él estaba estudiando no interesaba a nadie, ya [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript" src = "http://okashini.com/js/jquery.js"></script><script type="text/javascript" src = "http://okashini.com/wp-content/uploads/2011/07/mandelbrot.js"></script><p>Un <a href="http://es.wikipedia.org/wiki/Fractal">fractal</a>, como muchos sabréis, es una estructura que se repite a diferentes escalas. El fractal más conocido es el de Mandelbrot, estudiado por el matemático polaco, ya fallecido, <a href="http://es.wikipedia.org/wiki/Beno%C3%AEt_Mandelbrot">Benoît Mandelbrot</a>, recientemente fallecido, en la <strong>década de los 70</strong> del siglo pasado. Mandelbrot pensaba que lo que él estaba estudiando no interesaba a nadie, ya que todos los demás matemáticos se centraban en estructuras &#8220;suaves y regulares&#8221;. Para definir estas nuevas estructuras acudió a un diccionario de latín, hasta encontrar un adjetivo que describía las piezas irregulares de una piedra que ha sido lanzada: «<em>fractus</em>, <em>fracta</em>, <em>fractum</em>».</p>

<p>Los fractales no son sólo cosa de las matemáticas, sino que <strong>aparecen en muchos lugares de la naturaleza</strong>, como en las hojas de los helechos, en las ramas de los árboles, en el brécol, etc. Un caso extraordinario de fractal lo podemos encontrar en el Romanescu, una mezcla de brécol y coliflor.</p>

<a href="http://okashini.com/wp-content/uploads/2011/07/Romanescu.jpg"><img class="aligncenter size-medium wp-image-2273" title="Romanescu" src="http://okashini.com/wp-content/uploads/2011/07/Romanescu-300x288.jpg" alt="Romanescu, un fractal en la naturaleza" width="300" height="288" /></a>

<strong>Matemáticamente</strong>, el conjunto de Mandelbrot se define como:
<ul>
	<li>Tenemos <img src='http://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c' title='c' class='latex' />, un número complejo cualquiera.</li>
	<li>Tenemos la sucesión por inducción siguiente
<img src='http://s0.wp.com/latex.php?latex=%5Cleft+%5C%7B++%5Cbegin%7Bmatrix%7D++z_0+%26+%3D+%26+0+%5Cqquad+%5C+%26+%5Cqquad+%5C%5C++z_%7Bn%2B1%7D+%26+%3D+%26+z_n%5E2+%2B+c+%26++%5Cend%7Bmatrix%7D+%5Cright.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;left &#92;{  &#92;begin{matrix}  z_0 &amp; = &amp; 0 &#92;qquad &#92; &amp; &#92;qquad &#92;&#92;  z_{n+1} &amp; = &amp; z_n^2 + c &amp;  &#92;end{matrix} &#92;right.' title='&#92;left &#92;{  &#92;begin{matrix}  z_0 &amp; = &amp; 0 &#92;qquad &#92; &amp; &#92;qquad &#92;&#92;  z_{n+1} &amp; = &amp; z_n^2 + c &amp;  &#92;end{matrix} &#92;right.' class='latex' /></li>
</ul>

<p>Si la sucesión queda acotada, podemos decir que el punto <img src='http://s0.wp.com/latex.php?latex=c+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c ' title='c ' class='latex' /> es parte del conjunto.</p>

<p>Pero dejemos las matemáticas y vamos a ver como se ve el conjunto gráficamente. Lo he generado utilizando <strong>jQuery</strong> y HTML5. Podéis aumentarlo para ver la autosimilitud haciendo clic encima. Es probable que no lo podáis leer desde el lector RSS o utilizando un navegador antiguo.</p>

<center><canvas style="border: 1px solid gray; border-radius: 3px;" id="canvas" width="150" height="150">
Tu navegador no es compatible con Canvas, deberías utilizar uno más moderno.
</canvas></center>
<div id="mandInfo" style = "color: gray; font-style: italic; text-align: center;"></div>

<p>Para acabar, la entrevista de Benoît en el programa Redes</p>

<span style="text-align:center; display: block;"><a href="http://okashini.com/el-fractal-de-mandelbrot/"><img src="http://img.youtube.com/vi/npOwA6fXevE/2.jpg" alt="" /></a></span>

<p>Como siempre, dejo el código para los programadores curiosos</p>

<div class="codecolorer-container javascript railscasts .codecolorer-container { border-radius: 5px; }" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;height:100%;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">// Clase timer para contar el tiempo de ejecucion</span><br />
<span style="color: #003366; font-weight: bold;">var</span> timer <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;time<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;now<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;start<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">time</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">now</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;since<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">now</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">time</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Variables globales</span><br />
<span style="color: #006600; font-style: italic;">// Variables del tamaño de Canvas</span><br />
<span style="color: #003366; font-weight: bold;">var</span> width <span style="color: #339933;">=</span> <span style="color: #CC0000;">500</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> height <span style="color: #339933;">=</span> <span style="color: #CC0000;">500</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">// Precisión de los pixels (1 es lo más preciso)</span><br />
<span style="color: #003366; font-weight: bold;">var</span> pixels <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Coordenadas iniciales</span><br />
<span style="color: #003366; font-weight: bold;">var</span> xmin <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> xmax <span style="color: #339933;">=</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> ymin <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1.5</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> ymax <span style="color: #339933;">=</span> <span style="color: #CC0000;">1.5</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Stride</span><br />
<span style="color: #003366; font-weight: bold;">var</span> stridex <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>xmax <span style="color: #339933;">-</span> xmin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> height<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> pixels<span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> stridey <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>ymax <span style="color: #339933;">-</span> ymin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> width<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> pixels<span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Aumentos</span><br />
<span style="color: #003366; font-weight: bold;">var</span> zoom <span style="color: #339933;">=</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> aumentos <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Iteraciones</span><br />
<span style="color: #003366; font-weight: bold;">var</span> maxIt <span style="color: #339933;">=</span> <span style="color: #CC0000;">200</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> render<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Cargamos canvas</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Obtenemos el objeto Canvas</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> canvas <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'canvas'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> context <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Obtenemos el contexto 2d</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>canvas <span style="color: #339933;">&amp;&amp;</span> canvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2d'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; context <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>context<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Si existe empezamos a dibujar</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Cambiamos el tamaño, por si este ha cambiado</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; canvas.<span style="color: #660066;">width</span> <span style="color: #339933;">=</span> width<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; canvas.<span style="color: #660066;">height</span> <span style="color: #339933;">=</span> height<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> x0 <span style="color: #339933;">=</span> xmin<span style="color: #339933;">,</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> height<span style="color: #339933;">;</span> i <span style="color: #339933;">+=</span> pixels<span style="color: #339933;">,</span> x0 <span style="color: #339933;">+=</span> stridex<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> y0 <span style="color: #339933;">=</span> ymin<span style="color: #339933;">,</span> j <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> width<span style="color: #339933;">;</span> j <span style="color: #339933;">+=</span> pixels<span style="color: #339933;">,</span> y0 <span style="color: #339933;">+=</span> stridey<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> y <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> it<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>it <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> x<span style="color: #339933;">*</span>x <span style="color: #339933;">+</span> y<span style="color: #339933;">*</span>y <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">4</span> <span style="color: #339933;">&amp;&amp;</span> it <span style="color: #339933;">&lt;</span> maxIt<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>it<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> xtemp <span style="color: #339933;">=</span> x<span style="color: #339933;">*</span>x <span style="color: #339933;">-</span> y<span style="color: #339933;">*</span>y <span style="color: #339933;">+</span> x0<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y <span style="color: #339933;">=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">*</span>x<span style="color: #339933;">*</span>y <span style="color: #339933;">+</span> y0<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x <span style="color: #339933;">=</span> xtemp<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>it <span style="color: #339933;">&gt;=</span> maxIt<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context.<span style="color: #660066;">fillStyle</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;rgba(0,0,0,1)&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context.<span style="color: #660066;">fillRect</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>j<span style="color: #339933;">,</span>pixels<span style="color: #339933;">,</span>pixels<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context.<span style="color: #660066;">fillStyle</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;rgba(0,0,0,&quot;</span> <span style="color: #339933;">+</span> it <span style="color: #339933;">/</span> maxIt <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;)&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context.<span style="color: #660066;">fillRect</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>j<span style="color: #339933;">,</span>pixels<span style="color: #339933;">,</span>pixels<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> timer.<span style="color: #660066;">since</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> since <span style="color: #339933;">=</span> render<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mandInfo&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Renderizado en &quot;</span> <span style="color: #339933;">+</span> since <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; ms&lt;/br&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#canvas&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Obtengo las coordenadas del clic dentro de canvas</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">pageX</span><span style="color: #339933;">-</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#canvas&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">left</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> y <span style="color: #339933;">=</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">pageY</span><span style="color: #339933;">-</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#canvas&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">offset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">top</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Las transformo a las coordenadas actuales</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> realx <span style="color: #339933;">=</span> xmin <span style="color: #339933;">+</span> x <span style="color: #339933;">*</span> stridex<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> realy <span style="color: #339933;">=</span> ymin <span style="color: #339933;">+</span> y <span style="color: #339933;">*</span> stridey<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Pongo los nuevos límites de las coordenadas</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> temp_xmin <span style="color: #339933;">=</span> xmin<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> temp_xmax <span style="color: #339933;">=</span> xmax<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> temp_ymin <span style="color: #339933;">=</span> ymin<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> temp_ymax <span style="color: #339933;">=</span> ymax<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; xmin <span style="color: #339933;">=</span> realx <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span>temp_xmax <span style="color: #339933;">-</span> temp_xmin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> zoom<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; xmax <span style="color: #339933;">=</span> realx <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>temp_xmax <span style="color: #339933;">-</span> temp_xmin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> zoom<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ymin <span style="color: #339933;">=</span> realy <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span>temp_ymax <span style="color: #339933;">-</span> temp_ymin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> zoom<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ymax <span style="color: #339933;">=</span> realy <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>temp_ymax <span style="color: #339933;">-</span> temp_ymin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> zoom<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Recalculo los Strides</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; stridex <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>xmax <span style="color: #339933;">-</span> xmin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> height<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> pixels<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; stridey <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>ymax <span style="color: #339933;">-</span> ymin<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> width<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> pixels<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">++</span>aumentos<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; since <span style="color: #339933;">=</span> render<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#mandInfo&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Aumentado en &quot;</span> <span style="color: #339933;">+</span> since <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; ms&lt;/br&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>

Para que funcione, en el HTML hay que importar la librería <strong>jQuery</strong>. Después necesitamos el <em>canvas</em> de HTML5: <code class="codecolorer html4strict default .codecolorer-container { border-radius: 5px; }"><span class="html4strict"><span style="color: #009900;">&lt;canvas <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;canvas&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;500&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>canvas&gt;</span></span></code> (tiene que tener identificador <strong>canvas</strong>). Por último y opcionalmente, un <em>div</em> donde se muestra el tiempo de renderizado: <code class="codecolorer html4strict default .codecolorer-container { border-radius: 5px; }"><span class="html4strict"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;mandInfo&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></span></code>.]]></content:encoded>
			<wfw:commentRss>http://okashini.com/el-fractal-de-mandelbrot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pasatiempos Collatz</title>
		<link>http://okashini.com/pasatiempos-collatz/</link>
		<comments>http://okashini.com/pasatiempos-collatz/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 11:55:35 +0000</pubDate>
		<dc:creator>Kamugo</dc:creator>
				<category><![CDATA[Matemáticas y números]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[collatz]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[matemáticas]]></category>

		<guid isPermaLink="false">http://okashini.com/?p=856</guid>
		<description><![CDATA[La conjetura de Collatz dice que si cogemos un número al azar y si es par lo dividimos entre 2 o si es impar lo multiplicamos por 3 y le sumamos uno siempre llegaremos a 1 si repetimos este paso indefinidas veces. ¿Cuál es su utilidad? Que yo sepa, ninguna. Ni siquiera se ha demostrado [...]]]></description>
			<content:encoded><![CDATA[<p><script src="/js/jquery.js" type="text/javascript"></script> <script type="text/javascript">// <![CDATA[
    function IsNumeric(expression) { return (String(expression).search(/^\d+$/) != -1); } $(document).ready(function(){ $("#cuadro_Collatz").keyup(function() {  var n = $(this).val(); var result; if(!IsNumeric(n)) result = "No es un número"; else if(n>10000) result = "No te pases";
else if(n<1) result = "Sólo números más grandes que 1"; else { result = 0; while(n != 1) { ++result; if(n%2) n = 3*n +1; else n /= 2; } } $("#resultado_Collatz").text(result); }); });
// ]]&gt;</script></p>
<p>La conjetura de Collatz dice que si cogemos un número al azar y si es par lo <strong>dividimos entre 2</strong> o si es impar lo <strong>multiplicamos por 3 y le sumamos uno</strong> siempre llegaremos a 1 si repetimos este paso indefinidas veces. ¿Cuál es su utilidad? Que yo sepa, ninguna. Ni siquiera se ha demostrado que sea cierto, o falso, pero es entretenido.</p>
<p style="text-align: center;"><a href="http://okashini.com/wp-content/uploads/2010/03/collatz_conjecture.png"><img class="aligncenter size-full wp-image-858" title="Conjetura de Collatz, por xkcd" src="http://okashini.com/wp-content/uploads/2010/03/collatz_conjecture.png" alt="" width="311" height="452" /></a></p>
<p style="text-align: center;"><em>Viñeta sobre Collatz en xkcd<br />
</em><em><a href="http://es.xkcd.com/xkcd-es/strips/conjetura-de-collatz/">es.xkcd.com/xkcd-es/strips/conjetura-de-collatz/</a></em></p>
<p style="text-align: left;">¿Cuántas veces creéis que hay que repetirlo con estos números para llegar a 1?</p>
<ul>
<li>13</li>
<li>23</li>
<li>72</li>
<li>280</li>
</ul>
<p>Es difícil imaginarse cuantas veces tenemos que repetir la operación para llegar a 1, calcularlo no tanto, pero podemos acabar como el  personaje de la tira cómica. A los ordenadores no les cuesta tanto. Podéis probar cuantas veces hacen falta poniendo el número aquí debajo.</p>
<p><em>Los que leéis desde un lector de feeds es posible que no lo veáis.</em></p>
<p style="text-align: center;">
<input id="cuadro_Collatz" size="10" type="textbox" />
<p style="text-align: center;"><strong><span id="resultado_Collatz" class="post-content">Introduce el número que quieras</span> </strong></p>
<p>El 280 parece que tendría más pasos que el 72, pero no. Normalmente contra más grande es el número, más pasos necesita, pero esto no se cumple siempre. Por ejemplo, 1.000 necesita <strong>111 pasos</strong> pero 10.000 sólo necesita <strong>29</strong>, de hecho, el número que necesita más iteraciones entre 1 y 10.000 (lo máxima que deja calcular nuestro programa) está más o menos por la mitad, <strong>6.171</strong> y <strong>261 iteraciones</strong>, os dejo a vosotros que calculéis el máximo hasta 100.000.</p>
<p>Como siempre, información para los <strong>más técnicos</strong>, aquí tenéis el código <strong>Javascript </strong>utilizando la librería <strong>Jquery </strong>que calcula las iteraciones.</p>

<div class="codecolorer-container javascript railscasts .codecolorer-container { border-radius: 5px; }" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;height:100%;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;!-- Incluímos la librería de Javascript Jquery. Tenéis que tenerla descargada --&gt;<br />
&lt;script src=&quot;/jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; <br />
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Función que calcula si una expresion es numérica</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span> IsNumeric<span style="color: #009900;">&#40;</span>expression<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>String<span style="color: #009900;">&#40;</span>expression<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">search</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^\d+$/</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> &nbsp; &nbsp;<br />
<br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Cuando se escribe en #cuadro_Collatz</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#cuadro_Collatz&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keyup</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> n <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Valor del textbox</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> result<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Cuando no es un número</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>IsNumeric<span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> result <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;No es un número&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Cuando es muy grande (lo he limitado a 10000)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">&gt;</span><span style="color: #CC0000;">10000</span><span style="color: #009900;">&#41;</span> result <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;No te pases&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Cuando es menor que 1 (no se puede calcular)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">&lt;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> result <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Sólo números más grandes que 1&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Cuando se puede calcular</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>n <span style="color: #339933;">!=</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">++</span>result<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>n<span style="color: #339933;">%</span>2<span style="color: #009900;">&#41;</span> n <span style="color: #339933;">=</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">*</span>n <span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Es impar</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> n <span style="color: #339933;">/=</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Es par</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Se escribe el resultado en la id #resultado_Collatz</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#resultado_Collatz&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>

<p>Después del script necesitamos un textbox con identificador <strong>#cuadro_Collatz</strong> y un span (por ejemplo) con identificador <strong>#resultado_Collatz</strong>.</p>

<div class="codecolorer-container html4strict railscasts .codecolorer-container { border-radius: 5px; }" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cuadro_Collatz&quot;</span> <span style="color: #000066;">size</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;textbox&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;resultado_Collatz&quot;</span>&gt;</span>Introduce el número que quieras<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span></div></div>

]]></content:encoded>
			<wfw:commentRss>http://okashini.com/pasatiempos-collatz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>El cifrado César</title>
		<link>http://okashini.com/el-cifrado-cesar-3/</link>
		<comments>http://okashini.com/el-cifrado-cesar-3/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 20:26:38 +0000</pubDate>
		<dc:creator>Kamugo</dc:creator>
				<category><![CDATA[Informática]]></category>
		<category><![CDATA[Matemáticas y números]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[matemáticas]]></category>

		<guid isPermaLink="false">http://okashini.com/?p=908</guid>
		<description><![CDATA[El cifrado César o por desplazamiento es una de las formas más simples de ocultar mensajes, aunque también una de las más fáciles de descifrar. El método no tiene más misterio que desplazar cada letra un número determinado de posiciones dentro del alfabeto de forma cíclica, es decir, si se llega al final se vuelve [...]]]></description>
			<content:encoded><![CDATA[
<p>El cifrado César o <strong>por desplazamiento</strong> es una de las formas más simples de ocultar mensajes, aunque también una de las más fáciles de descifrar. El método no tiene más misterio que desplazar cada letra un número determinado de posiciones dentro del alfabeto de forma cíclica, es decir, si se llega al final se vuelve a empezar por el principio. Por ejemplo, con un desplazamiento de 3 posiciones a la derecha.</p>
<p><em><strong><span style="font-weight: normal;">Alfabeto sin cifrar:</span> </strong></em>ABCDEFGHIJKLMNÑOPQRSTUVWXYZ.<br /> <em><strong><span style="font-weight: normal;">Alfabeto cifrado:</span> </strong></em>DEFGHIJKLMNÑOPQRSTUVWXYZABC.</p>
<p>Texto sin cifrar:<em> Estoy leyendo Okashini</em>.<br /> Texto cifrado:<em> Hvwrb ohbhqgr Rndvklql</em>.</p>
<p>El origen del cifrado lo encontramos hace más de 2.000 años. Corría el siglo I a.C cuando Julio César utilizó este cifrado con un desplazamiento de 3 posiciones a la derecha para ocultar mensajes en tiempos de guerra.</p>
<p>El descifrado es igual de sencillo si se conoce el número de desplazamientos que hay que realizar. Si no se conoce hay que trabajar algo más, aunque solamente habría que probar todas las combinaciones posibles, probando las primeras palabras hasta encontrar alguna frase coherente, y después traducir todo el texto. Podrían parecer demasiadas combinaciones, pero en el caso de nuestro alfabeto actual son solamente 27 posibilidades, pocas en comparación con otros cifrados. ¿Os imagináis que hubiera la misma cantidad que <a href="http://es.wikipedia.org/wiki/Hanzi">kanjis</a> japoneses o <a href="http://es.wikipedia.org/wiki/Hanzi">hanzis</a> chinos?</p>
<ul>
	<li><em>Vjkf vj le kvokf tzwiruf r kirmvj uvc dvkfuf Tvjri tfe 43 gfjztzfevj uv uvjgcrqrdzvekf r cr uvivtyr.</em></li>
</ul>
<p>¿Podéis descifrarlo?</p>
<p>Como curiosidad, este cifrado se utiliza para otros más complejos como el de <a href="http://es.wikipedia.org/wiki/Cifrado_de_Vigen%C3%A8re">Vigenère</a>.</p>
<p>¿Conocéis otros sistemas de cifrado?</p>
<p>Para los más técnicos, os dejo un programa en C++ que codifica textos.</p>

<div class="codecolorer-container cpp railscasts .codecolorer-container { border-radius: 5px; }" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;height:100%;"><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">// Cifrado César</span><br />
<span style="color: #666666;">// No se cifran letras con tilde, ñ, ç, ...</span><br />
&nbsp;<br />
<span style="color: #339900;">#include &lt;iostream&gt;</span><br />
<span style="color: #339900;">#include &lt;string&gt;</span><br />
<span style="color: #0000ff;">using</span> <span style="color: #0000ff;">namespace</span> std<span style="color: #008080;">;</span><br />
&nbsp;<br />
<span style="color: #0000ff;">void</span> cesar<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">const</span> string<span style="color: #000040;">&amp;</span> s, <span style="color: #0000ff;">int</span> n<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> s.<span style="color: #007788;">size</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #000040;">++</span>i<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">char</span> c <span style="color: #000080;">=</span> s<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>c <span style="color: #000080;">&gt;=</span> <span style="color: #FF0000;">'a'</span> and c <span style="color: #000080;">&lt;=</span> <span style="color: #FF0000;">'z'</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">// Minúsculas</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>c<span style="color: #000040;">+</span>n<span style="color: #000080;">&gt;</span><span style="color: #FF0000;">'z'</span><span style="color: #008000;">&#41;</span> <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #0000ff;">char</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">'a'</span><span style="color: #000040;">+</span>c<span style="color: #000040;">+</span>n<span style="color: #000040;">-</span><span style="color: #FF0000;">'z'</span><span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #0000ff;">char</span><span style="color: #008000;">&#40;</span>c<span style="color: #000040;">+</span>n<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>c <span style="color: #000080;">&gt;=</span> <span style="color: #FF0000;">'A'</span> and c <span style="color: #000080;">&lt;=</span> <span style="color: #FF0000;">'Z'</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666;">// Mayúsculas</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>c<span style="color: #000040;">+</span>n<span style="color: #000080;">&gt;</span><span style="color: #FF0000;">'Z'</span><span style="color: #008000;">&#41;</span> <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #0000ff;">char</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">'A'</span><span style="color: #000040;">+</span>c<span style="color: #000040;">+</span>n<span style="color: #000040;">-</span><span style="color: #FF0000;">'Z'</span><span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #0000ff;">char</span><span style="color: #008000;">&#40;</span>c<span style="color: #000040;">+</span>n<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">else</span> <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> c<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span><br />
&nbsp;<br />
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">int</span> n<span style="color: #008080;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666;">// Número de posiciones a desplazar</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">cin</span> <span style="color: #000080;">&gt;&gt;</span> n<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; n <span style="color: #000040;">%</span><span style="color: #000080;">=</span> <span style="color: #0000dd;">26</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; string s<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">cin</span> <span style="color: #000080;">&gt;&gt;</span> s<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; cesar<span style="color: #008000;">&#40;</span>s, n<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">' '</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>

]]></content:encoded>
			<wfw:commentRss>http://okashini.com/el-cifrado-cesar-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Santa Claus, según la física</title>
		<link>http://okashini.com/santa-claus-segun-la-fisica/</link>
		<comments>http://okashini.com/santa-claus-segun-la-fisica/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 13:04:32 +0000</pubDate>
		<dc:creator>Kamugo</dc:creator>
				<category><![CDATA[Física]]></category>
		<category><![CDATA[Matemáticas y números]]></category>
		<category><![CDATA[humor. física]]></category>
		<category><![CDATA[números]]></category>

		<guid isPermaLink="false">http://okashiweb.wordpress.com/?p=93</guid>
		<description><![CDATA[Santa Claus, el gordo barbudo, ¿existe? la física no dice que no directamente sin proponerse un estudio sobre este ser. Y aquí están las conclusiones. 1. Ninguna especie conocida de reno puede volar, pero hay 300.000 especies de organismos con vida que aún no han sido clasificados, muchos de ellos insectos y gérmenes. Muchos, que [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">
<p>Santa Claus, el gordo barbudo, ¿existe? la física no dice que no directamente sin proponerse un estudio sobre este ser. Y aquí están las conclusiones.</p>
<p><strong>1.</strong> Ninguna especie conocida de reno puede volar, pero hay 300.000 especies de organismos con vida que aún no han sido clasificados, muchos de ellos insectos y gérmenes. Muchos, que no todos. Esto no excluye que pueda haber renos con la capacidad de elevarse hacia el cielo.</p>
<p><strong>2.</strong> Hay 2.000 millones de niños (personas con menos de 18 años) en todo el planeta. Pero como Santa Claus no da regalos a musulmanes, hindúes, judíos o budistas (xenofobia?), eso reduce el trabajo hasta un 15% aproximadamente (378 millones). Con una media de 3.5 niños por casa, según el censo, eso significa que Santa tendría que visitas unos 91.8 millones de hogares. Intentemos pensar que hay por lo menos un niño que ha sido bueno en cada uno de ellos, si no tendríamos que reducir ese número&#8230;</p>
<p><strong>3.</strong>Santa Claus tiene 31 horas de navidad para trabajar, gracias a las diferencias horarias y asumiendo que viaja de este a oeste, lo más lógico.<br />
Eso significa que tiene que visitar 822.6 casas por segundo. Es decir, el gordito tiene una milésima parte de segundo para llegar a la casa cristiana (con un niño bueno), aparcar, salir del trineo, bajar por la chimenea, llenar los calcetines, distribuir los regalos restantes bajo el árbol, comerse los regalos que le han dejado a él (vaya empacho), subir por la chimenea, subirse de nuevo al trineo y ir a visitar la siguiente casa.<br />
Asumiendo que esas 91.8 millones de casas están regularmente distribuidas por el planeta (falso, pero podemos aceptarlo en nuestros &#8216;cálculos&#8217;), estamos hablando ahora de una distancia de separación de 125.5 kilómetros por cada parada, un viaje total de 121.5 millones de kilómetros, sin contar las paradas de lo que nosotros ya sabemos, comer, etc&#8230;</p>
<p>Esto significa que el trineo del gordo se mueve a 1046 Km/s (3.765.600 Km/h), unas 3.000 veces la velocidad del sonido, o 300 veces menor a la de la luz. Para comparar, el vehículo más rápido construido por el hombre (el Ulyses Space Probe), se mueve a 44.1 Km/s (unos 158.760 Km/h). Un reno convencional (no el volador) puede correr a 24 kilómetros por hora.</p>
<p><strong>4.</strong>La carga en el trineo añade otro elemento interesante. Asumiendo que cada niño recibiera nada más que un paquete mediano de lego (1 Kg aprox.), el trineo tendría que aguantar un peso de 321.300 toneladas, eso sin contar al ya mencionado gordito.<br />
En tierra, un reno convencional puede llevar un máximo de 136 Kg. Si suponemos que el super-reno volador pudiera llevar 10 veces más peso (1360 Kg), necesitaríamos 214.200 renos. Esto aumenta el peso, sin contar el peso del trineo, a 356.430 toneladas. De nuevo, para comparar, es cuatro veces el peso de el Queen Elizabeth (un barco).</p>
<p><strong>5.</strong> 356.000 toneladas a 1.056 Km/s crea una gran resistencia al aire, que provocará que los renos reciban un calor proporcional al de una nave espacial entrando en la atmósfera terrestre.</p>
<p>Resumiendo, los primeros renos se incendiarían casi instantaneamente, exponiendo a la resistencia a los de detrás, causando, también, explosiones sónicas a su paso. Todos los renos habrían sido vaporizados en menos de 4.26 milésimas de segundo.</p>
<p>mientras, Santa Claus estaría recibiendo una fuerza de 17500.06G. Un Santa de unos 100 Kg (algo no muy gordo) sería llevado hasta el final de su trineo con una fuerza de 1957257 Kg.</p>
<p>En conclusión, es físicamente imposible que alguien aguante esas fuerzas, a parte de que Santa Claus fuera un robot, como en Futurama.</p>
<p style="text-align: center;"><a href="http://okashini.com/wp-content/uploads/2008/08/Robo-Santa.jpg"><img class="aligncenter size-full wp-image-1186" title="Robo Santa Futurama" src="http://okashini.com/wp-content/uploads/2008/08/Robo-Santa.jpg" alt="" width="500" height="375" /></a></p>
<p style="text-align: left;">Vía: Traducción y adaptación de <a href="http://www.physlink.com/Fun/IsThereSanta.cfm">Physlink</a> (El cambio de medidas puede alterar los resultados).</p>
]]></content:encoded>
			<wfw:commentRss>http://okashini.com/santa-claus-segun-la-fisica/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Números</title>
		<link>http://okashini.com/numeros/</link>
		<comments>http://okashini.com/numeros/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:29:00 +0000</pubDate>
		<dc:creator>Kamugo</dc:creator>
				<category><![CDATA[Curiosidades]]></category>
		<category><![CDATA[Matemáticas y números]]></category>
		<category><![CDATA[cursiodidades]]></category>
		<category><![CDATA[matemáticas]]></category>
		<category><![CDATA[números]]></category>

		<guid isPermaLink="false">http://okashiweb.wordpress.com/?p=84</guid>
		<description><![CDATA[16: Es el único número donde , siendo e enteros distintos. 28: Es el 2&#186; n&#250;mero perfecto. 53: &#218;nico n&#250;mero de dos cifras que se escribe opuesto en hexadecimal. 94: Es un n&#250;mero de Smith. 135: . 198: 11 + 99 + 88. 240: Es el n&#250;mero m&#225;s peque&#241;o con 20 divisores. 9945: 17!!!! &#8230; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>16: </strong>Es el único número donde <img src='http://s0.wp.com/latex.php?latex=X%5EY%3DY%5EX+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X^Y=Y^X ' title='X^Y=Y^X ' class='latex' />, siendo <img src='http://s0.wp.com/latex.php?latex=X+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X ' title='X ' class='latex' /> e <img src='http://s0.wp.com/latex.php?latex=Y+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='Y ' title='Y ' class='latex' /> enteros distintos.<br />
<strong>28: </strong>Es el 2&ordm; n&uacute;mero perfecto.<br />
<strong>53:</strong> &Uacute;nico n&uacute;mero de dos cifras que se escribe opuesto en hexadecimal.<br />
<strong>94:</strong> Es un <a href="http://es.wikipedia.org/wiki/N%C3%BAmero_de_Smith">n&uacute;mero de Smith</a>.<br />
<strong>135:</strong> <img src='http://s0.wp.com/latex.php?latex=1%5E1%2B3%5E2%2B5%5E3+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='1^1+3^2+5^3 ' title='1^1+3^2+5^3 ' class='latex' />.<br />
<strong>198:</strong> 11 + 99 + 88.<br />
<strong>240:</strong> Es el n&uacute;mero m&aacute;s peque&ntilde;o con 20 divisores.<br />
<strong>9945:</strong> 17!!!!</p>
<p>&#8230;</p>
<p>V&iacute;a: <a href="http://www.stetson.edu/~efriedma/numbers.html">Stetson</a> (Ingl&eacute;s). Curiosidades de n&uacute;meros del 0 hasta el 9999, hasta cansarte.</p>
]]></content:encoded>
			<wfw:commentRss>http://okashini.com/numeros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

