TM AutoChart
Link chart axis values to worksheet cells
Julie's Market
Get 2-35% Ca$hBack While You Shop Online -- Great Deals!
Total Web Solution
Take control of your E-Commerce web site! See a FREE demo.
You are on the Home/Other Tutorials/Project Euler/Problem 16 page
Google
Web This Site
TM Directory
List files and folders in a disk folder with a degree of customization
TM Chart Utilities
Various utiities to enhance chart use in Microsoft Excel
TM AutoChart
Link chart axis values to worksheet cells

Project Euler - Problem 16

More about Project Euler.

Problem description

2^(15) = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.

What is the sum of the digits of the number 2^(1000)?

Solution

Given the Large Number Arithmetic functions, in some cell in Excel (I used Cell S28) enter the function =LargePower(2,1000).  Then, to compute the sum of the individual digits in the result, use the array formula =SUM(--MID(S28,ROW(INDIRECT("1:"&LEN(S28))),1))  To enter an array formula complete data entry with the CTRL+SHIFT+ENTER combination rather than just the ENTER or TAB key.  If done correctly, Excel will show the formula wrapped between curly brackets { and }