Cody

Problem 1472. nth Rational Number

Created by G K in Community

Return the nth rational number.

This is the inverse to Problem 1471. Index of a Rational number

The first ten positive rational numbers under the enumeration using cantors diagonalization argument are 1/1, 2/1, 1/2, 3/1, 2/2, 1/3, 4/1, 3/2, 2/3, 1/4.

Find the index of a positive rational number enumerated in this manner, i.e. the 6th rational number is 1/3.

Problem 2) Prev: 1471 Next: 1477

Solution Stats

57.28% Correct | 42.72% Incorrect
Last solution submitted on Feb 08, 2019

Problem Comments

Solution Comments

Recent Solvers97

Suggested Problems

More from this Author10

Tags

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!