Determine the positive integer values of x less than 100 such that the last two digits of 2x equal x.
What positive integer values of y less than 100 are there such that the last two digits of 3y equal y?
This bc function
define twon() {
auto j
scale=0
#
for (j=1;j<=100;++j) {
if ((2^j)%100 == j) {print "2 ",j,2^j; print " "}
if ((3^j)%100 == j) {print "3 ",j,3^j; print " "}
if ((4^j)%100 == j) {print "4 ",j,4^j; print " "}
if ((5^j)%100 == j) {print "5 ",j,5^j; print " "}
if ((6^j)%100 == j) {print "6 ",j,6^j; print " "}
if ((7^j)%100 == j) {print "7 ",j,7^j; print " "}
if ((8^j)%100 == j) {print "8 ",j,8^j; print " "}
if ((9^j)%100 == j) {print "9 ",j,9^j; print " "}
}
return(0)
}
produced the printout
5 25 298023223876953125
2 36 68719476736
7 43 2183814375991796599109312252753832343
6 56 37711171281396032013366321198900157303750656
8 56 374144419156711147060143317175368453031918731001856
3 87 323257909929174534292273980721360271853387
9 89 8464149782874043593254414191179506861158311266932799636000173971661904
149225893113289
4 96 6277101735386680763835789423207666416102355444464034512896
|
Posted by Richard
on 2006-08-09 21:01:36 |