Calculating Number of Folders: 4^4 + 4^3 + 4^2 + 4^1

  • Thread starter Thread starter WarrickF
  • Start date Start date
AI Thread Summary
The discussion focuses on calculating the total number of folders created in a hierarchical structure, specifically using the formula 4^4 + 4^3 + 4^2 + 4^1 for four levels of folders. The user seeks a generalized formula to apply for any number of levels, such as 12, to avoid manual calculations. A geometric series formula is provided as a solution, which can be used to calculate the total number of folders for varying depths. The user is particularly interested in implementing this calculation in Excel or Open Office, requesting formula references for assistance. The conversation highlights the need for a scalable solution to folder calculations in a structured format.
WarrickF
Messages
45
Reaction score
0
Hi All,

Quick disclaimer – I'm no math genius ;)

I have written a quick script that take as it's input the number of levels you'd like to iterate and the number of folders at each level you'd like to create.

So you have 4 base folders, in each folder you have 4 more folders etc. 4 levels deep.

The math to calculate how many folders there are at the end of the day looks something like this:

4^4 + 4^3 + 4^2 + 4^1

I can do this math manually, but I have no idea how to create a formula that allows me to plug in any number. Let's say I wanted to go 12 levels deep .. how many folders would I end up with? I can do this manually of course, but then I would learn nothing and run into the same problem a yeaqr from now when I need to do the same math with 1000 folders ;)

I'm trying to do this in Excel \ Open Office so any formula references you can give would also be greatly appreciated.

Thanks
Warrick
 
Physics news on Phys.org
it's a geometric series:

\sum_{i=0}^{n}r^i=\frac{1-r^{n+1}}{1-r}

(r not equal to 1)
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Back
Top