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

Home > Numbers
sod(N) = pod(sqrt(N)) (Posted on 2023-02-09) Difficulty: 3 of 5
(a) Find two positive integers, N1 and N2, such that for each:
* the sum of digits of the integer equals the product of digits of its square root, and
* the digit '1' does not appear in either the original integer or its square root.

(b) Can you find any others?

(c) Can you explain why there would be so many more solutions if we allowed the digit '1' to appear?

No Solution Yet Submitted by Larry    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts computer solution of (a) and (b) -- spoilers | Comment 1 of 3
clc,clearvars
n=uint64(1:10000000);
sq=n.^2;
disp('starting')
for i=1:length(n)
   tst=[char(string(n(i))) char(string(sq(i)))];
   if isempty(strfind(tst,'1'));
      if sod(sq(i))==pod(n(i))
        disp([sq(i) n(i) sod(sq(i)) pod(n(i))])
      end
   end
end

where sod is

function sd = sod(n) 
    dgts=num2str(n) ;
    sd=sum(dgts-48);
end

and pod is

function sd = pod(n) 
    dgts=num2str(n) ;
    sd=prod(dgts-48);
end

(48 is the Ascii value of the zero character.)

finds only

     N        sqrt(N)    sod(N)   pod(sqrt(N))

    8649         93         27         27
27269284       5222         40         40

No others found up to 10,000,000 ^2,

  Posted by Charlie on 2023-02-09 09:30:16
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