May you give a short explanation on this solution?
This is the asymptotic expression of nth term based on the golden ratio. See http://en.wikipedia.org/wiki/Golomb_sequence
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
assert(isequal(euler341(1),1))
|
2 | Pass |
%%
assert(isequal(euler341(10),5))
|
3 | Pass |
%%
assert(isequal(euler341(310),42))
|
4 | Pass |
%%
assert(isequal(euler341(4242),210))
|
5 | Fail |
%%
assert(isequal(euler341(328509),3084))
Error: Assertion failed.
|
6 | Fail |
%%
assert(isequal(euler341(551368),4247))
Error: Assertion failed.
|
7 | Fail |
%%
assert(isequal(euler341(614125),4540))
Error: Assertion failed.
|
Sum of diagonal of a square matrix
1327 Solvers
Change the sign of even index entries of the reversed vector
296 Solvers
Back to basics - mean of corner elements of a matrix
297 Solvers
Return fibonacci sequence do not use loop and condition
218 Solvers
218 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!