can foresee problems just before they will take place. ]]>

To get this, note that if $f(n)$ denotes the sum of the first n terms, f(n) must be a perfect square polynomial in n (because it is a square at every natural number), so f(n)=(an+b)^2 for some integers a, b.

at the same time, let the sequence be r, r+d, …. summing the first n terms gives (d/2)n^2+(r-d/2)n, and comparing coefficients with those of (an+b)^2, we get that b=0 and d=2r, where r is a perfect square, say r=k^2. Thus the sequence has the form k^2, 3k^2, 5k^2, … as *jim* already pointed out. the rest is easy…

]]>A fair die is rolled repeatedly until two consecutive rolls are equal, at which point the game ends.

If we let S be the sum of the results of all of the rolls, is S more likely to be even or odd, or is it equally likely to be both?

The exact probability of an even roll is 47/82. Does anyone have a reference to a published solution?

]]>A set of perfect squares, call it S, is

S={1,4,9,16,25,36…}

but,

1=1

4=1+3

9=1+3+5

16=1+3+5+7

….

Make a new set with the partial sums, S’={1,3,5,7…} with

S’[0]=1, S’[1]=3… then,

S’[k]=S’[k-1]+2

=S’[k-2]+2+2

=S’[k-3]+2+2+2

…

=S’[k-k]+2k

=1+2k=2009 => k=1004 ]]>