are you thinking of modulo??

Find the least natural number whose last digit is 7 such that it becomes 5 times larger when this last digit is carried to the beginning of the number? for example : if 312 is a number then the newly formed number after setting up the last digit to beginning of number is 231


The answer is 142857.

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

Akash Deep
Jul 1, 2014

l e t n u m b e r = . . . . . 7 . . . . 7 5 = 7...... t h i s i s w h a t t h e q u e s t i o n s a y s n o w n o t i c e w h e n w e m u l t i p l y 7 w i t h 5 u n i t d i g i t o f n e w n o w o u l d b e 5 a n d h e n c e i t w o u l d b e t h e 2 n d l a s t d i g i t o f o r i g i n a l n u m b e r . n u m b e r = . . . . . . 57 n o w s u p p o s i n g n u m b e r t o b e o f d i f f e r e n t d i g i t s . c a s e 1 a 3 d i g i t n u m b e r a 57 5 = 7 a 5 i n e x p a n d e d f o r m w e f i n d t h e a b o v e e q u a t i o n b u t g e t a d e c i m a l v a l u e o f a . w h i c h i s n o t p o s s i b l e w e c o n t i n u e t h e s a m e p r o c e s s f o r a 6 d i g i t n u m b e r a s b e f o r e i t i n a l l c a s e y o u w i l l g e t d e c i m a l v a l u e o f a b o r a b c c a s e 2 a 6 d i g i t n u m b e r a b c d 57 5 = 7 a b c d 5 ( 100000 a + 10000 b + 1000 c + 100 d + 57 ) 5 = 5 ( 140000 + 2000 o a + 2000 b + 200 c + 2 d + 1 ) s o l v i n g w e g e t 98 ( 1000 a + 100 b + 10 c + d ) = 139944 a b c d = 1428 n o t e : a b c d r e p r e s e n t s 1000 a + 100 b + 10 c + d t h e r e f o r e l e a s t s u c h n u m b e r = a b c d 57 = 142857 let\quad number\quad =\quad .....7\\ ....7\quad *\quad 5\quad =\quad 7......\\ this\quad is\quad what\quad the\quad question\quad says\\ now\quad notice\quad when\quad we\quad multiply\\ 7\quad with\quad 5\quad unit\quad digit\quad of\quad new\quad no\\ would\quad be\quad 5\quad and\quad hence\quad it\quad would\quad \\ be\quad the\quad 2nd\quad last\quad digit\quad of\quad original\quad \\ number.\quad number\quad =\quad ......57\\ now\quad supposing\quad number\quad to\quad be\quad of\quad \\ different\quad digits.\\ case\quad 1\\ a\quad 3\quad digit\quad number\quad \\ a57\quad *\quad 5\quad =\quad 7a5\\ in\quad expanded\quad form\quad we\quad find\quad the\\ above\quad equation\quad but\quad get\quad a\quad decimal\quad \\ value\quad of\quad a.\quad which\quad is\quad not\quad possible\\ we\quad continue\quad the\quad same\quad process\quad for\quad a\quad 6\\ digit\quad number\quad as\quad before\quad it\quad in\quad all\\ case\quad you\quad will\quad get\quad decimal\quad value\quad of\quad ab\quad or\quad abc\\ case\quad 2\\ a\quad 6\quad digit\quad number\quad \\ abcd57\quad *\quad 5\quad =\quad 7abcd5\\ (100000a\quad +\quad 10000b\quad +\quad 1000c\quad +\quad 100d\quad +\quad 57)5\quad =\quad \\ 5(140000\quad +\quad 2000oa\quad +\quad 2000b\quad +\quad 200c\quad +\quad 2d\quad +\quad 1)\\ solving\quad we\quad get\\ 98(1000a\quad +\quad 100b\quad +\quad 10c\quad +\quad d)\quad =\quad 139944\\ abcd\quad =\quad 1428\quad \\ note\quad :\quad abcd\quad represents\quad 1000a\quad +\quad 100b\quad +\quad 10c\quad +\quad d\\ therefore\quad least\quad such\quad number\\ =\quad abcd57\quad =\quad 142857 .

Bill Bell
Jul 10, 2014

Brute force, in Python:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
N = 17

count = 0

while True :

    N += 10

    strN = str ( N )

    derived = int ( '%s%s' % ( strN [ -1 ], strN [ : -1 ]) )

    if 5 * N == derived :

        print N, derived

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...