All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Digits 251 in sequence (Posted on 2009-01-05) Difficulty: 2 of 5
When written as a decimal, the fraction m/n (with m < n, both positive integers) contains the consecutive digits 2, 5, 1 (in this order). Find the smallest possible n.

See The Solution Submitted by pcbouhid    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 3 of 6 |
    4   point 26
    5   Small=9999
   10   for T=2 to 5000
   20   for M=1 to int(T/2)
   30    N=T-M
   40    F=str(M/N)
   45    Ix=instr(F,"251")
   50    if Ix>0 and Ix<len(F)-8 and N<=Small then print M;N;left(F,69):Small=N
   60   next
   70   next
finds
num  den    decimal
  1  127  0.007874015748031496062992125984251968503937007874015748031496062992
  2  127  0.015748031496062992125984251968503937007874015748031496062992125984
  4  127  0.031496062992125984251968503937007874015748031496062992125984251968
  5  127  0.039370078740157480314960629921259842519685039370078740157480314960
  8  127  0.062992125984251968503937007874015748031496062992125984251968503937
 10  127  0.078740157480314960629921259842519685039370078740157480314960629921
 16  127  0.125984251968503937007874015748031496062992125984251968503937007874
 19  127  0.149606299212598425196850393700787401574803149606299212598425196850
 20  127  0.157480314960629921259842519685039370078740157480314960629921259842
 25  127  0.196850393700787401574803149606299212598425196850393700787401574803
 27  127  0.212598425196850393700787401574803149606299212598425196850393700787
 32  127  0.251968503937007874015748031496062992125984251968503937007874015748
 33  127  0.259842519685039370078740157480314960629921259842519685039370078740
 38  127  0.299212598425196850393700787401574803149606299212598425196850393700
 40  127  0.314960629921259842519685039370078740157480314960629921259842519685
 47  127  0.370078740157480314960629921259842519685039370078740157480314960629
 50  127  0.393700787401574803149606299212598425196850393700787401574803149606
 51  127  0.401574803149606299212598425196850393700787401574803149606299212598
 54  127  0.425196850393700787401574803149606299212598425196850393700787401574
 61  127  0.480314960629921259842519685039370078740157480314960629921259842519
 63  127  0.496062992125984251968503937007874015748031496062992125984251968503
 64  127  0.503937007874015748031496062992125984251968503937007874015748031496
 66  127  0.519685039370078740157480314960629921259842519685039370078740157480
 73  127  0.574803149606299212598425196850393700787401574803149606299212598425
 76  127  0.598425196850393700787401574803149606299212598425196850393700787401
 77  127  0.606299212598425196850393700787401574803149606299212598425196850393
 80  127  0.629921259842519685039370078740157480314960629921259842519685039370
 87  127  0.685039370078740157480314960629921259842519685039370078740157480314
 89  127  0.700787401574803149606299212598425196850393700787401574803149606299
 94  127  0.740157480314960629921259842519685039370078740157480314960629921259
 95  127  0.748031496062992125984251968503937007874015748031496062992125984251
100  127  0.787401574803149606299212598425196850393700787401574803149606299212
102  127  0.803149606299212598425196850393700787401574803149606299212598425196
107  127  0.842519685039370078740157480314960629921259842519685039370078740157
108  127  0.850393700787401574803149606299212598425196850393700787401574803149
111  127  0.874015748031496062992125984251968503937007874015748031496062992125
117  127  0.921259842519685039370078740157480314960629921259842519685039370078
119  127  0.937007874015748031496062992125984251968503937007874015748031496062
122  127  0.960629921259842519685039370078740157480314960629921259842519685039
123  127  0.968503937007874015748031496062992125984251968503937007874015748031
125  127  0.984251968503937007874015748031496062992125984251968503937007874015
126  127  0.992125984251968503937007874015748031496062992125984251968503937007

so the answer is 127.


  Posted by Charlie on 2009-01-05 15:52:08
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information