RE: [math-fun] Sum of last ten digits
Beautiful, Michael -- I had a conversation this morning about this generalization with my friend Alexandre -- you did the job so quickly ! I'm more than delighted ! 1000 thanks ! Best, É. -----Message d'origine----- De : math-fun-bounces+eric.angelini=kntv.be@mailman.xmission.com [mailto:math-fun-bounces+eric.angelini=kntv.be@mailman.xmission.com] De la part de Michael D Beeler Envoyé : mercredi 7 décembre 2005 17:45 À : math-fun@mailman.xmission.com Objet : Re: [math-fun] Sum of last ten digits We can generalize the question by using the last s "digits" in radix b, starting witn s-1 zero terms followed by a 1. Of course this still loops because there are b^s possible states of the last s digits. In fact, the loop is usually much smaller: s=2 s=3 s=4 s=5 s=6 s=7 s=8 s=9 s=10 b=2 3 3 1 3 2 1 1 1 5 b=3 4 4 3 7 5 13 14 ? ? b=4 3 3 4 20 13 ? ? ? ? b=5 5 5 1 43 ? ? ? ? ? b=6 3 12 15 110 31 ? ? ? ? b=7 4 9 6 34 13 33 ? ? ? b=8 6 6 45 84 41 249 171 ? ? b=9 9 30 14 52 16 74 20 14654 ? b=10 8 4 50 171 14 461 78 12203 312 When s > b, terms can be more than 2 digits. My program doesn't work for such cases, hence the several "?" for loop length, and some in the upper right half that I filled in by hand. The length of the tail from 0 ... 0 1 to the loop can be definied different ways, depending on where you start and whether you count terms or the s-digit window state. But the longest tail among the cases above is s=9, b=10; its tail is 14244 window-states with 0...01 as state 1. The largest tail-to-loop ratio is s=4, b=5; tail is 20, for a ratio of 20:1. The runner-up is s=7, b=7, ratio 602/33 = ~18.2. The shortest tail is 1, for s=2 and b = 2, 3, 5, 8 and 9. Eric's original problem, s=10, b=10, has a tail of only 13, for the smallest tail-to-loop ratio (1:24) of the cases above. -- Mike _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (1)
-
Eric Angelini