LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i calculate all perfect number up to 10000?

Solved!
Go to solution
I have used Quotient and remainder vi but still cannot able to make VI of it ...Please provide me the solution
0 Kudos
Message 1 of 13
(6,983 Views)
can you give some clarity on what you mean by calculation? sum? factorial? And do you mean whole numbers = perfect numbers?
0 Kudos
Message 2 of 13
(6,977 Views)

Perfect numbers

 

In mathematics, a perfect number is a positive integer that is the sum of its proper positive divisors, that is, the sum of the positive divisors excluding the number itself. Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself), or σ(n) = 2n.

Message 3 of 13
(6,974 Views)
Learnt something new today...:smileyhappy:
0 Kudos
Message 4 of 13
(6,967 Views)
Thanks for the information. But actually i waq trying to implement this concept in labview, but failed to implement so if possible please provide the solution to develop..
0 Kudos
Message 5 of 13
(6,955 Views)
Can you post what you have tried so far. This will help in giving you the best approach to solve the problem.
0 Kudos
Message 6 of 13
(6,945 Views)
Solution
Accepted by topic author Sanyam

If i understand correctly the problem is 2-fold. You'll need to make a factorization of a number, and then sum up those factors to see if it adds up to the original number, right?

 

So a loop, using quote and remainder to build an array of factors (the input value need to be shifted and recalculated when you find a factor), then do an array sum and compare to orignal value. Sounds about right? The Perfect numbers should ofc build an array of themselves, which is easily done in the outer/next loop.

 

For all number, simply do an outer loop around the whole shebang and feed it with the loop counter. If the inner test is true, add to array and you'll have an array with all perfect numbers.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 13
(6,942 Views)

Hi Sanyam,

see this link.

If you need it for a homework, then you can download the results directly. 🙂

 

Mike

Message 8 of 13
(6,939 Views)
Yes you are right yamadea, but sorry i am not able to develop this concept. If possible can you please provide the vi to me . I hope i am not bothering you
0 Kudos
Message 9 of 13
(6,921 Views)

Sanyam wrote:
Yes you are right yamadea, but sorry i am not able to develop this concept. If possible can you please provide the vi to me . I hope i am not bothering you

 

The best way to learn is to do it yourself. If you can tell us which bits you are having a problem with, we can help you learn. Mike has given a link to a flow diagram, Mathan a link to the description of the problem, and Yamadea has given an overview of what you would need.

 

Which bits are still puzzling you?

_____________________________
- Cheers, Ed
Message 10 of 13
(6,908 Views)