<div class="gmail_quote">On Mon, Jan 23, 2012 at 10:51 AM, Shreesh bhat <span dir="ltr">&lt;<a href="mailto:shreeshbhat90@gmail.com">shreeshbhat90@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I have given the definition of lucky numbers and constraints involved at the starting of the thread.</div><div>when a number&#39;s sum of digits and square of sum of digits is prime,it is called lucky.</div></blockquote>
<div><br>Just to clarify: do you mean &quot;(sum of digits) + (sum of digits)^2&quot;?<br>If so, the ONLY lucky numbers are those whose digits add up to 1... because &quot;x + x^2&quot; is always even (for real integers), and 2 is the only even prime number.<br>
So, if I understood your definition, here are the lucky numbers up to 10^18:<br>1<br>10<br>100<br>1000<br>...<br>10000000000000000<br>
100000000000000000<br>
1000000000000000000<br>
<br>It seems to me that the problem can&#39;t possibly be that simple, so I must have misunderstood your definition.  Please explain!<br><br></div></div><br>