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

Home > Numbers
Going Cyclic With Harmonic (Posted on 2009-11-03) Difficulty: 3 of 5
Three 3-digit non leading zero positive base N integers P, Q and R, with P > Q > R, are such that:

(i) Q is the harmonic mean of P and R, and:

(ii) P, Q and R can be derived from one another by cyclic permutation of digits.

Determine all possible positive integer values of N ≤ 30 for which this is possible.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts May not be doing this right Comment 1 of 1

I can't come up with anything using the following code:

FOR n = 2 TO 30
    FOR a = 1 TO n-1
        FOR b = 0 TO n-1
            FOR c = 0 TO n-1
                abc = Base2Dec(a, b, c, n)
                bca = Base2Dec(b, c, a, n)
                cab = Base2Dec(c, a, b, n)
                IF abc <> bca AND abc <> cab THEN
                    IF bca = HMean(abc, cab) THEN PRINT abc, bca, cab, n
                    IF cab = HMean(abc, bca) THEN PRINT abc, cab, bca, n
                    IF abc = HMean(bca, cab) THEN PRINT bca, abc, cab, n
                END IF
            NEXT c
        NEXT b
    NEXT a
NEXT n
END
FUNCTION Base2Dec (a, b, c, base)
    Base2Dec = a*base^2 + b*base + c
END FUNCTION
FUNCTION HMean (x, y)
    HMean = 2*x*y / (x + y)
END FUNCTION

The closest I can find is '102', '120', and '210' in base 4 (18, 24, and 36 respectively), which I'm pretty sure is not a cyclic permutation.

I also ran the above code for n = 31 to 50 and still came up with nothing.


  Posted by Jim Keneipp on 2009-11-03 17:49:07
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (16)
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