The number n is the only local maximum e.g. 123465, 123564, 654321, as opposed to 651432, 261354.
f(1)=1 implies f(n) =2^(n-1)
blackjack
flooble's webmaster puzzle