A common computer programming rule is that names of variables must be between one and eight characters long. The first character can be any of the 26​ letters, while successive characters can be any of the 26 letters or any of the 10 digits. For​ example, allowable variable names include​ A, BB, and M3477K. How many different variable names are​ possible? (Ignore the difference between uppercase and lowercase​ letters.)

1 answer

one letter variable ---- 26
two character variable ----- 26x36
three character variable --- 26 x 36 x 36
four character variable ---- 26 x 36 x 36 x 36 = 26(36)^3
...
eight character variable ---- 26(36)^7

Possible characters = sum of the above
= 26(1 + 36 + 36^2 + ... + 36^7)

= 26[ 1(36^8 - 1)/35 ] = appr 2.1 x 10^12 (about 2 trillion)