Your greedy digital product algorithm fails for bases b = 9 and b > 16. A family of counterexamples n = 2^k.p^k where p is the greatest prime < 2^(k-1) fails for bases b in 1+2^k .. p^2 gives examples for all b > 16. I suspect your greedy algorithm works for all b < 17 except b = 9. - Scott
Thanks, you have confirmed by doubts.
Is it good for base 10?
What bases is it good for?
----- Original Message ----- From: "Don Reble" <djr@nk.ca> To: "math-fun" <math-fun@mailman.xmission.com> Sent: Thursday, May 17, 2007 3:13 AM Subject: Re: [math-fun] Stupid digital question
That algorithm fails for base 9, product 216. It produces 3338, but 666 is the answer. -- Don Reble djr@nk.ca
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun