Wednesday, June 9, 2010

5-star challenge: hailstone numbers

Luke asked why I stopped with the math contest questions. As he forms a strong percentage of recent commenters on this blog, I suppose I ought to humour him. The fact is, these questions are tricky to find. I don't want something that just amounts to boring computations, and I don't want something that can be artlessly mined from Google or WolframAlpha.

This is one of the recent 5* challenge problems I ran. It's tied to a set of sequences that could keep me (has kept me) busy for hours. It's not like useful math, it's more the sort that could be warmly amusing and deeply intriguing, the kind of thing I would be thankful for on a desert island.

A hailstone sequence is defined recursively by this equation:

an = { 3*(an-1)+1 if an-1 is odd; (an-1)/2 if an-1 is even}

For example, if we start with 10, the next term (because 10 is even) is 5, the next term (because 5 is odd) is 16, then 8, then 4, then 2, then 1, then 4, 2, 1, 4, 2, 1… for ever and ever. The shortest hailstone sequence starting with 10 and concluding with 1 is 10, 5, 16, 8, 4, 2, 1 and its length is seven.

Find the sum of all positive integers N such that the length of the shortest hailstone sequence starting with N and concluding with 1 is thirteen.


  1. Mr. Burchell!!!! Amazing Site you got here!!!!!Love it!

  2. I love you, Nate! I couldn't read to the bottom of this post without my eyes crossing, but I absolutely love you!!! Mom

  3. 7510 (sum of 17, 104, 106, 112, 113, 288, 640, 672, 680, 682, 4096)