Skip to main content
All Questions

Write a program that outputs the first n Ramanujan numbers: integers that are a sum of two positive cubes in at least two different ways, such as 1729.

Unlock detailed company stats for this questionUpgrade
Write a program that outputs the first n Ramanujan numbers, that is, the integers that can be written as a sum of two positive cubes in at least two different ways (1729 = 1^3 + 12^3 = 9^3 + 10^3 is the first).

Community answers

No answers contributed by the community yet.

Related courses

Course

SQL Interview Prep Course

Prepare for SQL interviews with lessons on joins, aggregations, and window functions, then practice real SQL interview questions in an interactive editor with expert solutions.

Course

Data Science Interview Prep

Land your dream data science role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more.