For positive integers n let S ( n ) be the number of positive integer pairs ( a , b ) such that a 2 + a + n = b 2 .
Let n k be the least positive integer for which S ( n k ) = k .
Find k = 0 ∑ 4 n k .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We can also solve this problem by treating the given equation as a quadratic in a and then by making the discriminant perfect square.
But your solution is awesome!(+1)
Log in to reply
Thanks! There still hasn't been a successful attempt of this question; I hope that my answer of 6 3 is correct.
Edit: Jon H. has just answered the question, so I'm comfortable now that my answer is correct. :)
Log in to reply
I found the same solution, and ended up with pretty much the same approach. See my posted solution. A good way to check is to run it through the computer. Here is my code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
Output:
1 2 3 4 5 6 7 8 9 10 11 |
|
(Nicely confirming your observation about n 6 < n 5 ...)
Log in to reply
@Arjen Vreugdenhil – A slight edit allows this program to find all factorizations of 4 n − 1 . Show here are n [ 4 n − 1 ] ( a , b ) [ x ⋆ y ] …
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
@Arjen Vreugdenhil – Great! Thanks for writing the program and confirming n 5 and n 6 . I see that n 9 < n 8 as well. The sequence { n k } seems to be quite random; I didn't get any hits on OEIS.
I think n5 is 79
Never mind you’re right
Normally we'd try something like b 2 − a 2 = ( b + a ) ( b − a ) , but here that would leave us with an undesirable term a . To incorporate it, we complete the square: a 2 + a = ( a + 2 1 ) 2 − 4 1 , and so n = b 2 − ( a 2 + a ) = b 2 − ( a + 2 1 ) 2 + 4 1 ∴ 4 n − 1 = ( 2 b ) 2 − ( 2 a + 1 ) 2 . We define p = 2 b and q = 2 a + 1 and so obtain 4 n − 1 = p 2 − q 2 = ( p − q ) ( p + q ) = x y .
Lemma : For every factorization of the form 4 n − 1 = x y , with x < y , the equation is satisfied with ( a , b ) = ( 4 1 ( y − x − 2 ) , 4 1 ( x + y ) ) .
Let's apply this.
Thanks for posting your solution. As you've mentioned, our approaches are similar, but your presentation is much clearer than mine.
I thought I would share my solution as my method was slightly different to the ones I found here.
Firstly, the solution to this problem (https://brilliant.org/practice/quadratic-diophantine-equations-level-2-3/) tells us that n 0 = 1 .
Since a , b > 0 , we know b > a , so b = a + k for some positive integer k. I will characterise solutions by this difference, k, considering each possible k and seeing which values of n can have solutions (a,b) with a difference of k.
Substituting b = a + k into the equation:
a 2 + a + n = ( a + k ) 2
a 2 + a + n = a 2 + 2 a k + k 2
a ( 1 − 2 k ) = k 2 − n
a = 2 k − 1 n − k 2
For this to be a valid solution, we need a to be a positive integer, so we need two things: 2 k − 1 n − k 2 is an integer, and a ≥ 1 (given this, it follows that b is also a positive integer and thus (a,b) is a solution)
k = 1
a = 1 n − 1 = n − 1 ≥ 1 so n ≥ 2 . This is always an integer since n is an integer. ( b = n )
So there is a " k = 1 " solution for n = 2 , 3 , 4 , 5 , . . .
k = 2
a = 3 n − 4 ≥ 1 so n ≥ 7 and n is 1 more than a multiple of 3.
So there is a " k = 2 " solution for n = 7 , 1 0 , 1 3 , 1 6 , . . .
k = 3
a = 5 n − 9 ≥ 1 so n ≥ 1 4 and n is 1 less than a multiple of 5.
So there is a " k = 3 " solution for n = 1 4 , 1 9 , 2 4 , 2 9 , . . . , 1 4 + 5 m , . . .
Repeating this method tells us:
" k = 4 " solutions for n = 2 3 , 3 0 , 3 7 , 4 3 , . . . , 2 3 + 7 m , . . .
" k = 5 " solutions for n = 3 4 , 4 3 , 5 2 , 6 1 , . . . , 3 4 + 9 m , . . .
" k = 6 " solutions for n = 4 7 , 5 8 , 6 9 , 8 0 , . . . , 4 7 + 1 1 m , . . .
and in general, for a given k, there is a solution when n = k 2 + m ( 2 k − 1 ) for m = 1 , 2 , 3 , . . .
Shove this in a spreadsheet and do some stuff and you'll find that
n 0 = 1
n 1 = 2
n 2 = 7
n 3 = 1 9
n 4 = 3 4 and hence ∑ k = 0 4 n k = 6 3
I'm glad you stopped there, because if you had included n 5 , I may have used n 5 = 7 9 when in fact S ( 7 9 ) = 6 so n 6 = 7 9 , while n 5 = 1 4 2
The exact same solution as mine, nice
The equation a 2 + a + n = b 2 can be written 4 n − 1 = ( 2 b + 2 a + 1 ) ( 2 b − 2 a − 1 ) Since 4 n − 1 is never a square, the number of divisors σ 0 ( 4 n − 1 ) is even, and any pair of factors 4 n − 1 = u v with u > v ≥ 1 gives a single solution a , b , except when u = v + 2 , which happens when n is a perfect square. Thus S ( n ) = { 2 1 σ 0 ( 4 n − 1 ) 2 1 σ 0 ( 4 n − 1 ) − 1 n not a square n a square Checking gives S ( 1 ) = 0 , S ( 2 ) = 1 , S ( 7 ) = 2 , S ( 1 9 ) = 3 and S ( 3 4 ) = 4 are the first occurrences of these values, so the answer is 1 + 2 + 7 + 1 9 + 3 4 = 6 3 .
Problem Loading...
Note Loading...
Set Loading...
Note first that for a ≥ 1 we have that a 2 < a 2 + a + 1 < a 2 + 2 a + 1 = ( a + 1 ) 2 , so as a 2 + a + 1 lies strictly between successive squares it cannot itself be a perfect square b 2 . So S ( 1 ) = 0 and thus n 0 = 1 .
Now a 2 + a + n = b 2 ⟹ ( a + 2 1 ) 2 − 4 1 + n = b 2 ⟹ ( 2 a + 1 ) 2 + 4 n − 1 = 4 b 2
⟹ ( 2 b ) 2 − ( 2 a + 1 ) 2 = 4 n − 1 ⟹ ( 2 b − ( 2 a + 1 ) ) ( 2 b + ( 2 a + 1 ) ) = 4 n − 1 .
Note first that for a ≥ 1 we have that 2 b + ( 2 a + 1 ) − ( 2 b − ( 2 a + 1 ) ) = 4 a + 2 ≥ 6 . So if we factor 4 n − 1 into positive integer divisor pairs ( d 1 , d 2 ) , d 1 + 6 ≤ d 2 then set d 1 = 2 b − ( 2 a + 1 ) , d 2 = 2 b + ( 2 a + 1 ) we see that d 1 + d 2 = 4 b . So we are looking for n such that 4 n − 1 has k divisor pairs where each pair ( d 1 , d 2 ) is such that ∣ d 2 − d 1 ∣ ≥ 6 and 4 ∣ ( d 2 − d 1 ) .
For n = 2 we have 4 n − 1 = 7 , for which we have precisely 1 suitable divisor pair ( d 1 , d 2 ) = ( 1 , 7 ) . Thus S ( 2 ) = 1 and n 1 = 2 .
We can then quickly work our way up integers n checking for values 4 n − 1 that have multiple divisor pairs. We first reach n = 7 , 4 n − 1 = 2 7 giving us suitable divisor pairs ( 1 , 2 7 ) and ( 3 , 9 ) , and so S ( 7 ) = 2 , n 2 = 7 .
The next level is reached with n = 1 9 , 4 n − 1 = 7 5 with suitable divisor pairs ( 1 , 7 5 ) , ( 3 , 2 5 ) and ( 5 , 1 5 ) , giving us S ( 1 9 ) = 3 , n 3 = 1 9 . Next up is n = 3 4 , 4 n − 1 = 1 3 5 with divisor pairs ( 1 , 1 3 5 ) , ( 3 , 4 5 ) , ( 5 , 2 7 ) and ( 9 , 1 5 ) , giving us S ( 3 4 ) = 4 , n 4 = 3 4 .
(I'm sure that there is a more elegant way to determine n 3 , n 4 rather than going from one integer n to the next, but factoring successive values 4 n − 1 only took a few minutes so the motivation to be more clever wasn't there. That said, the focus for n 3 is to find the first n such that 4 n − 1 has 6 divisors satisfying the divisor pair difference condition, (DPC), and for n 4 to find the first n such that 4 n − 1 has 8 divisors again satisfying the DPC.
For example, for n 3 we first reach 4 ( 1 6 ) − 1 = 6 3 = 3 2 ∗ 7 , which has 6 (positive) divisors, but one of the divisor pairs, namely ( 7 , 9 ) , does not satisfy the DPC. With 7 5 = 3 ∗ 5 2 we have the first value 4 ( 1 9 ) − 1 that has 6 divisors such that all divisor pairs satisfy the DPC, making n 3 = 1 9 . With 4 ( 3 4 ) − 1 = 1 3 5 = 3 3 ∗ 5 we have the first n such that 4 n − 1 has 8 positive divisors, and since the associated divisor pairs all satisfy the DPC we need look no further for n 4 .)
We thus have k = 0 ∑ 4 n k = 1 + 2 + 7 + 1 9 + 3 4 = 6 3 .
(Additional analysis: Curiously, I'm finding that n 5 > n 6 , with n 5 = 1 4 2 and n 6 = 7 9 .)