chandhuru 3 years ago Armstrong number is a number obtained summing the cubes of each number..... consider the number to be abc so took the eqn as 100a + 10b + c = a^3 + b^3 + c^3 how to solve this eqn???

1. Jemurray3

There are an infinite number of possible solutions to that equation, but I suspect that's not quite what you're looking for...

2. chandhuru

I want to find the solution... in what way can i approach it ??

3. Jemurray3

Having googled "Armstrong Number", a better way to phrase that question is "An Armstrong number is a 3-digit number such that the sum of the cubes of each of its constituent digits is equal to the number itself. How can I find an armstrong number?"

4. Jemurray3

Are you trying to find a general expression for all Armstrong numbers, or are you trying to simply find one Armstrong number?

5. chandhuru

yaa i know it is a 3 digit number.... i am trying to find the general expression and i want to find the total number of armstrong numbers present.

6. Jemurray3

I realize that you know the definition. My point was that I did not, so what I said would have been a better way to ask the question in the first place. Incidentally, you are restricting your attention to 3 digit numbers, then? Because the general concept of an Armstrong number can be applied to a number with any number of digits. If you are restricting yourself to 3 digit numbers, I don't think you can express a general relationship between the digits but it would be straightforward to systematically solve for them. There are only a handful.

7. chandhuru

if i can find the solution for this eqn ... then same procedure can be used to find it 4 or 5 or 6 digit number...

8. chandhuru

@hartn can u help me ???

9. Jemurray3

You're asking for THE solution to an equation with MANY solutions. That is the primary problem here.

10. Jemurray3

or at least SEVERAL.

11. chandhuru

@hartnn help me ??

12. chandhuru

@Jemurray3 cant we find that several numbers???

13. Jemurray3

Yes, but I'm saying that you'd probably have to do it algorithmically rather than try to find a general expression for the digits. For instance, rearranging the equation, \[100a-a^3 + 10b-b^3 + c-c^3 = 0\] if a = 1 and b = 1, \[99 + 9 = c^2- c \] which doesn't yield an integer c... but going through this process, you might find that 153 works out just fine.

14. chandhuru

yaa i found that one... i solve it like |dw:1348380805812:dw| i dont no to proceed further.. if i go by ur method it will be trial and error method.. so i am trying for some different approach.

15. Jemurray3

If you code a program you could do it in about ten seconds...

16. chandhuru

lol

17. Jemurray3

def Armstrong(): for i in range(1,9): for j in range(0,9): for k in range(0,9): if i*i*i + j*j*j + k*k*k == 100*i + 10*j + k: print(100*i+10*j+k)

18. Jemurray3

I'm serious. This is a perfect example of when a computer program would be wonderful. The above code took a little over 10 seconds to write and produced the four 3-digit Armstrong numbers.

19. chandhuru

@Jemurray3 thank u