The first test case is wrong 0 and 21 are triangular numbers too (https://oeis.org/A000217), therefore:
multi_triangular(21)
[ 0, 6;
21, 15]
PS: And 0 does not make a pair with every number in this case.
Find the two most distant points
1648 Solvers
404 Solvers
Create an index-powered vector
372 Solvers
There are 10 types of people in the world
328 Solvers
Return fibonacci sequence do not use loop and condition
226 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!