All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Summing Digits (Posted on 2007-02-26) Difficulty: 3 of 5
Prove that there is a finite number of values of n that satisfy

n = 4s(n) + 3s(s(n)) + 2s(s(s(n))) + 1

where n is a positive integer and s(n) denotes the sum of the digits of n. Also, determine analytically, all values of n that satisfy the equation.

See The Solution Submitted by Dennis    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 1 of 5

The right hand side can't exceed 9*(4*(log(n)+1) + 3*(log(log(n)+1)+1) + 2*(log(log(log(n)+1)+1)+1) + 1). That upper bound is equal to n when n=189.1301139899085, and from then on n surpasses it, as this formula is logarithmic.

As for the values for which the original equation is satisfied, the program:

DECLARE FUNCTION s! (n!)
CLS
FOR n = 1 TO 100000
  IF n = 4 * s(n) + 3 * s(s(n)) + 2 * s(s(s(n))) + 1 THEN
    PRINT n
  END IF
NEXT

FUNCTION s (n)
 st$ = LTRIM$(STR$(n))
 t = 0
 FOR i = 1 TO LEN(st$)
  t = t + VAL(MID$(st$, i, 1))
 NEXT
 s = t
END FUNCTION

finds 10 and 46 as the only two values of n that satisfy the equation.


  Posted by Charlie on 2007-02-26 16:07:38
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (23)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information