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.)
computer solution | Comment 2 of 3 |
for n=1:2000
  ns=char(string(n));
  tot=n;
  for i=1:length(ns)
    a=[ns(1:i-1) ns(i+1:end)];
    tot=tot+str2double(a);
  end
  if tot==2022
    disp([n tot]);
  end
end

finds

>> fromSumToAddends2
        1320        2022
        
and, to verify, 

1320 +  132 +  130 +  120 +  320 =  2022.



A modified program finds

      275795      487929
      275813      487929
      314159      487929


Formula:


d(N-1) * 10^(N-1) + Sigma{i=0 to N-2} ((i+1)*d(i+1) + (N-i)*d(i) ) * 10^i

I could have included the first term into the Sigma, but that would need the proviso that a non-existent digit should be considered to be zero.

  Posted by Charlie on 2022-07-28 11:40:05
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 (0)
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