[Tutor] OverflowError in lucky numbers script
Dave Angel
d at davea.name
Tue Jan 24 05:03:00 CET 2012
On 01/23/2012 10:31 PM, Marc Tompkins wrote:
> On Mon, Jan 23, 2012 at 12:08 PM, Shreesh bhat<shreeshbhat90 at gmail.com>wrote:
>
>> No,i meant sum of digits is prime and also sum of square of digits is
>> prime.
>> E.g: 23 is lucky cos
>> 2+3=>5 (prime)
>> 2**2+3**2 => 4+9 => 13 (prime)
>>
> Thanks for the clarification - or I should say "correction", since "sum of
> square of digits" and "square of sum of digits" are NOT equivalent!
>
But Shreesh' original wording was:
A number is called lucky if the sum of its digits, as well as the sum of
the squares of its digits is a prime number. How many numbers between A and
B are lucky?
in a message 1/22/12 at 1:11, subject: "Re: [Tutor] Tutor Digest, Vol
95, Issue 55"
That thread soon got renamed to "OverflowError in lucky numbers script"
--
DaveA
More information about the Tutor
mailing list