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

Home > Numbers
Minimum Integer from Last 2 Digits Puzzle (Posted on 2023-01-20) Difficulty: 3 of 5
Determine the minimum value of a positive integer n such that when 3n is represented in base 143, the last two digits (reading left to right) is 01 (in this order).
Provide the required smallest value of n in base 10.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 2 of 2 |
clearvars,clc
n=1;v=sym(3);
found=false;
while found==false
   n=n+1; v=v*3;
   if mod(v,143^2)==1
     found=true;
   end
end
n
inbase= tobase(v,143)
disp(length(inbase))
v
disp(length(char(string(v))))

function out=tobase(value,base)
  out=[]; v=value;
  while v>0
    q=floor(v/base);
    r=v-q*base;
    out=[r out];
    v=q;
  end
end

finds the smallest value of n in base 10 to be 195.

The value of 3^195 in base 143 is 44 digits long and is expressed in the following 44 digits (each digit given in decimal):

[2, 40, 141, 29, 79, 52, 61, 74, 79, 122, 117, 123, 66, 25, 41, 52, 128, 114, 75, 11, 142, 18, 135, 75, 35, 31, 79, 89, 25, 73, 123, 36, 96, 4, 71, 10, 124, 75, 9, 30, 118, 113, 0, 1]

In decimal, that's

1093061682616768598101980749118434678309602685816438255039403134728775682721408160470718926107

which has 94 digits.

The printout:

n =
   195
inbase =
[2, 40, 141, 29, 79, 52, 61, 74, 79, 122, 117, 123, 66, 25, 41, 52, 128, 114, 75, 11, 142, 18, 135, 75, 35, 31, 79, 89, 25, 73, 123, 36, 96, 4, 71, 10, 124, 75, 9, 30, 118, 113, 0, 1]
    44
v =
1093061682616768598101980749118434678309602685816438255039403134728775682721408160470718926107
    94

  Posted by Charlie on 2023-01-20 14:13:12
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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