Main Menu

Tip jar

If you like CaB and wish to support it, you can use PayPal or KoFi. Thank you, and I hope you continue to enjoy the site - Neil.

Buy Me a Coffee at ko-fi.com

Support CaB

Recent

Welcome to Cook'd and Bomb'd. Please login or sign up.

April 27, 2024, 03:58:57 PM

Login with username, password and session length

Friday challenge

Started by The Masked Unit, July 06, 2012, 10:06:04 AM

Previous topic - Next topic

The Masked Unit

For some reason I've wanted to know the answer to this for a long time but don't have the mental capacity to work it out. I'm sure it's an easy one for some of you clever fuckers though.

If I had an Excel spreadsheet open (not really an essential part, but helps me visual it), and in row one cell one I put the number 2, then in the next row, 4, then 16, then 256, then 65536 and so on, each time putting in the sum of the previous row multiplied by itself, how many rows down would I need to go before I reached a string of digits that if printed out, would reach the moon, assuming a standard font size.

Please show your working.

Pie Pie Eater

Your sequence as I understand it is 2^(2^n). So in the 6th cell it would already be

18446744073709551616

which is of the order of 10^19.

It is 1.51338583 × 10^10 inches to the moon, so even with size 12 font (1/6 inch), the number in the sixth cell would reach about 6 x 10^18 inches, easily reaching the moon.

The number in cell 5 (4294967296) is not enough to make it.

Neville Chamberlain

First of all, you'd need an Excel sheet the size of Belgium, which equates to more than 456 double-decker buses placed on top of each other, each containing a blue whale and Robert Wadlow. Anyway, you can't have more than 65,536 rows in Excel, which would, according to my calculations, only take you as far as Mozambique.

Pie Pie Eater

Although I'm not entirely sure what you mean by this:
Quote from: The Masked Unit on July 06, 2012, 10:06:04 AM
each time putting in the sum of the previous row multiplied by itself

Edit: Sorry, ignore my post. Nev's right.

Pie Pie Eater

Ohhhh, I completely misunderstood something.

What you actually want is an n such that log(2^(2^n)) > 9 x 10^10

So actually it would be cell 39, which has over 10^11 digits.

cell 38 has about 8.3 x 10^10 digits, and so would just fall short of the moon.

The Masked Unit

I looked up the correct term, which is squaring (yes, I didn't even know that), so assuming row one has a 2 in it, row 3 would be the result of 4 squared, row 4 would be the result of 16 squared etc. Theoretical limitations of space in Excel aside, the number 65536, which would come at row 5, is about two thirds of an inch long from where I'm sitting.

I'm basically just wondering if it's one of those things where you assume it would be row 10,000 or something, whereas in actual fact because you're squaring very big numbers quite early in the process, it would actually only take 16 rows or something, and make you go "Crikey!"

Fake edit: are we on the same page now, Pie pie eater?

Pete23

I wonder how many ink cartidges (standard home printer - not laser or work printer) you'd need to print that number out?

The Roofdog

Pies is correct, except I would say the formula is 2^(2^(n-1)) as you start with a 2 not a 4, so you'd make it to the moon in row 7, not row 6.

You want something like 10^11 digits and by row 7 your value is already O(10^38).


EDIT: 2 nu, Pies was correct the first time I think

Pie Pie Eater

Yep. cell 38 (or in fact 39 because we're starting from 1) would miss by about 20,000 miles or so. Cell 40 in your scheme would make it.

The Roofdog

No, I think you were correct the first time! I got the value of the 7th row wrong though:

2^(2^(7-1)) = 1.84 * 10^19

More than enough.

http://www.wolframalpha.com/input/?i=2%5E%282%5E%287-1%29%29+

Pie Pie Eater

Quote from: The Roofdog on July 06, 2012, 10:49:36 AM
EDIT: 2 nu, Pies was correct the first time I think

10^11 digits only happens when n=39 -  I think you are making the same mistake I first did (i.e. not printing the number out)

Neville Chamberlain

Quote from: Pete23 on July 06, 2012, 10:48:18 AM
I wonder how many ink cartidges (standard home printer - not laser or work printer) you'd need to print that number out?

Interesting question. I've just worked it out and you'd need to buy 4,237 cartridges, which - astonishingly! - is enough to stretch from Trafalgar Square to Banbury.


The Roofdog

Quote from: Pie Pie Eater on July 06, 2012, 10:55:34 AM
10^11 digits only happens when n=39 -  I think you are making the same mistake I first did (i.e. not printing the number out)


INDEED I AM.

One step ahead of me again.

Angst in my Pants

Quote from: Neville Chamberlain on July 06, 2012, 10:20:24 AM
Anyway, you can't have more than 65,536 rows in Excel, which would, according to my calculations, only take you as far as Mozambique.
If you upgrade to Excel 2007 you're allowed 1,048,576 rows (and 16,384 columns). Oh yes.

Lt. Organphalia

If you switch to a truly obese font in 2^20pt size, you'll get there sooner.