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

Home > Numbers
Very peculiar feature ! (Posted on 2022-02-24) Difficulty: 3 of 5
This 5-digit number N uses only ones and zeros if represented in each of the following bases: 3;4;5; and of course the trivial 1 (N ones) 2(no other choices) and N (10).
a. What is N?
b. How many distinct digits are used in its base-6 form?

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

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution (spoiler) Comment 1 of 1
clc, clearvars
for N=10000:99999
   b3=dec2base(N,3);
   if isequal(union(b3,'01'),'01')
      b4=dec2base(N,4); 
      if isequal(union(b4,'01'),'01')
          b5=dec2base(N,5); 
          if isequal(union(b5,'01'),'01')
             fprintf('%5d %5s %5s %5s %5s %5s\n',N,dec2base(N,2),b3,b4,b5,dec2base(N,6));
          end
      end
   end
end

shows

82000 10100000001010000 11011111001 110001100 10111000 1431344

giving the value in decimal, binary, base-3, base-4, base-5 and base-6.

As seen, the base-6 representation uses three different digits: 1, 3, and 4.

  Posted by Charlie on 2022-02-24 09:02:13
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