Totally agree, asking math puzzles (sometimes really hard ones) to develop a copycat iphone app? Interviewing like this is really off the rails.
I really understand that a startup with scarce resource would like to do its best shot. However as discussed long ago (https://news.ycombinator.com/item?id=2385424), it is really frustrating that asking math puzzles are assumed as the best way to hire the best for the job.