A number theory problem by madhav srirangan

How many positive integral values of x 100 x\leq100 where ( 3 x x 2 ) (3^{x}-x^{2}) is divisible by 5?


The answer is 20.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Code

1
2
3
for x in range(0,101):
    if ((((((3**x)))-(((x**2)))))%(5)==0):
        print (x)

Output

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
2
4
16
18
22
24
36
38
42
44
56
58
62
64
76
78
82
84
96
98

No. of outputs

No. of outputs = 20 \boxed{20}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...