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

Home > Numbers
Double number digit sum (Posted on 2024-01-16) Difficulty: 3 of 5
N is the smallest positive integer such that the sum of the digits of N is 18 and the sum of the digits of 2N is 27. Find N.

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 3 of 4 |
The smallest such N is 1449, as shown at the top of the table shown below.

ct=0;
for n=99:99999
  sn=sod(n);
  if sn==18
    s2n=sod(2*n);
    if s2n==27
      disp([n 2*n])
      ct=ct+1;
      if ct>=25
        return
      end
    end
  end
end

where the sod function is

function sd = sod(n) 
    s=0;
    dgts=num2str(n) ;
    l=length(dgts) ;
    for i=1:l
        s=s+str2double(dgts(i));
    end
    sd=s;
end

and it lists the first 25 such

 
        1449        2898
        1494        2988
        1944        3888
        2349        4698
        2394        4788
        2439        4878
        2448        4896
        2484        4968
        2493        4986
        2844        5688
        2934        5868
        2943        5886
        3249        6498
        3294        6588
        3339        6678
        3348        6696
        3384        6768
        3393        6786
        3429        6858
        3438        6876
        3447        6894
        3474        6948
        3483        6966
        3492        6984
        3744        7488
 

  Posted by Charlie on 2024-01-16 08:41:18
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