<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: 23 and 2000</title>
	<atom:link href="http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/feed/" rel="self" type="application/rss+xml" />
	<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/</link>
	<description>Strain your Brain</description>
	<lastBuildDate>Tue, 13 Sep 2011 13:21:47 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: misha</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-78</link>
		<dc:creator>misha</dc:creator>
		<pubDate>Sat, 18 Aug 2007 14:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-78</guid>
		<description>Thanks to Eyal Cohen, for giving me this cool riddle!</description>
		<content:encoded><![CDATA[<p>Thanks to Eyal Cohen, for giving me this cool riddle!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-77</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Fri, 17 Aug 2007 13:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-77</guid>
		<description>Hi Ronnie,

First, I want to appologize for your messages being cut.

The reason is that all the text of the comments is filtered before it is entered into the database (otherwise people would be able to post harmful javascript code and use XSS). Now, there is a bug in the filtering mechanism (its a wildly used mechanism - I haven&#039;t written it!). It is too severe, if you enter the &lt; sign all the text after it will be cut off.

You might be wondering how I was able to use the &lt; sign before (oops, I did it again!), well until I fix the bug you can use the ampersand sign followed by the letters &quot;lt&quot; and a semi-colon (4 symbols in all). FYI - lt stands for less than. And yeah - I know its ugly...

BTW - you can still use the &gt; sign regualrly (at least I hope! If this sentence makes sense than it worked :-P )</description>
		<content:encoded><![CDATA[<p>Hi Ronnie,</p>
<p>First, I want to appologize for your messages being cut.</p>
<p>The reason is that all the text of the comments is filtered before it is entered into the database (otherwise people would be able to post harmful javascript code and use XSS). Now, there is a bug in the filtering mechanism (its a wildly used mechanism &#8211; I haven&#8217;t written it!). It is too severe, if you enter the &lt; sign all the text after it will be cut off.</p>
<p>You might be wondering how I was able to use the &lt; sign before (oops, I did it again!), well until I fix the bug you can use the ampersand sign followed by the letters &#8220;lt&#8221; and a semi-colon (4 symbols in all). FYI &#8211; lt stands for less than. And yeah &#8211; I know its ugly&#8230;</p>
<p>BTW &#8211; you can still use the > sign regualrly (at least I hope! If this sentence makes sense than it worked <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronnie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-76</link>
		<dc:creator>Ronnie</dc:creator>
		<pubDate>Fri, 17 Aug 2007 11:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-76</guid>
		<description>(message was cut!)
... (i </description>
		<content:encoded><![CDATA[<p>(message was cut!)<br />
&#8230; (i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronnie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-75</link>
		<dc:creator>Ronnie</dc:creator>
		<pubDate>Fri, 17 Aug 2007 11:25:41 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-75</guid>
		<description>Hey Matan,

a) my lemma for p=5 generalizes for any number actually (although it&#039;s obvioulsy not tight, for example 2000).
I&#039;ll explain more thoroughly for p = 5. I look at the partial sums of n1..n5: s(i). 
if some s(i) equals 0 (mod 5) then simply put operators so the formula would look like this:
(n1+..n(i))*n(i+1)*..n5 = s(i)*... = 0 (mod 5).
if not, then there must be two sums s(i)=s(j) (mod 5) (i </description>
		<content:encoded><![CDATA[<p>Hey Matan,</p>
<p>a) my lemma for p=5 generalizes for any number actually (although it&#8217;s obvioulsy not tight, for example 2000).<br />
I&#8217;ll explain more thoroughly for p = 5. I look at the partial sums of n1..n5: s(i).<br />
if some s(i) equals 0 (mod 5) then simply put operators so the formula would look like this:<br />
(n1+..n(i))*n(i+1)*..n5 = s(i)*&#8230; = 0 (mod 5).<br />
if not, then there must be two sums s(i)=s(j) (mod 5) (i</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-74</link>
		<dc:creator>Matan</dc:creator>
		<pubDate>Fri, 17 Aug 2007 10:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-74</guid>
		<description>By the way, does Ronnie&#039;s lemma generalize to any prime? I did not understand the proof with the pigeonhole principle so I can&#039;t say so myself (I have &quot;proven&quot; it stupidly by just enumerating the entire tree, so generalizing my &quot;proof&quot; is hard. I can probably just think of this myself but I don&#039;t feel like it so I&#039;ll use the blog&#039;s computing power instead)

If it does, we get the even more general relation that for every

N = p1^a1 + p2^a2 + p3^a3 + ...  Where p1,p2,p3,... are primes,

K = p1*a1 + p2*a2 + ...

then (N,K) is a valid pair.</description>
		<content:encoded><![CDATA[<p>By the way, does Ronnie&#8217;s lemma generalize to any prime? I did not understand the proof with the pigeonhole principle so I can&#8217;t say so myself (I have &#8220;proven&#8221; it stupidly by just enumerating the entire tree, so generalizing my &#8220;proof&#8221; is hard. I can probably just think of this myself but I don&#8217;t feel like it so I&#8217;ll use the blog&#8217;s computing power instead)</p>
<p>If it does, we get the even more general relation that for every</p>
<p>N = p1^a1 + p2^a2 + p3^a3 + &#8230;  Where p1,p2,p3,&#8230; are primes,</p>
<p>K = p1*a1 + p2*a2 + &#8230;</p>
<p>then (N,K) is a valid pair.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-73</link>
		<dc:creator>Matan</dc:creator>
		<pubDate>Fri, 17 Aug 2007 10:14:53 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-73</guid>
		<description>Very cool riddle! I also felt like Dan and would never have tuched this riddle with a 10-foot pole if it wasn&#039;t for the &quot;easy&quot; icon.

Regardinig extra credit question no. 2, I&#039;ll start by stating the obvious rule that we get by generalizing this riddle:

for every N=5^a*2^b and K=5a+2b, (N,K) is a valid pair.</description>
		<content:encoded><![CDATA[<p>Very cool riddle! I also felt like Dan and would never have tuched this riddle with a 10-foot pole if it wasn&#8217;t for the &#8220;easy&#8221; icon.</p>
<p>Regardinig extra credit question no. 2, I&#8217;ll start by stating the obvious rule that we get by generalizing this riddle:</p>
<p>for every N=5^a*2^b and K=5a+2b, (N,K) is a valid pair.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yaniv</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-72</link>
		<dc:creator>yaniv</dc:creator>
		<pubDate>Wed, 15 Aug 2007 23:54:35 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-72</guid>
		<description>I finally had time to think about the first extra credit question, and its not that hard - 23 is indeed a tight bound.

Consider the case of 22 ones. 8-)</description>
		<content:encoded><![CDATA[<p>I finally had time to think about the first extra credit question, and its not that hard &#8211; 23 is indeed a tight bound.</p>
<p>Consider the case of 22 ones. <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-71</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Wed, 15 Aug 2007 00:27:21 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-71</guid>
		<description>I did the exact same same solution, and since it&#039;s Ronnie who replied, I can now rest assure my solution is correct :)
i have to say that at first i was very much afraid of this riddle, and wasn&#039;t really sure why it was posted as &quot;easy riddle&quot;, however it turned out to fun...</description>
		<content:encoded><![CDATA[<p>I did the exact same same solution, and since it&#8217;s Ronnie who replied, I can now rest assure my solution is correct <img src='http://leviathanonline.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
i have to say that at first i was very much afraid of this riddle, and wasn&#8217;t really sure why it was posted as &#8220;easy riddle&#8221;, however it turned out to fun&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ronnie</title>
		<link>http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/comment-page-1/#comment-69</link>
		<dc:creator>Ronnie</dc:creator>
		<pubDate>Mon, 13 Aug 2007 14:02:22 +0000</pubDate>
		<guid isPermaLink="false">http://yaniv.leviathanonline.com/blog/riddles/23-and-2000/#comment-69</guid>
		<description>lemma: for any 5 given integers there is an arrangement of operators (just like in the riddle) for which the formula equals 0 (mod 5)
proof: by looking at the partial sums and using pigeon-hole principle if none of them equal 0 (mod 5)

lemma 2: for any 2 given integers there is an arrangement of operatos for which the formula equals 0 (mod 2)
proof: obvious

proof of riddle: split the 23 numbers into (runs of) 3 5-tuples and 4 couples, and seclude which group with parenthesis. (3*5+2*4 = 23)
in each group of i numbers arrange the operatos between them so the formula they produce equals 0 (mod i)
add multiplicative operator * between each group.
we get (5k1)*(5k2)*(5k3)*(2n1)*...(2n4) = 2000*z.</description>
		<content:encoded><![CDATA[<p>lemma: for any 5 given integers there is an arrangement of operators (just like in the riddle) for which the formula equals 0 (mod 5)<br />
proof: by looking at the partial sums and using pigeon-hole principle if none of them equal 0 (mod 5)</p>
<p>lemma 2: for any 2 given integers there is an arrangement of operatos for which the formula equals 0 (mod 2)<br />
proof: obvious</p>
<p>proof of riddle: split the 23 numbers into (runs of) 3 5-tuples and 4 couples, and seclude which group with parenthesis. (3*5+2*4 = 23)<br />
in each group of i numbers arrange the operatos between them so the formula they produce equals 0 (mod i)<br />
add multiplicative operator * between each group.<br />
we get (5k1)*(5k2)*(5k3)*(2n1)*&#8230;(2n4) = 2000*z.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

