The Prime Days of Christmas - MATLAB Cody - MATLAB Central

Problem 60661. The Prime Days of Christmas

Difficulty:Rate
On the first day of Christmas my true love sent to me partridges in a pear tree.
On the second day of Christmas my true love sent to me turtle doves, and partridges in a pear tree.
On the third day of Christmas my true love sent to me French hens, turtle doves, and partridges in a pear tree.
On the fourth day of Christmas my true love sent to me calling birds, French hens, turtle doves, and partridges in a pear tree.
On the fifth day of Christmas my true love sent to me golden rings, calling birds, French hens, turtle doves, and partridges in a pear tree.
And so on ...
denotes the i-th prime. Suppose that there are n days of Christmas. How many gifts am I receiving in total?

Solution Stats

34.88% Correct | 65.12% Incorrect
Last Solution submitted on Feb 22, 2025

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
2
4

Problem Recent Solvers15

Suggested Problems

More from this Author17

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page