Consider a 6 by 6 grid of random, base 10 integers, uniformly distributed between 1 and 99, such as in "Another Square"
. Construct a second grid where the content of each cell in the second grid is the sum of the orthogonal neighbors of its corresponding cell from the first grid.
What is the probability that a given number in the second grid is a perfect square?
If the grids were infinite, what is the probability that a given number in the second grid would be a perfect square?
(In reply to solution
Charlie. I'm getting much bigger answers than you. I follow your code as far as the output section, but then I think you've printed the last total of the neighbours rather than the count of squares. Forgive me if I'm wrong.
Posted by Harry
on 2010-08-20 17:04:17