Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How many folders?

  1. Oct 25, 2005 #1
    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. Lets 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.

  2. jcsd
  3. Oct 25, 2005 #2


    User Avatar
    Science Advisor
    Homework Helper

    it's a geometric series:


    (r not equal to 1)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook