"Benford's law, also called the first-digit law, states that in lists of numbers from many real-life sources of data, the leading digit is distributed in a specific, non-uniform way. According to this law, the first digit is 1 about 30% of the time, and larger digits occur as the leading digit with lower and lower frequency, to the point where 9 as a first digit occurs less than 5% of the time." - Wikipedia.
[code]
The user enters an initial number (k), a growth rate (r), and the number of time-steps (t). The program will generate an array (of size t) of numbers according to the user's input. At the end, the program compares the created array, with the Benford's proportions array: 0=0%, 1=30.1%, 2=17.6%, 3=12.5%, 4=9.7%, 5=7.9%, 6=6.7%, 7=5.8%, 8=5.1%, 9=4.6%.