• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

divisible by perfect squares

Find an integer n so that n, n + 1, n + 2, n + 3 are all divisible by perfect
squares.

0
AlephNought
Asked:
AlephNought
  • 7
  • 7
  • 2
  • +1
3 Solutions
 
Infinity08Commented:
Any number is divisible by 1 (which is a square number), so any value for n should work, no ?
0
 
d-glitchCommented:
Is this homework or a puzzle?
What is the title of the chapter that this problem comes from?
0
 
InteractiveMindCommented:
2^2 | 350
3^2 | 351
2^2 | 352

0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
d-glitchCommented:
I have found several:

The smallest is   n =  157² = 24649

Others are     193²,  239²,  257²,  293²,  437²,  607²,   643²,   707²,  743²
0
 
Infinity08Commented:
Mmm, we seem to be using different definitions of "perfect square". AlephNought, what's your definition of a "perfect square" ?
0
 
d-glitchCommented:
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
 
Infinity08Commented:
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
 
d-glitchCommented:
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
 
Infinity08Commented:
Yep, that's what I used too. So, N=1 applies :

1 = 1²
2 = 1² * 2
3 = 1² * 3
4 = 2²
0
 
d-glitchCommented:
Maybe, but that seems like a trivial case.
0
 
Infinity08Commented:
;) Sure. But it's a perfectly valid answer, assuming that's the definition of "perfect square" that AlephNought had in mind.
0
 
d-glitchCommented:
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
 
gatorvipCommented:
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
 
Infinity08Commented:
Sounds plausible :)
0
 
Infinity08Commented:
>> Sounds plausible :)

That was in response to d-glitch's comment btw
0
 
d-glitchCommented:
I agree: gatorvip does seem to have a more elegant solution.
0
 
gatorvipCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 7
  • 7
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now