Problem 55695. AZPC Oddly Triangular: N=8/9 Digits 3/7/9 Part 2 of 5
AZPC created the Oddly Triangular contest on 9/7/22. The challenge is to find the longest sequence of N odd digits such that sum(1:value) is composed of only odd digits. The contest ended on 9/8/22 as Rokicki created a 3.6 million digit solution with the implication that an infinite length pattern had been determined. [N=2, 17, sum(1:17)=153]
This is step two of the steps and processing types to find Rokicki's result.
This challenge is to find a solution subset with lengths 8 and 9 that only use the digits 3/7/9 in M. The sum(1:M(i)) may only use odd digits. Normal double variables will not suffice for the N=9 solution as the eps is 8 for the sum. There are 8 length 8 solutions if all odd digits are allowed. Rokicki focused on patterns using only 3/7/9 to reduce his search space.
Usage of matlab java math can be seen in the Test Suite. A function zcombvec is given in the function template to facilitate creation of all vectors that only use the 3/7/9 digits. Usage of zcombvec is not required.
M=OddlyTri_379(N,Q) where N=digit length, Q=number of solutions, M is a double vector of the Q values.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
18452 Solvers
-
1300 Solvers
-
Get the area codes from a list of phone numbers
1052 Solvers
-
Split a string into chunks of specified length
1677 Solvers
-
148 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!