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

 5-digit period (Posted on 2011-12-16)
What are two primes p > 0 for which 1/p has a purely periodic decimal expansion with a period 5 digits long?

Source: California math competition 2001

 No Solution Yet Submitted by Ady TZIDON Rating: 4.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 2 of 3 |
`   10   point 15   20   P=2   30   while P>0   40    P=nxtprm(P)   50    S=cutspc(str(1/P))   60    if mid(S,3,5)=mid(S,8,5) then print P,S   70   wend`
`runWords for fractionals 15 (Decimals for display 72) 3      0.333333333333333333333333333333333333333333333333333333333333333333333333 41     0.024390243902439024390243902439024390243902439024390243902439024390243902 271    0.0036900369003690036900369003690036900369003690036900369003690036900369   Break in 60 `
`?p 59083543OK`

Interrupted while checking prime 59083543, the program had found 41 and 271. The 3 is an artifact of checking only that the numbers repeat every 5 digits from the decimal point without checking that the digits are different.

 Posted by Charlie on 2011-12-16 22:13:25

 Search: Search body:
Forums (0)