MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Modular Arithmetic Problem?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38996] RE: [mg38975] Modular Arithmetic Problem?
  • From: "Harvey P. Dale" <hpd1 at nyu.edu>
  • Date: Fri, 24 Jan 2003 05:04:06 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

David:
	If n squared yields a five-digit answer, n must be 100 or
greater but not more than 316.  Only n's ending in 1 or 9 will produce a
square ending in 1.  Join[Range[101,316,10], Range[109,316,10]]
generates all (43) such n's.  It is simple to select from those the few
(3) that yield 0 as the second digit in their squares: Select[<list>,
IntegerDigits[#^2][[2]]== 0 &]  They are: 101, 201, and 301.  Given
how
few candidates there are to test (43), I wonder why this approach, even
though it involves "testing a list of all possible candidate numbers,"
isn't the fastest and easiest route.
	Best,
	Harvey

-----Original Message-----
From: David Park [mailto:djmp at earthlink.net]
To: mathgroup at smc.vnet.net
Subject: [mg38996] [mg38975] Modular Arithmetic Problem?

Dear MathGroup,

Steven Shippee asked me about methods of solving the following problem.

Find the numbers n such that n^2 is a five digit number with 0 in the
second
digit and 1 in the last digit. (i.e., x0xx1 where x is a digit 0..9).

We know how to solve the problem by testing a list of all possible
candidate
numbers. But is there a method that uses Solve and modular arithimetic
or
some other clever method? If one looks at the answers one would think
there
must be.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/




  • Prev by Date: Re: Asset Evolution in a binomial world (Finance)
  • Next by Date: Re: MathLink: how do I wrap and call a subroutine that should return nothing
  • Previous by thread: Re: Modular Arithmetic Problem?
  • Next by thread: perturbing a constant in Para plots