Asked • 06/26/19

Digit-increasing number test?

A number is called digit-increasing if it is equal n + nn + nnn + ... for some digit n between 1 and 9. For example 24 is digit-increasing because it equals 2 + 22 (here n = 2). Actually, a friend of mine asked me this question and i am stuck thinking about it but couldn't find the exact solution so far. Can anyone help ? I needed the function that returns true if it is digit-increasing else false.

3 Answers By Expert Tutors

By:

Corey G. answered • 07/10/20

Tutor
5.0 (128)

PhD in Computer Engineering with 20 Years of Experience

Patrick B. answered • 06/26/19

Tutor
4.7 (31)

Math and computer tutor/teacher

Patrick B. answered • 05/05/19

Tutor
4.7 (31)

Math and computer tutor/teacher

Patrick B.

so then there are only 10 such sequences: 1 + 11+111+1111+ .... 2 +22+222+2222.... etc
Report

05/05/19

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.