Palindrome paranoia

A palindromic number is a number that reads the same when its digits are reversed, e.g. 1623261.

What is the largest palindromic 8-digit number which is exactly divisible by 45?

This question was taken from the 3rd round of the 2013 South African Junior Maths Olympiad.


The answer is 59944995.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Victor Spirou
Jul 17, 2014

A number is divisible by 45 = 9  5 if and only if it is divisible by both 5 and 9. If our palindromic number is divisible by 5, it must end in a 5, and hence also starts with a 5. Next, for it to be divisible by 9, the sum of the digits of the number must be divisible by 9. The largest palindromic 8-digit number that starts with a 5 and has digit sum divisible by 9 equals 59944995.

Akash Deep
Jul 25, 2014

at first sight we clearly find out that since the number is divisible by 45 it must be divisible by 9 and 5 both. since it is divisible by 5 it will have unit digit 5 or 0 , not 0 because it is palindromic and if it would be 0 then the palindrome of it would start with first digit as 0 , so the unit digit is 5 and because it is a palindrome first digit would also be 5 to be read same from both sides. now, l e t u s t a k e t h e n u m b e r t o b e k k = 5 a b c c b a 5 9 k s o , 9 ( 5 + a + b + c + a + b + c + 5 ) 9 10 + 2 ( a + b + c ) l e t , 2 ( a + b + c ) = m 10 1 ( m o d 9 ) m + 10 9 ( m o d 9 ) s u b t r a c t i n g w e g e t ; 2 ( a + b + c ) 8 ( m o d 9 ) m = 9 k + 8 n o w w e h a v e t o d e t e r m i n e l a r g e s t p o s s i b l e o f " m " . m m a y b e e q u a l t o N = ( 8 , 17 , 26 , 35 , 44 , 53 , 62...... ) b u t s i n c e m i s e v e n 17 , 35 , 53 a r e n o t p o s s i b l e i f m = 62 t h e n a + b + c = 31 w h i c h i s n o t p o s s i b l e a s a , b , c a r e d i g i t s f r o m 1 t o 9 s o 62 a n d o n w a r d s a r e n o t t h e v a l u e s o f m s o , n g e t s m o d i f i e d t o : N = ( 8 , 26 , 44 ) l e t u s t a k e t h e l a r g e s t o f s e t N t h e n m = 44 a + b + c = 22 n o w b e c a u s e a i s b e f o r e b f o r h a v i n g g r e a t e s t v a l u e o f t h i s 8 d i g i t n u m b e r a > = b > = c t a k i n g l a r g e s t v a l u e o f a = b = 9 w e g e t c = 4 a n d t h e n u m b e r k = 59944995 let\quad us\quad take\quad the\quad number\quad to\quad be\quad k\\ k\quad =\quad 5abccba5\\ 9\quad |\quad k\quad so,\quad \\ 9\quad |\quad (5+a+b+c+a+b+c+5)\\ 9\quad |\quad 10+2(a+b+c)\quad let\quad ,\quad 2(a+b+c)\quad =\quad m\\ 10\quad \equiv \quad 1\quad (mod\quad 9)\\ m+10\quad \equiv \quad 9\quad (mod\quad 9)\quad \\ subtracting\quad we\quad get;\\ 2(a+b+c)\quad \equiv \quad 8\quad (mod\quad 9)\\ m\quad =\quad 9k+8\quad \\ now\quad we\quad have\quad to\quad determine\quad largest\quad possible\\ of\quad "m".\quad \\ m\quad may\quad be\quad equal\quad to\quad N\quad =\quad (8,17,26,35,44,53,62......)\\ but\quad since\quad m\quad is\quad even\quad 17,35,53\quad are\quad not\quad possible\\ if\quad m\quad =\quad 62\quad then\quad a+b+c\quad =\quad 31\quad which\quad is\quad \\ not\quad possible\quad as\quad a,b,c\quad are\quad digits\quad from\quad 1\quad to\quad 9\\ so\quad 62\quad and\quad onwards\quad are\quad not\quad the\quad values\quad of\quad m\\ so,\quad n\quad gets\quad modified\quad to:\\ N\quad =\quad (8,26,44)\\ let\quad us\quad take\quad the\quad largest\quad of\quad set\quad N\\ then\quad m\quad =\quad 44\\ a+b+c\quad =\quad 22\\ now\quad because\quad a\quad is\quad before\quad b\quad for\quad having\quad greatest\quad value\\ of\quad this\quad 8\quad digit\quad number\quad a>=b>=c\\ taking\quad largest\quad value\quad of\quad a=b=9\quad we\quad get\quad c=4\\ and\quad the\quad number\quad k\quad =\quad 59944995\\

You could also abuse the fact that since this palindrome is 8-digit, you can just look at the first four digits, because the other four will be a mirror image, and the properties will all transfer (so you must just find the largest 4-digit multiple of 9 starting with 5)! :)

Nicolas Bryenton - 6 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...