Archive - Nov 1, 2007

Date

Hint for Problem 78

A bonus, problem 76 uses something related to problem 78.
Problem 76's answer can be found by understanding integer partition problem

Problem 78
Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can separated into piles in exactly seven different ways, so p(5)=7.
OOOOO
OOOO O
OOO OO
OOO O O
OO OO O
OO O O O
O O O O O

Find the least value of n for which p(n) is divisible by one million.

No 78 can be rephrased as
Find the smallest n for partition function p(n), divisible by 1 million.

I seriously doubt it's cool to generate integer partition one by one and test if it's divisible by 1 million.
A few things can speed it up, for example:
try test if it's divisible by 10 first, if it does then 1000, then 100000, then 1 million. In a lot programs (like Mathematica), mod 10 is a lot faster than mod 1000000. Especially in the later times, the number become extremely large.
Only keep enough digits to see if it's divisible by 1 million, 6 digits is enough, now discard all the useless large number calculations. Guess you have to use a programing language instead of Mathematica or Maple. I'm lazy, I don't mind Mathematica runs for an hour when I'm doing something else online.
There are some congruence of partition functions can help remove a some portion of testing and help establish few upper bounds. Currently, p(2309349) mod 1000000 = 0, the lower bound, 2000. :) guess the real number is smaller because it's not correct.

This hint may not be helpful, because I still haven't get the right answer yet Crying. I don't wana...
I have to remove myself from this one for now.

Honey Pot that kill bots