Can numbers have shapes?   - Let's examine some properties of numbers

It is rather difficult to associate shapes with numbers. However, mathematicians, while examining numbers, discovered several interesting phenomena. If we put identical objects like balls one close to an other, such sets can be organised in different geometric shapes like triangles, squares, rectangles, etc.

To obtain any given shape some specific numbers of elements must be used. Supported by such phenomenon we can say about numbers to be triangular, square, etc. accordingly to the shapes they can be aranged in.

Of course we can also put objects ones on the top of others creating prisms, cubes and other 3 dimensional objects. What is interesting, we always must use some specific numbers of elements to obtain some specific shapes..

In the exercise we are above to do two different algorithms will be used. The first one will try to build triangles at the left side of the window, while the second one will try to build squares at the right side of the screen. For what numbers they can succeed ? Let's find out using + and - buttons. Enjoy!
Can any given number be triangular and square at the same time? What do you think?

Maximal number of balls is 210

designed by Witold Wojcik