About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
January 2012
<<December January February>>
In the first part of the challenge, the dwarfs leave the scene after a second and leave a lamp on if and only if its number has an odd number of divisors.
Divisors usually comes in pairs: d and n/d. Only perfect squares can have an odd number of divisors.
The dragon goes over all the triangle numbers, i.e., numbers that are the sum of consecutive integers from 1 to m.
Our challenge was to find an integer n that satisfies
n = 576+1000*l = k*k = m*(m+1)/2
for some integers l, k, and m. These numbers satisfy ( http://en.wikipedia.org/wiki/Square_triangular_number) a recursion formula
n_{k+1} = 34*n_k - n_{k-1} + 2 with the initial value of n_1=1 and n_0=0.
Since we are interested in n modulo (7*24*60*60), we can compute the full cycle, using the recursion above, and get three possible solutions:
Thu 12:09:36; Mon 21:09:36; and Mon 00:09:36.
If you have any problems you think we might enjoy, please send them in. All replies should be sent to: ponder@il.ibm.com