Let 0 < (a/b) < 1 where a and b are positive integers.
Make program which enters the numbers a and b then represent a/b with as sum of numbers 1/n + 1/n2 + 1/n3… and prints the n numbers.

For instance:

a = 6
b = 7
2, 3, 42

i.e. 6/7 = 1/2 + 1/3 + 1/42

a = 3
b = 4
2, 4

as 3/4 = 1/2 + 1/4

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday May 26th.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

1 Comment (+add yours?)

  1. Dylan
    May 26, 2013 @ 02:15:41

    I had not come across the Eye of Horus before.

    I shall sleep on Egyptian fractions for a=2 and b<100. Sunday challenge!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: