QB / QB64 Discussion Forum      Other Subforums, Links and Downloads
 

 Return to Index  

Series Challenge

February 1 2013 at 10:05 AM
lawgin  (no login)

 

This challenge tests your ability to work with big integers.
You start an integer series with some integer N. The sum of the individual digits of N is S. If N is evenly divisible by S, then N/S is the next number in the series. If not evenly divisible, the next number in the series is N*S. Continue this process until the series begins an endless repetition.

Examples:
972 has a length of only 4
(972,54,6,1,)1,1,1,...

11 has a length of 7
(11,22,88,1408,18304,1144,11440,)1144,11440,...

What positive integer less than 500 produces the longest series?

or a much tougher challenge,

What positive integer less than 1000 produces the longest series?

 
 Respond to this message   
Responses

 Copyright © 1999-2018 Network54. All rights reserved.   Terms of Use   Privacy Statement