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 Solvers47
Suggested Problems
-
44647 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
489 Solvers
-
587 Solvers
-
Convert from Fahrenheit to Celsius
25949 Solvers
-
10463 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!