Database programming and passwords

What would the algorithm be for creation a application which would enter every possible combination of valid password keyboard characters into a database minimum of 3 chars and maximum of 16 characters.

Basicly i want to write a application which will create a list of possible passwords and could also be used for a user name list.

I think you should understand the question but just in case i elaborate.

I want to use those characters and any others to create combinations of them and store them into a database.

I understand that the the combinations would be in the millions or billions depending on how many unique characters there are and i understand there are limitation on how much one database can hold so can this be done and if so how would i do it.

Basicly im trying to create an ultimate password list and username list. which i will probably do nothing with except disrtibute it for others use

I see no reason to store all possible passwords. If you want to use them for anything usefull you'd have to have some automated way to go thru the list trying every one it would be better to have a loop wich generates a password, tries it then generates the next one.
if you start with the password "aaa" you need to add 1 to the last charactor making it aab and so on untill it reaches z (or whatever) then make it a again and increment the second charactor when you get to azz increment the 3rd.

the number of passwords generated is too much to handle. chances are the program would crash or the computer would crash or the hard drive would run out of space.

i'm probably wrong, but I think the way to figure out how many possibilities is like this:

for three characters,
26^3
so to continue down from 16
26^(16!)
obviously this includes 2 character and 1 character possibilites, but it's also leaving out other characters that can be used (26 letters in this example, include 52(upper/lower case) and 18 for the numbers and characters listed in the post, not to mention other characters allowed in a password)