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

Home > Numbers
225 as a factor (Posted on 2022-04-12) Difficulty: 3 of 5
Please specify how many positive integers display the following features:
a. The number is below 10^12.
b. It is a multiple of 225.
c. Its decimal representation involves only two distinct digits.

Provide a justification of your result..

See The Solution Submitted by Ady TZIDON    
Rating: 5.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: Analytic solution | Comment 3 of 7 |
(In reply to Analytic solution by Larry)

Excellent analytic solution!


I had bypassed a computer solution, going directly to an analytic one, but I neglected the cases of smaller than 12-digit numbers other than those where zero was one of the digits (00 and 50), reducing my total.

I had figured a computer solution would take too long, and apparently I was right, at least using Matlab. I translated your program and tried for 9-digit limit:

 power=9;
 big=10^power-1;
 myList=[""]; count=0;
 for i=225:225:big
   s=char(string(i));
   if length(unique(s))~=2
     continue
   end
   x=string(unique(s));
   if ~ismember(x,myList)
     myList=[myList  x];
   end
   count=count+1;
 end
 disp([power count])
 disp(myList(2:end))
 

It took half a minute to come up with

     9   272
    "25"    "09"    "03"    "57"    "06"

If going to 12-digit numbers takes 1000 times as long, that's 500 minutes or over 8 hours.

  Posted by Charlie on 2022-04-12 12:37: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 (8)
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