### USA Maths Olympiad Problem - 200th Puzzle

**200th Puzzle of the CSE Blog**

**Source:**

I got hold of the super awesome book I read 6 years back:

*"A Path to Combinatorics for Undergraduates: Counting Strategies"*. A must have for any math/olympiad enthusiast (Flipkart link to Imported Edition and Indian Edition) - Example 5.8 - USAMO 1990

**Problem:**

Let

*n*be a positive integer. Find the number of positive integers whose base

*n*representation consists of distinct digits with the property that except for the leftmost digit, every digit differs by +1 or -1 from some digit further to the left.

**Update**(26/12/2012):

No correct solution provided. Solution posted by me in comments!