Problem 53120. Compute the Sequence of the Day
A sequence starts with 1 and 2, and each subsequent term is the sum of the digits of the product of the previous two terms. As a result, the third term is 2, the fourth is 4, and the fifth is 8.
Write a function to compute the nth term of the sequence.
Solution Stats
Problem Comments
-
3 Comments
goc3
on 28 Apr 2022
This is a good problem. James would be proud of your test suite.
ChrisR
on 7 May 2022
Thanks goc3!
Lincoln Poon
on 3 Oct 2022
Very nice problem. And a very elegant series:)
Solution Comments
Show commentsGroup

Sequences & Series V
- 16 Problems
- 5 Finishers
- Solve a nonlinear difference equation
- Iterate the sum of divisors and totient
- Sum the elements in rows of the Levine triangle
- Find the smallest integer m such that n divides m!
- Identify Ruth-Aaron numbers
- Find numbers in the Popular Computing Z-sequence
- Find the nth nude number
- Determine whether a number is a fibodiv number
- List modest numbers up to n
- List the vile numbers
- List the dopey numbers
- Compute the Sequence of the Day
- Classify product/digit-sum sequences
- Count unique orderings of vertices of a polygon
- Count the ways to draw non-intersecting chords between points on a circle
- Fill a rectangle with 1x1 and 2x2 tiles
Problem Recent Solvers22
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!