Avogadro's law

<p>Maize&Blue22:
Um, not really. 10^24 is just 1 followed by 24 zeroes, for a total of 25 digits; and</p>

<p>10^23 < Avogadro’s number < 10^24 .</p>

<p>We are talking about printing integers with at most 25 digits; you can comfortably fit several of those on a single page.</p>

<p>I’ve seen funny threads, but this one beats em all. :smiley: :D</p>

<p>I don’t want to put it on paper, I don’t have even close to enough paper. How many Gigs do you think it would take up?</p>

<p>

</p>

<p>Yes, but he has to put every number from 1 to that number, which would have as many digits as I said. Eg 1,2,3,4,5…6x10^23</p>

<p>lmao…poor kinglin. physics is soooo much more interesting than that, it’s not even THAT hard. come on, try physics…try harder…save your time posting on here and read your physics book. PLEASE!!!</p>

<p>It would be cool if you could do that though.</p>

<p>I’ll tell you a related story (I read this in George Gamow’s “One, Two, Three… Infinity” -</p>

<p>Once a magician/trickster came to an Indian king’s palace and performed a lot of tricks which left everyone dumbfounded. The king, impressed by this trickster, said that he’d reward him with as much money as he wanted (kings were dumb in those days).</p>

<p>So the trickster said - “I don’t want a lot of money. Just a few grains of rice are enough for me.”
King - “How much?”
Trickster - “Just put one grain of rice on the first block of a chessboard, two on the next, four on the third and so on, doubling the grains until all the 64 blocks of the chessboard are filled. I’ll take the grains on the chessboard.”</p>

<p>It is said that the king first laughed and ordered a plate of rice, then a sackful, and eventually all of the rice in the kingdom. But he couldn’t reach the end (or even 2/3rd way thru).</p>

<p>The number is 2^64…</p>

<p>Another thing you can try - Take a piece of paper as large and thin as you wish. Try to fold it in halves, 10 times over. :p</p>

<p>that rice thing is neat!</p>

<p>

</p>

<p>not quite right…? it would be 2^63 on the last square… i’m not sure where you get the 2^64, especially when the first square starts off with 1?</p>

<p>I’m processing 10,000 numbers a second, and I still won’t get done in my life time :p</p>

<p>kinglin what is this for? just for fun? lol</p>

<p>I admire your oomph Kinglin. I hope you make it =]</p>

<p>…even though its impossible =P</p>

<p>cujoe - both of us are incorrect :o</p>

<p>2^63 is the number of grains on the last square… we’ve not yet added the other squares…</p>

<p>Re: #rice grains</p>

<p>For what it’s worth, you need the sum of a geometric series here: 2^0 + 2^1 + 2^2 + … + 2^63 = (2^64) - 1 .</p>

<p>i think i did say 2^63 was on the last square?</p>

<p>I would just write a program for him and put the .exe file on a disk for him. Here’s a C++ program to do it for you:</p>

<h1>include<iostream></iostream></h1>

<h1>include<cmath></cmath></h1>

<p>using namespace std;</p>

<p>int main()
{
int i;</p>

<pre><code>for(i = 1; i <= (6.02 * pow(10, 23)); i++)
cout << i << endl;

return 0;
</code></pre>

<p>}</p>

<p>Compile and build, and give it to him, just tell him he has to run the program to get the digits :slight_smile: .</p>

<p>I’m already running a similar program in dos, which does 10,000 numbers/sec. But it will still take forever.</p>

<p>I tried to write a program in Java for it (the only language compiler i have at home) and the largest number a long can take is in the millions or billions, nowhere NEAR enough as needed and when i tried to print every number from 1 to that number, the workspace crashed before it even got done with that…</p>

<p>use a string file to store the longs*</p>