Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9272729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:56:17+00:00 2026-06-18T15:56:17+00:00

I am trying to find the possible values of this expression. (a mod 2*x)-(a

  • 0

I am trying to find the possible values of this expression.

(a mod 2*x)-(a mod x)

I suspect they might be 0 or x, but I’m really not sure. I can’t seem to be able to write down a proper argument.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:56:18+00:00Added an answer on June 18, 2026 at 3:56 pm

    You are correct that the possible values are 0 and x, assuming that both a and x are positive. The logic is as follows.

    Let a have the form

    a = p*x + b
    

    Then it is easy to see that a mod x = b.

    For a mod 2*x, if p = 2*r (p is even) then

    a = 2*r*x + b = (2*x)*r + b
    

    so that a mod 2*x = b and p = 2*r + 1 (p is odd) then

    a = (2*r + 1)*x + b = 2*r*x + x + b = (2*x)*r + x + b
    

    so that a mod 2*x = x + b. Combining these results, the difference is either b - b = 0 (when p is even) or (x + b) - b = x (when p is odd).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to integrate this logic in my script but I can't really
Possible Duplicate: Find common values in multiple arrays with PHP I'm trying to find
I'm sure there's a really easy way of doing this. I'm trying to take
I think this is possible in Common Lisp (through overloading setf ), but not
I'm trying to find about ALL the possible options that I can set in
Trying to find out if it's possible to use SQLAlchemy on Heroku. Thanks.
I am trying to find out whether it is possible to start a gen_server
I am using UICatalog example and trying to find whether it is possible to
Possible Duplicate: Comparing Two Arrays Using Perl I am trying to find elements that
It's possible to create an expression tree, if you declare it as such. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.