I have an idea but I don't know how to formalize my idea in a function. That's what n should give me back as (x,y):
n = 0 -> (0,0)
n = 1 -> (1,0)
n = 2 -> (0,1)
n = 3 -> (2,0)
n = 4 -> (1,1)
n = 5 -> (0,2)
n = 6 -> (3,0)
n = 7 -> (2,1)
n = 8 -> (1,2)
n = 9 -> (0,3)
n = 10 -> (4,0)
How do I formulate a function for this one? I also need one for N -> N x {1,...,n) but I think it's the same function, is it?
How do you guys come up with such functions? I'm a c.s. student in the 2nd semester but I wouldn't be able to come up with the function above.
– CoreNoob May 15 '18 at 00:39