Problem 52462. Easy Sequences 1: Find the index of an element
The nth element of a series A is defined by: . Obviously, the first element . Given the nth element , find the value of the corresponding index n.
Solution Stats
Problem Comments
-
8 Comments
Show
5 older comments
Dyuman Joshi
on 24 Sep 2021
Because you are not doing what the question is asking
Asif Newaz
on 21 Aug 2022
I think the last test case is wrong
Rafael S.T. Vieira
on 12 Nov 2022
Rahul Gulia, in the last test, there will be numbers greater than 1000. And the last test is not wrong. Just remember that indexes are always positive (I had trouble with that also, we are so focused on the sequence that we forget that indexes can't be negative).
Solution Comments
Show commentsProblem Recent Solvers46
Suggested Problems
-
1197 Solvers
-
482 Solvers
-
Fix the last element of a cell array
1539 Solvers
-
Integer sequence - 2 : Kolakoski sequence
164 Solvers
-
376 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!