Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to understand the algorithm to find self-number.
But I don't know what does C, k, j, b is mean at this formula. What's that? How do I understand and what should I assign to solve them?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

The formula you refer to is a recurrence. It generates some (not all) self-numbers. The first formula works in base 10, while the second works in base 2. The third generalizes to any base.

$C_k$ refers to the $k^{th}$ generated self number ($C_1$ is the first, $C_2$ is the second, ..etc.). Let's use the first formula to generate some self-numbers:

$C_1 = 9$ (as written between brackets)

We get $C_2$ by replacing $k$ in the formula by 2. $C_2 = 8*10^{2-1} + C_{2-1} + 8 = 8*10 + C_1 + 8 = 8*10 + 9 + 8 = 97$ (by substituting $C_1 = 9$).

You continue in this way and you get infinitely many self-numbers (but not all). If you really insist on generating all self-numbers, you iterate over all natural numbers and apply the test on each, or you find a cleverer way of doing it..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.