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

Home > Numbers
From sum to addends 2 (Posted on 2022-07-28) Difficulty: 3 of 5
Begin with an N-digit positive integer (no leading zero) and from it create N more integers (each N-1 digits long) by sequentially removing the units digit, or the tens digit, etc from the original number.
The sum of these N+1 integers is the final result.

For example, 1234 + 123 + 124 + 134 + 234 = 1849

1) What original number yields 2022 as the result?
2) How about 487929?
3) If the original number is represented by the concatenation of digits "dN-1 dN-2 ... d2 d1 d0", provide an algebraic formula for the final result.

The formula in 3) should be a function of N, i, and the di:
where the di are the individual digits, and i is the position of the digit.
Note that I am representing the ones digit as i=0.

No Solution Yet Submitted by Larry    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution | Comment 1 of 3
For N=2 the result is 11a+2b
For N=3 the result is 120a+21b+3c
For N=4 the result is 1300a+220b+31c+4d

From this we can apply a greedy algorithm for part 1)
If a=1 the remainder is 722
If b=3 the remainder is 62
If c=2 the remainder is 0
Leaving d=0
1) f(1320)=2022

For N=5 the result is 14000a+2300b+320b+41d+5e
For N=6 the result is 150000a+24000b+3300c+420d+51e+6f

Using the same greedy algorithm for part 2) leads to a problem:
a=2, b=7, c=6, d=0, e=2
leaves 27 = 6f which doesn't give an integer
Try a=2, b=7, c=5 instead leaves 3409
then d=8 leaves 49
e=0, 6f=49 again, not an integer

Let's try working from the back instead.
The only way 51e+6f can end with 9 is one of the following pairs (e,f):
(1,3),(1,8),(3,1),(3,6),(5,4),(5,9),(7,2),(7,7),(9,0),(9,5)
487929-(51e+6f) yields different digits in the tens place that will have to be taken care of with 420d (some are not possible) which leads to a branching tree and eventually to two solutions:

314159 (I see what you did there)
275795 (Did you know there was another?)
edit:  I did this by hand and transposed a pair of digits leading me to miss the 3rd solution:
275813

The function in terms of N, i, di is a bit much.  You can see the pattern well enough in the N=6 case.  

Edited on July 28, 2022, 11:58 am
  Posted by Jer on 2022-07-28 09:21:32

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 (12)
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