donaricano-btn

SelfNumber


1. Question

- If you start with 33, the next number is 33 + 3 +3 = 39, the next is 39 + 3 + 9 = 51 and so you generate the sequence

33, 39, 51, 57....

- d(n) n is called a generator of d(n)

- Some numbers have more than one generator

- A number with no generators is a self-number

- Write a program to output all positive self-numbers less than 10000 in increasing order, one per line


2. Solution

블로그 이미지

리딩리드

,