Combinations for Screen lock For iPhone / Android I was wondering if there was a general for formula to calculate the combination of the password lock for the current smart phones



The following is the condition


We must use four nodes or more to make a pattern at least.
Once anode is visited, then the node can't be visited anymore. 
You can start at any node.
A pattern has to be connected.
Cycle is not  allowed.


If using 4 as the minimum string for the password with 9 nodes , the result is 389112.

Is there anyway to estimate the number of combinations for 16 nodes, 25 nodes and so on?
Since each dot can be the starting point for the pattern, the number of possibilities are as follows:


4 dots combination (since this is the minimum required): 9 dots (starting points) ^ (raise to the power) 4 = 6,561 patterns
5 dots combination: 9 dots ^ 5 = 59,049 patterns
6 dots combination: 9 dots ^ 6 = 531,441 patterns
7 dots combination: 9 dots ^ 7 = 4,782,969 patterns
8 dots combination: 9 dots ^ 8 = 43,046,721 patterns
9 dots combination: 9 dots ^ 9 = 387,420,489 patterns


Total possible number of patterns = 435,847,230 patterns
Since each dot can be the starting point for the pattern, the number of possibilities are as follows:


4 dots combination (since this is the minimum required): 9 dots (starting points) ^ (raise to the power) 4 = 6,561 patterns
5 dots combination: 9 dots ^ 5 = 59,049 patterns
6 dots combination: 9 dots ^ 6 = 531,441 patterns
7 dots combination: 9 dots ^ 7 = 4,782,969 patterns
8 dots combination: 9 dots ^ 8 = 43,046,721 patterns
9 dots combination: 9 dots ^ 9 = 387,420,489 patterns


Total possible number of patterns = 435,847,230 patterns