Problem 53990. Classify product/digit-sum sequences

Cody Problem 53120 involved a sequence in which a term is computed by multiplying the previous two terms and adding the digits of the product. In that problem the first two terms of the sequence were 1 and 2. The next four terms were 2, 4, 8, and 5.
What happens if the first two terms are changed? It turns out that these product/digit-sum sequences can be sorted into five groups. For reasons that will likely be apparent to those who solved Cody Problem 53120, the sequence there (and others like it) is assigned the number 163. The other four types of sequence are assigned the numbers 1, 9, 26, and 62.
Write a function to classify the product/digit-sum sequences given the first two terms a and b. To encourage solvers to find the pattern, loops are banned, and to allow for large inputs, a and b are specified as strings.

Solution Stats

50.0% Correct | 50.0% Incorrect
Last Solution submitted on Jun 17, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers11

Suggested Problems

More from this Author281

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!