Paint A Pyramid

Answer :

It will be convenient to imagine that we are painting our pyramids on the flat cardboard, as in the diagrams, before folding up. 
Now, if we take any four colours (say red, blue, green, and yellow), they may be applied in only 2 distinctive ways, as shown in Figs, 1 and 2. 
Any other way will only result in one of these when the pyramids are folded up. 
If we take any three colours, they may be applied in the 3 ways shown in Figs. 3, 4, and 5. 
If we take any two colours, they may be applied in the 3 ways shown in Figs. 6, 7, and 8. 
If we take any single colour, it may obviously be applied in only 1 way. 
But four colours may be selected in 35 ways out of seven; three in 35 ways; two in 21 ways; and one colour in 7 ways. 
Therefore 35 applied in 2 ways = 70; 35 in 3 ways = 105; 21 in 3 ways = 63; and 7 in 1 way = 7. 
Consequently the pyramid may be painted in 245 different ways (70 + 105 + 63 + 7), using the seven colours of the solar spectrum in accordance with the conditions of the puzzle.

Math Genius