Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

numerical challenge, part 2

121 views
Skip to first unread message

RichD

unread,
Oct 30, 2012, 10:22:09 PM10/30/12
to
I saw this posed as an interview question:

What is the sum of the digits of 3 ^ 1000?



--
Rich

William Elliot

unread,
Oct 30, 2012, 10:50:19 PM10/30/12
to
On Tue, 30 Oct 2012, RichD wrote:

> What is the sum of the digits of 3 ^ 1000?

The sum of the base 3 digits of 3^1000 is 1.
The sum of the base 9 digits of 3^1000 is 1.

Eric Sosman

unread,
Oct 30, 2012, 10:55:44 PM10/30/12
to
On 10/30/2012 10:22 PM, RichD wrote:
> I saw this posed as an interview question:
>
> What is the sum of the digits of 3 ^ 1000?

My computer says 2142.

(Maybe they meant to ask a different question?)

--
Eric Sosman
eso...@comcast-dot-net.invalid

Wally W.

unread,
Oct 30, 2012, 11:38:06 PM10/30/12
to
On Tue, 30 Oct 2012 19:22:09 -0700 (PDT), RichD wrote:

>I saw this posed as an interview question:
>
>What is the sum of the digits of 3 ^ 1000?

I'll say 45, summing each occurrence of a unique digit; not the sum of
all occurrences of every digit.

My spreadsheet loses precision after 3^25 = 847288609443.

The sum of the unique digits there is 8+4+7+2+6+0+9+3 = 39

I assume each decimal digit occurs at least once in the long string of
digits for 3^1000.

1+2+3+4+5+6+7+8+9 = 45

Maybe these questioners should team up with the Physics Olympiad
folks. Then they can drive each other crazy with their mind reading
games.

Christian Gollwitzer

unread,
Oct 31, 2012, 4:32:00 AM10/31/12
to
Am 31.10.12 03:22, schrieb RichD:
> I saw this posed as an interview question:
>
> What is the sum of the digits of 3 ^ 1000?

I think this question is ill-posed. Using a modern computer, you can do
this in milliseconds; just use bc on a Unix box or even wolfram alpha:

http://www.wolframalpha.com/input/?i=sum+of+digits+of+3^1000

Lacking access to a computer, I'm afraid there is no answer besides
doing the power with pen&paper.

But slightly different questions *can* actually be answered easily. For
example

===================================
1) what is the *repeated* sum of digits of 3^1000, i.e. sum the digits
to base ten until you have a single digit?

Answer: 3^1000 = 9^500, i.e. the sum of digits must be divisible by 9,
and therefore the repeated sum is 9


2) What is the last digit of 3^1000?

Answer: multiplying can be done mod 10

3^0 = 1 (mod 10)
3^1 = 3 (mod 10)
3^2 = 9 (mod 10)
3^4 = 7 (mod 10)
3^5 = 1 (mod 10)

We have a cycle of length four, 1,3,9,7. 1000=0(mod4), therefore the
last digit is 1.

3) What is the sum of digits of 3^1000 to base 3?

3^1000 = digit one+1000x digit 0 (base 3)
therefore the sum is 1
=======================================

Maybe there exists a shortcut for the original queston, too, but I don't
think so - however, I'm not so strong in number theory to be really sure.

PS: Here is another one:

4) Estimate the sum of digits of 3^1000

Answer: 3^1000 = 10 ^ (log(3)*1000)

log 3 ~0.477, therefore 3^1000 has ~477 digits. The mean value is nery
near to 4.5 (=(1+2+3+4+5+6+7+8+9+0)/10), this means

sum of digits of 3^1000 ~ 4.5*477 = 2146.5

which is astonishingly near to the true answer 2142.

Christian

Dave W

unread,
Oct 31, 2012, 7:24:16 AM10/31/12
to
4 if you ignore the ^ symbol.
--
Dave W

Wally W.

unread,
Oct 31, 2012, 9:10:56 AM10/31/12
to
Clever.

And it seems most plausible, given the probable time constraints and
tools available.

But is that the answer they would want from a product they intend to
deliver to customers?

Frnak McKenney

unread,
Oct 31, 2012, 8:34:51 AM10/31/12
to
On Tue, 30 Oct 2012 19:22:09 -0700 (PDT), RichD <r_dela...@yahoo.com> wrote:
> I saw this posed as an interview question:
>
> What is the sum of the digits of 3 ^ 1000?

Um... let's see...

perl -e 'print 1000^3;print "\n";'

1003

So the sum is clearly 4.


Frank
--
In America there flourished a ritual or game which popularized the
effort to make "proper" speech available to all. This was the
spelling bee; and the word "bee" in this sense was appropriately an
Americanism. In this public ceremony contestants and audience bore
witness that there was no secret about how to speak or write the
most "correct" language of the community and hence that the
linguistic upper class was open to all.
-- Daniel J. Boorstin / The Americans: The Colonial Experience
--
Frank McKenney, McKenney Associates
Richmond, Virginia / (804) 320-4887
Munged E-mail: frank uscore mckenney aatt mindspring ddoott com

Eric Jacobsen

unread,
Oct 31, 2012, 11:09:50 AM10/31/12
to
On Tue, 30 Oct 2012 19:50:19 -0700, William Elliot <ma...@panix.com>
wrote:
That's clever. If I were interviewing, asked this question, and got
this answer I'd be favorably impressed.


Eric Jacobsen
Anchor Hill Communications
http://www.anchorhill.com

Phil Carmody

unread,
Oct 31, 2012, 12:27:27 PM10/31/12
to
eric.j...@ieee.org (Eric Jacobsen) writes:
> On Tue, 30 Oct 2012 19:50:19 -0700, William Elliot <ma...@panix.com>
> wrote:
>
> >On Tue, 30 Oct 2012, RichD wrote:
> >
> >> What is the sum of the digits of 3 ^ 1000?
> >
> >The sum of the base 3 digits of 3^1000 is 1.

True.

> >The sum of the base 9 digits of 3^1000 is 1.
>
> That's clever. If I were interviewing, asked this question, and got
> this answer I'd be favorably impressed.

Nope, it's 3.

3^1=3
3^2=10
3^3=30
3^4=100
3^5=3000
3^6=10000
3^7=30000
3^8=100000
3^10=300000
...

Phil
--
Regarding TSA regulations:
How are four small bottles of liquid different from one large bottle?
Because four bottles can hold the components of a binary liquid explosive,
whereas one big bottle can't. -- camperdave responding to MacAndrew on /.

Christian Gollwitzer

unread,
Oct 31, 2012, 1:19:20 PM10/31/12
to
Am 31.10.12 17:27, schrieb Phil Carmody:
> eric.j...@ieee.org (Eric Jacobsen) writes:
>> On Tue, 30 Oct 2012 19:50:19 -0700, William Elliot <ma...@panix.com>
>>> The sum of the base 3 digits of 3^1000 is 1.
>
> True.
>>> The sum of the base 9 digits of 3^1000 is 1.

> Nope, it's 3.
>
> 3^1=3
> 3^2=10
> 3^3=30
> 3^4=100
> 3^5=3000
> 3^6=10000
> 3^7=30000
> 3^8=100000
> 3^10=300000

The last line is wrong, otherwise I agree. Another proof:

3^1000=9^500= 10000.... (9) [500 times 0]

therefore the sum of digits to base 9 is 1.

Christian

Richard Tobin

unread,
Oct 31, 2012, 1:16:59 PM10/31/12
to
In article <877gq6y...@bazspaz.fatphil.org>,
Phil Carmody <thefatphi...@yahoo.co.uk> wrote:

>> >The sum of the base 3 digits of 3^1000 is 1.

>True.

If we accept the premise on which your correction to the second answer
is based, then 3^1000 above is meaningless.

-- Richard

Phil Carmody

unread,
Oct 31, 2012, 1:56:08 PM10/31/12
to
Christian Gollwitzer <auri...@gmx.de> writes:
> Am 31.10.12 17:27, schrieb Phil Carmody:
> > eric.j...@ieee.org (Eric Jacobsen) writes:
> >> On Tue, 30 Oct 2012 19:50:19 -0700, William Elliot <ma...@panix.com>
> >>> The sum of the base 3 digits of 3^1000 is 1.
> >
> > True.

RT's correction duly noted.

> >>> The sum of the base 9 digits of 3^1000 is 1.
>
> > Nope, it's 3.
> >
> > 3^1=3
> > 3^2=10
> > 3^3=30
> > 3^4=100
> > 3^5=3000
> > 3^6=10000
> > 3^7=30000
> > 3^8=100000
> > 3^10=300000
>
> The last line is wrong, otherwise I agree. Another proof:
>
> 3^1000=9^500= 10000.... (9) [500 times 0]

What's that character after the first equals sign?

The base 9 digits of 3^1000 are precisely those of the base 9 digits of 3*10^444

Piergiorgio Sartor

unread,
Oct 31, 2012, 2:49:13 PM10/31/12
to
On 2012-10-31 03:22, RichD wrote:
> I saw this posed as an interview question:
>
> What is the sum of the digits of 3 ^ 1000?

Another possible answer.

Given the following:

3^1 = 3
3^2 = 9
3^3 = 27 --> 2+7 = 9
3^4 = 81 --> 8+1 = 9
3^5 = 243 --> 2 + 4 + 3 = 9
3^6 = 729 --> 7 + 2 + 9 = 18 --> 1 + 8 = 9
...

I would say the sum of the digits of 3 ^ 1000 is 9 :-)

That is, otherwise, 3 ^ 1000 = (3 ^ 2) * (3 ^ 998),
which is 9 * 3 ^ 998, which can be 9 * K.
For any integer K, the complete sum of the digits
is always 9.

bye,

--

piergiorgio

christian.bau

unread,
Oct 31, 2012, 7:36:16 PM10/31/12
to
On Oct 31, 2:22 am, RichD <r_delaney2...@yahoo.com> wrote:
> I saw this posed as an interview question:
>
> What is the sum of the digits of 3 ^ 1000?

If you have a computer with a programming environment available, you
should have the answer in a few minutes.
Now another interview question: How long would it take you to find the
answer, using pen and (lots of) paper only?
Another interview question: Give an estimate for the sum of these
digits, without using any tools.

christian.bau

unread,
Oct 31, 2012, 7:39:52 PM10/31/12
to
On Oct 31, 8:32 am, Christian Gollwitzer <aurio...@gmx.de> wrote:
> 4) Estimate the sum of digits of 3^1000
>
>         sum of digits of 3^1000 ~ 4.5*477 = 2146.5
>
> which is astonishingly near to the true answer 2142.

The last digit is 1 (Powers of 3 end in 3, 9, 7, 1, 3, 9, 7, 1 etc.);
taking that into account would have made it 2143.

JRStern

unread,
Oct 31, 2012, 7:48:53 PM10/31/12
to
No tools, no pencil and paper, no Excel?

Well, it's apparently divisible by 3!


J.

Michael Soyka

unread,
Oct 31, 2012, 10:44:13 PM10/31/12
to
On 10/30/2012 10:22 PM, RichD wrote:
I'm pretty sure the answer is 9.

To see this, let's rephrase the problem:
What is the sum of the digits of 9 ^ 500?

9^2 = 81 = 8x10+1 => sum is 9
9^3 = 9*(8*10+1) = 72*10+9 = 7*100+2*10+9 => sum is 9

Now, it is easy to verify that 9 times any single digit 1-9 yields a
number whose digits will sum to 9.

Continuing:

9^4 = 9*(7*100+2*10+9) = 63*100+18*10+81.

Each term is a number whose digits sum to 9:
63: 6+3=9
18: 1+8=9
81: 8+1=9
and so the sum of the digits of 9^4 is 9 as well (recall that 9 times
any single digit yields a number whose digits sum to 9).

I believe I can safely wave my hands at this point and say the pattern
of reasoning is clear and the conclusion is unarguable. :)
Nonetheless, a mathematically rigorous proof escapes me at the moment
but perhaps in time ...

Michael Soyka

unread,
Oct 31, 2012, 11:13:14 PM10/31/12
to
The proof is embarrassingly simple: 9 times any integer yields a number
whose digits sum to 9 (in days long past, I think this was known as the
"rule of 9s").

1. 9 times 1 = 9
2. suppose 9 times some integer N yields such a number.
Then 9 times (N+1) equals 9*N + 9.
Since the digits in 9*N sum to 9 by assumption, so will 9*N+9.

Therefore, since this true for N=1, it's true for N=2, 3, ...

Christian Gollwitzer

unread,
Nov 1, 2012, 2:11:05 AM11/1/12
to
Am 31.10.12 18:56, schrieb Phil Carmody:
> Christian Gollwitzer <auri...@gmx.de> writes:
>> 3^1000=9^500= 10000.... (9) [500 times 0]
>
> What's that character after the first equals sign?
>

Ah, I see, you are reading

3(9)^1000(9)

Another hint that it's most necessary to clearly state the problem in
order to get the wanted solution:)

Christian

William Elliot

unread,
Nov 1, 2012, 3:07:49 AM11/1/12
to
On Wed, 31 Oct 2012, Michael Soyka wrote:

> The proof is embarrassingly simple: 9 times any integer yields a number
> whose digits sum to 9 (in days long past, I think this was known as the
> "rule of 9s").

False. 9*11 = 99 and the sume of the digits of 99 is 9 + 9 = 18.

unruh

unread,
Nov 1, 2012, 3:51:10 AM11/1/12
to
On 2012-11-01, William Elliot <ma...@panix.com> wrote:
> On Wed, 31 Oct 2012, Michael Soyka wrote:
>
>> The proof is embarrassingly simple: 9 times any integer yields a number
>> whose digits sum to 9 (in days long past, I think this was known as the
>> "rule of 9s").
>
> False. 9*11 = 99 and the sume of the digits of 99 is 9 + 9 = 18.

and 8+1 =9
He should have said, "whose digits sum to a multiple of 9" So you can
keep reapplying the rule until you get a single digit and the only
possibility is 9.


>
>> 1. 9 times 1 = 9
>> 2. suppose 9 times some integer N yields such a number.
>> Then 9 times (N+1) equals 9*N + 9.
>> Since the digits in 9*N sum to 9 by assumption, so will 9*N+9.

replacing "sum to 9" by "sum to a multiple of 9" it still does not work.
In fact the theorem is true only in base 10. Try it in base 9. Then any
multiple of 9 has a 0 in the units place. But the rest of the digits can
sum to anything they want.
Ie, the sum of the digits of a multiple of 9 in base 9 do not sum to a
multiple of 9. consider 10 base 9. that is a multiple of 9 but the
digits sum to 1 which is not a multiple of 9.

William Elliot

unread,
Nov 1, 2012, 4:47:18 AM11/1/12
to
On Thu, 1 Nov 2012, unruh wrote:
> On 2012-11-01, William Elliot <ma...@panix.com> wrote:
> > On Wed, 31 Oct 2012, Michael Soyka wrote:
> >
> >> The proof is embarrassingly simple: 9 times any integer yields a number
> >> whose digits sum to 9 (in days long past, I think this was known as the
> >> "rule of 9s").
> >
> > False. 9*11 = 99 and the sume of the digits of 99 is 9 + 9 = 18.
>
> and 8+1 =9


> He should have said, "whose digits sum to a multiple of 9" So you can
> keep reapplying the rule until you get a single digit and the only
> possibility is 9.
>

He should learn about casting out 9's and the math behind it.

Let n = sum(j=0,k) dj 10^j be an integer in decimal form.
Then sum(j=0,k) dj = n (mod 9)

In particular if 9 | n, then sum(j=0,k) dj = 0 (mod 9).

> >> 1. 9 times 1 = 9
> >> 2. suppose 9 times some integer N yields such a number.
> >> Then 9 times (N+1) equals 9*N + 9.
> >> Since the digits in 9*N sum to 9 by assumption, so will 9*N+9.
>
> replacing "sum to 9" by "sum to a multiple of 9" it still does not work.
> In fact the theorem is true only in base 10. Try it in base 9. Then any
> multiple of 9 has a 0 in the units place. But the rest of the digits can
> sum to anything they want.

> Ie, the sum of the digits of a multiple of 9 in base 9 do not sum to a
> multiple of 9. consider 10 base 9. that is a multiple of 9 but the
> digits sum to 1 which is not a multiple of 9.
>
The sum of the digits of a muoltiple of 8
in base 9, sums to a multiple of 8.

In base n + 1, casting out n's is based upon
sum(j=0,k) dj (n+1)^j = sum(j=0,k) dj (mod n)

Phil Carmody

unread,
Nov 1, 2012, 6:40:17 PM11/1/12
to
Bingo! As it was x-p'ed to rec.puzzles, interpretations apart from
the superficially obvious ones are to be encouraged.

Ben Bacarisse

unread,
Nov 2, 2012, 9:22:09 AM11/2/12
to
I know this is now an old post but a recent reply made me look again...

Phil Carmody <thefatphi...@yahoo.co.uk> writes:
> eric.j...@ieee.org (Eric Jacobsen) writes:
>> On Tue, 30 Oct 2012 19:50:19 -0700, William Elliot <ma...@panix.com>
>> wrote:
>>
>> >On Tue, 30 Oct 2012, RichD wrote:
>> >
>> >> What is the sum of the digits of 3 ^ 1000?
>> >
>> >The sum of the base 3 digits of 3^1000 is 1.
>
> True.
>
>> >The sum of the base 9 digits of 3^1000 is 1.
>>
>> That's clever. If I were interviewing, asked this question, and got
>> this answer I'd be favorably impressed.
>
> Nope, it's 3.
>
> 3^1=3
> 3^2=10
> 3^3=30
> 3^4=100
> 3^5=3000
> 3^6=10000
> 3^7=30000
> 3^8=100000
> 3^10=300000

It looks like you've added a 0 from 3^5 upwards.

--
Ben.

Paul Rubin

unread,
Nov 2, 2012, 1:16:12 PM11/2/12
to
RichD <r_dela...@yahoo.com> writes:
> I saw this posed as an interview question:
> What is the sum of the digits of 3 ^ 1000?

I don't think there is a pencil-and-paper answer to this. I notice also
that it's a slight variation of Euler problem 16:

http://projecteuler.net/problem=16

The Euler problems are intended to be solved with a computer. For
example, a Python solution to the 3^1000 problem might look like:

>>> print sum(map(int, str(3**1000)))
2142

That converts 3**1000 to a digit string (list of characters), then for
each digit in the list, converts the digit to an integer, then adds up
the integers. The problem is more challenging in languages like C
that don't have built-in arbitrary-precision integers.

Michael Stemper

unread,
Nov 2, 2012, 5:28:30 PM11/2/12
to
In article <ORpks.4786$%z6....@newsfe04.iad>, unruh <un...@invalid.ca> writes:
>> On Wed, 31 Oct 2012, Michael Soyka wrote:

>>> The proof is embarrassingly simple: 9 times any integer yields a number
>>> whose digits sum to 9 (in days long past, I think this was known as the
>>> "rule of 9s").

>>> 1. 9 times 1 = 9
>>> 2. suppose 9 times some integer N yields such a number.
>>> Then 9 times (N+1) equals 9*N + 9.
>>> Since the digits in 9*N sum to 9 by assumption, so will 9*N+9.
>
>replacing "sum to 9" by "sum to a multiple of 9" it still does not work.
>In fact the theorem is true only in base 10. Try it in base 9.

However, "sum to a multiple of (n-1)" always works in base "n" (assuming
that "n" is a natural greater than one).

>Ie, the sum of the digits of a multiple of 9 in base 9 do not sum to a
>multiple of 9.

No, but the sum of the digits of a multiple of 8 in base 9 will always
sum to a multiple of 8.

--
Michael F. Stemper
#include <Standard_Disclaimer>
Life's too important to take seriously.

Phil Carmody

unread,
Nov 2, 2012, 6:13:02 PM11/2/12
to
Good catch. I was getting a bit bored by that stage, as you can imagine.

glen herrmannsfeldt

unread,
Nov 2, 2012, 6:33:34 PM11/2/12
to
In comp.dsp Paul Rubin <no.e...@nospam.invalid> wrote:
> RichD <r_dela...@yahoo.com> writes:
>> I saw this posed as an interview question:
>> What is the sum of the digits of 3 ^ 1000?

> I don't think there is a pencil-and-paper answer to this. I notice also
> that it's a slight variation of Euler problem 16:

If you can compute log10(3) to three or so digits, then
you can do it. I didn't try very hard, and only got
two digits, but it shouldn't be hard to get three.

You can do higher powers if you can get more digits.
Not so hard to do on a calculator.

-- glen

RichD

unread,
Nov 4, 2012, 8:08:53 PM11/4/12
to
On Oct 31, eric.jacob...@ieee.org (Eric Jacobsen) wrote:
>
> >> What is the sum of the digits of 3 ^ 1000?
>
> >The sum of the base 3 digits of 3^1000 is 1.
> >The sum of the base 9 digits of 3^1000 is 1.
>
> That's clever.

No, it isn't. It's dumbass smartass, trying to bamboozle
the interviewer, when you can't answer the question.

> If I were interviewing, asked this question, and got
> this answer I'd be favorably impressed.

Remind me never to hire you as a recruiter.

--
Rich

RichD

unread,
Nov 4, 2012, 8:14:06 PM11/4/12
to
On Oct 31, Christian Gollwitzer <aurio...@gmx.de> wrote:
>
> > I saw this posed as an interview question:
>
> > What is the sum of the digits of 3 ^ 1000?
>
> I think this question is ill-posed. Using a modern computer, you can do
> this in milliseconds; just use bc on a Unix box or even wolfram alpha:
>
>        http://www.wolframalpha.com/input/?i=sum+of+digits+of+3^1000
>
> Lacking access to a computer, I'm afraid there is no answer besides
> doing the power with pen&paper.

I'm afraid you're wrong.

But thanks for playing our game.

--
Rich

RichD

unread,
Nov 4, 2012, 8:18:32 PM11/4/12
to
On Oct 31, Michael Soyka <mssr...@gmail.com> wrote:
> > I saw this posed as an interview question:
> > What is the sum of the digits of 3 ^ 1000?
>
> I'm pretty sure the answer is 9.

I'm pretty sure you'r wrong.

> To see this, let's rephrase the problem:
> What is the sum of the digits of 9 ^ 500?
>
> 9^2 = 81 = 8x10+1 => sum is 9
> 9^3 = 9*(8*10+1) = 72*10+9 = 7*100+2*10+9 => sum is 9

Who said it's modulo 10?

Thank you for applying, and we'll keep your resume
on file for future consideration.

--
Rich


rickman

unread,
Nov 4, 2012, 8:25:17 PM11/4/12
to
On 11/4/2012 8:08 PM, RichD wrote:
> On Oct 31, eric.jacob...@ieee.org (Eric Jacobsen) wrote:
>>
>>>> What is the sum of the digits of 3 ^ 1000?
>>
>>> The sum of the base 3 digits of 3^1000 is 1.
>>> The sum of the base 9 digits of 3^1000 is 1.
>>
>> That's clever.
>
> No, it isn't. It's dumbass smartass, trying to bamboozle
> the interviewer, when you can't answer the question.

But the question isn't one that directly relates to the job at hand.
Its purpose is to see how good the interviewee is in dealing with new
problems they likely haven't seen before. It is also an opportunity to
look into their problem solving methods. I think observation of any
relevant properties of the problem is a good start.

Rick

Christian Gollwitzer

unread,
Nov 5, 2012, 2:53:28 PM11/5/12
to
Am 05.11.12 02:14, schrieb RichD:
Dare to share your extensive knowledge with us? And please state which
interpretation of the original question you follow to be able to
classify your solution as right.

I have given 4 different interpretations along with a solution (which
you generously snipped), so please tell us your interpretation and why
it is better than the other ones.

Christian

Willem

unread,
Nov 5, 2012, 3:28:56 PM11/5/12
to
christian.bau wrote:
) On Oct 31, 8:32?am, Christian Gollwitzer <aurio...@gmx.de> wrote:
)> 4) Estimate the sum of digits of 3^1000
)>
)> ? ? ? ? sum of digits of 3^1000 ~ 4.5*477 = 2146.5
)>
)> which is astonishingly near to the true answer 2142.
)
) The last digit is 1 (Powers of 3 end in 3, 9, 7, 1, 3, 9, 7, 1 etc.);
) taking that into account would have made it 2143.

Taking into account that it has to be a multiple of 9,
you can round that to 2142. But that's not proof that it is 2142.
Printing the first 30 digit sums doesn't show any pattern either.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT

glen herrmannsfeldt

unread,
Nov 5, 2012, 3:58:42 PM11/5/12
to
In comp.dsp Willem <wil...@turtle.stack.nl> wrote:
> christian.bau wrote:
> ) On Oct 31, 8:32?am, Christian Gollwitzer <aurio...@gmx.de> wrote:
> )> 4) Estimate the sum of digits of 3^1000

> )> ? ? ? ? sum of digits of 3^1000 ~ 4.5*477 = 2146.5

> )> which is astonishingly near to the true answer 2142.

> ) The last digit is 1 (Powers of 3 end in 3, 9, 7, 1, 3, 9, 7, 1 etc.);
> ) taking that into account would have made it 2143.

> Taking into account that it has to be a multiple of 9,
> you can round that to 2142. But that's not proof that it is 2142.
> Printing the first 30 digit sums doesn't show any pattern either.

Not a mathematical proof, but you can use statistical arguments
to show how likely it is to be correct.

If you can assume that the digits are uncorrelated, then the
standard deviation of the sum is about 4.5/sqrt(477),
for about 0.2 That makes it extrememly unlikely to be
off by more than one.

The lowest and highest digits aren't so uncorrelated, though.

It would take more math than I know to show the digit correlation
is low enough, though.

-- glen

Randy Yates

unread,
Nov 5, 2012, 7:08:14 PM11/5/12
to
Given the number of intelligent people (glen, I mean people like you)
who have viewed this problem and the dearth of solutions, I'd say this
is a crappy interview question. Something like, "Solve Fermat's Last
Theorem."
--
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com

Andrew B

unread,
Nov 6, 2012, 2:48:27 PM11/6/12
to
On 05/11/2012 20:58, glen herrmannsfeldt wrote:
> In comp.dsp Willem <wil...@turtle.stack.nl> wrote:
>> christian.bau wrote:
>> ) On Oct 31, 8:32?am, Christian Gollwitzer <aurio...@gmx.de> wrote:
>> )> 4) Estimate the sum of digits of 3^1000
>
>> )> ? ? ? ? sum of digits of 3^1000 ~ 4.5*477 = 2146.5
>
>> )> which is astonishingly near to the true answer 2142.
>
>> ) The last digit is 1 (Powers of 3 end in 3, 9, 7, 1, 3, 9, 7, 1 etc.);
>> ) taking that into account would have made it 2143.
>
>> Taking into account that it has to be a multiple of 9,
>> you can round that to 2142. But that's not proof that it is 2142.
>> Printing the first 30 digit sums doesn't show any pattern either.
>
> Not a mathematical proof, but you can use statistical arguments
> to show how likely it is to be correct.
>
> If you can assume that the digits are uncorrelated, then the
> standard deviation of the sum is about 4.5/sqrt(477),
> for about 0.2 That makes it extrememly unlikely to be
> off by more than one.

The standard deviation of the sum of 477 uncorrelated digits is sqrt
(477*8.25), which is about 64, so this argument doesn't work.

RichD

unread,
Nov 7, 2012, 12:42:36 AM11/7/12
to
On Nov 5, Willem <wil...@turtle.stack.nl> wrote:
>> 4) Estimate the sum of digits of 3^1000

3 ^ 100

> Taking into account that it has to be a multiple of 9,

Finally, someone is on the right track.

--
Rich

Wally W.

unread,
Nov 7, 2012, 12:59:59 AM11/7/12
to
What do you mean, "Finally?"

This characteristic was noted a week ago:

From: Christian Gollwitzer <auri...@gmx.de>
Date: Wed, 31 Oct 2012 09:32:00 +0100
Message-ID: <k6qnm3$9vt$1...@dont-email.me>

Answer: 3^1000 = 9^500, i.e. the sum of digits must be divisible by 9,

Peter Webb

unread,
Nov 8, 2012, 6:37:27 AM11/8/12
to
Eric Sosman wrote:

> On 10/30/2012 10:22 PM, RichD wrote:
> > I saw this posed as an interview question:
> >
> > What is the sum of the digits of 3 ^ 1000?
>
> My computer says 2142.
>
> (Maybe they meant to ask a different question?)

3^1000 is about 10^477 which has 477 digits. If the average value of
each digit is 4.5 then the sum should be about 2146. I think your
computer knows what it is talking about.

Syd Rumpo

unread,
Nov 8, 2012, 9:33:33 AM11/8/12
to
On 31/10/2012 02:22, RichD wrote:
> I saw this posed as an interview question:
>
> What is the sum of the digits of 3 ^ 1000?
>
>
>
> --
> Rich

The answer is 3+1+0+0+0 = 4

There are no digits in ^ or ?

Cheers
--
Syd

Syd Rumpo

unread,
Nov 8, 2012, 9:35:17 AM11/8/12
to
Bugger, somebody already got it. Should have read all the replies first.

--
Syd

unruh

unread,
Nov 9, 2012, 11:06:38 AM11/9/12
to
Sure there are. The number was in base 96 and those are the symbols for
63 and 27 (base 10)


>
> Cheers

Piergiorgio Sartor

unread,
Nov 13, 2012, 3:40:33 PM11/13/12
to
On 2012-10-31 03:55, Eric Sosman wrote:
> On 10/30/2012 10:22 PM, RichD wrote:
>> I saw this posed as an interview question:
>>
>> What is the sum of the digits of 3 ^ 1000?
>
> My computer says 2142.
>
> (Maybe they meant to ask a different question?)
>

Interesting is that 3^ 1001 has 2124 as result...

bye,

--

piergiorgio
0 new messages