×

# Other Approach.?

Hello friends, I solved this question but I want to know other method which u think will be the shortest method. Find the number of positive integral values of $$x \leq 100$$ such that $$3^{x} - x^{2}$$ is divisible by 5.I think answer is 20.

Note by Kiran Patel
4 years, 6 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

We are looking for the values of $$x$$ such that $$3^x-x^2=5k$$ with $$k\in\mathbb{Z}$$, or $$3^x \equiv x^2 \pmod{5}$$. The sequence $$a_x = 3^x \pmod{5}$$ for $$1 \leq x \leq 100$$ is $$3,4,2,1,3,4,2,1,\dots$$ with a period of 4. The sequence $$b_x = x^2 \pmod{5}$$ for $$1 \leq x \leq 100$$ is $$1,4,4,1,0,1,4,4,1,0,\dots$$ with a period of 5. So, if $$3^x \equiv x^2 \pmod{5} \implies a_x=b_x$$, then either $$a_x=b_x=1$$ or $$a_x=b_x=4$$.

Case 1: $$a_x=b_x=1$$. $$a_x = 1$$ whenever $$x \equiv 0 \pmod{4}$$ and $$b_x = 1$$ whenever $$x \equiv 1 \pmod{5}$$ or $$x \equiv 4 \pmod{5}$$.

$$\bullet$$ Case 1a) $$x \equiv 0 \pmod{4}$$ and $$x \equiv 1 \pmod{5} \implies x \equiv 16 \pmod{20} \implies x \in \{16,36,56,76,96\}$$.

$$\bullet$$ Case 1b) $$x \equiv 0 \pmod{4}$$ and $$x \equiv 4 \pmod{5} \implies x \equiv 4 \pmod{20} \implies x \in \{4,24,44,64,84\}$$.

Case 2: $$a_x=b_x=4$$. $$a_x = 4$$ whenever $$x \equiv 2 \pmod{4}$$ and $$b_x = 4$$ whenever $$x \equiv 2 \pmod{5}$$ or $$x \equiv 3 \pmod{5}$$.

$$\bullet$$ Case 2a) $$x \equiv 2 \pmod{4}$$ and $$x \equiv 2 \pmod{5} \implies x \equiv 2 \pmod{20} \implies x \in \{2,22,42,62,82\}$$.

$$\bullet$$ Case 2b) $$x \equiv 2 \pmod{4}$$ and $$x \equiv 3 \pmod{5} \implies x \equiv 18 \pmod{20} \implies x \in \{18,38,58,78,98\}$$.

So, $$x \in \{ 2,4,16,18,22,24,36,38,42,44,56,58,62,64,76,78,82,84,96,98 \}$$, which are indeed 20 values.

- 4 years, 6 months ago

I did the same but I want any other short method.Thanks for ur efforts......

- 4 years, 6 months ago