?
Solved

divisible by perfect squares

Posted on 2009-04-23
17
Medium Priority
?
310 Views
Last Modified: 2012-05-06
Find an integer n so that n, n + 1, n + 2, n + 3 are all divisible by perfect
squares.

0
Comment
Question by:AlephNought
  • 7
  • 7
  • 2
  • +1
17 Comments
 
LVL 53

Expert Comment

by:Infinity08
ID: 24214293
Any number is divisible by 1 (which is a square number), so any value for n should work, no ?
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 24214770
Is this homework or a puzzle?
What is the title of the chapter that this problem comes from?
0
 
LVL 25

Expert Comment

by:InteractiveMind
ID: 24217148
2^2 | 350
3^2 | 351
2^2 | 352

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:d-glitch
ID: 24218528
I have found several:

The smallest is   n =  157² = 24649

Others are     193²,  239²,  257²,  293²,  437²,  607²,   643²,   707²,  743²
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24218899
Mmm, we seem to be using different definitions of "perfect square". AlephNought, what's your definition of a "perfect square" ?
0
 
LVL 27

Assisted Solution

by:d-glitch
d-glitch earned 800 total points
ID: 24219116
24649 = 157²      24650 = 986 x 5²      24651 = 2739 x 3²      24652 = 6163 x 2²

57121 = 239²      57122 = 338 x 13²    57123 = 6347 x 3²      57124 = 14281 x 2²
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24219190
d-glitch, I take it your definition of "perfect square" is the square of a prime number ?

Another definition of "perfect square" is that it's the sum of two other squares (a la 5² = 4² + 3²).

Yet another definition of "perfect square" is simply a square number (which is the definition I used).

There might even be more ... but those seem to be the most common.
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 24219253
If the sqrt(N) is an integer (not necessarily a prime), then N is a perfect square.

     http://en.wikipedia.org/wiki/Square_number

0
 
LVL 53

Assisted Solution

by:Infinity08
Infinity08 earned 200 total points
ID: 24219292
Yep, that's what I used too. So, N=1 applies :

1 = 1²
2 = 1² * 2
3 = 1² * 3
4 = 2²
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 24219327
Maybe, but that seems like a trivial case.
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24219361
;) Sure. But it's a perfectly valid answer, assuming that's the definition of "perfect square" that AlephNought had in mind.
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 24219447
If this is a trick question like  "Who is buried in Grant's Tomb?"  Then your first post is correct.

Any and all sequences of four integers are divisible by 1².

But I expect there may have been some sort of error in the transcription of the problem.
0
 
LVL 20

Accepted Solution

by:
gatorvip earned 1000 total points
ID: 24219467
Interesting problem. I thought you could use the Mobius function and look for 4 consecutive numbers where mu(n_i) = 0 but I'm not sure that path leads anywhere.

Another approach is described here: http://www.marmet.org/louis/sqfgap/ and you'd be looking for numbers with L>=4. According to that site, the smallest such number is 242

242 =  2*11^2
243 = 27*3^2
244 = 61*2^2
245 = 5*7^2

0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24219469
Sounds plausible :)
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 24219486
>> Sounds plausible :)

That was in response to d-glitch's comment btw
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 24219540
I agree: gatorvip does seem to have a more elegant solution.
0
 
LVL 20

Expert Comment

by:gatorvip
ID: 24219729
Unfortunately, I wouldn't call it a solution, but more of a method to find numbers like that. When L>=4 then you have L-3 consecutive possibilities.

If L=4, the smallest such number is 242. Then the rest of the numbers in the series are 3174, 3750, ...
If L=5, the smallest such number is 844, so both 844 and 845 work. The next numbers are 1680 and 1681, which are both solutions, etc.
If L=6, the smallest such number is  22020, so you get valid answers in 22020, 22021, 22022.
      
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
This article provides a brief introduction to tissue engineering, the process by which organs can be grown artificially. It covers the problems with organ transplants, the tissue engineering process, and the current successes and problems of the tec…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question