Fast Modular Arithmetic

What is the fastest way to show that 102230mod247102^2 \equiv 30\mod {247}?

#NumberTheory

Note by Axas Bit
5 years, 4 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. 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 1

paragraph 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×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

I suppose one way would be to first note that 102=12422102 = 124 - 22, and so

A=1022=(12422)2=1242222124+222=6224822248+484.A = 102^{2} = (124 - 22)^{2} = 124^{2} - 2*22*124 + 22^{2} = 62*248 - 22*248 + 484.

Now 2481(mod247)248 \equiv 1 \pmod{247} and 484=22481010(mod247)484 = 2*248 - 10 \equiv -10 \pmod{247}, so

A(62122110)(mod247)30(mod247)A \equiv (62*1 - 22*1 - 10) \pmod{247} \equiv 30 \pmod{247}.

Brian Charlesworth - 5 years, 3 months ago

Log in to reply

@Brian Charlesworth Any thoughts?

Axas Bit - 5 years, 4 months ago

Brian Charlesworth gave a standard answer. Here's an alternative approach:

Notice that 502=2500=30+2470=30+247(10)50^2 = 2500 = 30 + 2470 = 30 + 247(10) , then 1022502=(10250)(102+50)=52×152=247×(). 102^2 - 50^2 = (102 - 50)(102 + 50) = 52 \times 152 = 247 \times (\ldots ).

This tells us that 10225020(mod247)1022502(mod247)10230(mod247)102^2 - 50^2 \equiv 0 \pmod {247} \Rightarrow 102^2 \equiv 50^2 \pmod{247} \Rightarrow 10^2 \equiv 30 \pmod{247} .

Pi Han Goh - 5 years, 3 months ago

'Fastest way' should definitely be checking if 247 divides 102230102^2-30. We find that it is true very fast.

A Former Brilliant Member - 5 years, 3 months ago

Define "fastest".

In terms of no need to think about what to do: 1022=42×247+30 102^2 = 42 \times 247 + 30 .

Calvin Lin Staff - 5 years, 3 months ago
×

Problem Loading...

Note Loading...

Set Loading...