(I) Each of x and y is a positive integer with x < y such that, reading from left to right, the first four digits in the base ten expansions of 1978
x and 1978
y are congruent.
Determine the minimum value of x+y.
(II) What is the minimum value of x+y - if, keeping all the other conditions in
(i) unaltered, the first five digits in
the respective base ten expansions of
1978x and 1978y
are congruent?
Note: None of the expansions of 1978x and 1978y can contain any leading zero
Part 1:
clearvars,clc
l1978=log10(1978);
for x=1:1000
lx=x*l1978;
mantx=lx-floor(lx);
digsx=floor(1000*10^mantx);
for y=x+1:1001
ly=y*l1978;
manty=ly-floor(ly);
digsy=floor(1000*10^manty);
if digsx==digsy
disp([x,y,x+y,digsy])
end
end
end
finds
x y x+y first 4 digits
1 531 532 1977
4 534 538 1530
5 535 540 3027
7 537 544 1184
9 539 548 4634
11 541 552 1813
12 542 554 3586
14 544 558 1403
15 545 560 2775
21 551 572 1662
24 554 578 1286
25 555 580 2544
28 558 586 1969
32 562 594 3014
34 564 598 1179
36 566 602 4614
38 568 606 1805
41 571 612 1397
42 572 614 2763
44 574 618 1081
45 575 620 2138
46 576 622 4230
51 581 632 1280
52 582 634 2533
53 583 636 5011
55 585 640 1960
58 588 646 1517
The first is obviously spurious due to a rounding error. The second is legitimate, and is the real first occurrence: (x, y) = (4, 534) for a total of 538, where the first four digits are 1530.
Part 2:
The corresponding result for the second part is
x y x+y first 5 digits
2 14815 14817 39124
the total x+y being 14817.
1978^2 = 3912484
1978^14815 = 3.912422... * 10^48833
|
Posted by Charlie
on 2024-11-21 11:06:21 |