# duplicate hunting, pt. 13

Andrew Plewe aplewe at sbcglobal.net
Thu May 10 00:34:58 CEST 2007

```Nick Hobson wrote:

> Suppose p and q are consecutive primes.  Let
>
>    a = sqrt((p^2 + q^2)/2 - 1).   (1)
>
> It is easy to see that if q = p + 2 then a is an integer.  Is the converse
> true?
>
> If we consider the smallest prime q > p + 2 which makes a an integer, we
> generate the following sequence, where 0 is used if there is no such q:
>
> 11, 263, 59, 23, 101, 109, 0, 151, 193, 79, 269, 277, 311, 0, 179, 83,
> 83003, 479, 487, 181, 563, 571, 613, 1201, 157, 141509, 739, 773, 479

Don Reble replied:

> I get p=19,q=1278886952463697; p=127,q=6858037981;
> but I find no q for p=47.

There is no q for p=47.  For this case, (1) simplifies to the Pell-type
equation

q^2 - 2 a^2 = -2207.                                                (2)

I claim that for every integer solution of this, q is divisible by either
3, 5, 7, or 11, so it can't be prime.

Equation (2) describes a hyperbola.  Given one point (q,a) on the a>0
branch, we can construct infinitely many others (q', a') on the same branch
by writing

q' + a' sqrt(2) = (q + a sqrt(2)) (3 + 2 sqrt(2))^n                 (3)

where n is an integer.  Every point on the a>0 branch is equivalent in this
way to exactly one with  -q < a <= q.  Combining that inequality with
equation (2) implies  33 < sqrt(2207/2) <= a <= sqrt(2207) < 47.  Checking
the values of a in that range produces just two integer solutions:
(q,a) = (45,46)  and  (q,a) = (-45,46).  So every integer solution of (2)
with a>0 is given by

(q,a) = (45 + 46 sqrt(2)) (3 + 2 sqrt(2))^n                         (4)
or
(q,a) = (-45 + 46 sqrt(2)) (3 + 2 sqrt(2))^n                        (5)

for some integer n.  Note that

(3 + 2 sqrt(2))^12 = 768398401 + 543339720 sqrt(2)

= 1 + 1155 (665280 + 470424 sqrt(2))

So if

q' + a' sqrt(2) = (q + a sqrt(2)) (3 + 2 sqrt(2))^12                (6)

then q' == q (mod 1155).  Note that 1155 = 3*5*7*11.  So to verify that the
q's given by (4) and (5) are always divisible by 3, 5, 7, or 11, it suffices
to check 12 consecutive values in each sequence:

n     q from (4)     a from (4)     q is divisible by
-----------------------------------------------------
0     45             46             3, 5
1     319            228            11
2     1869           1322           3, 7
3     10895          7704           5
4     63501          44902          3
5     370111         261708         7
6     2157165        1525346        3, 5
7     12572879       8890368        11
8     73280109       51816862       3, 7
9     427107775      302010804      5
10    2489366541     1760247962     3
11    14509091471    10259476968    7

n     q from (5)    a from (5)      q is divisible by
-----------------------------------------------------
0     -45           46              3, 5
1     49            48              7
2     339           242             3
3     1985          1404            5
4     11571         8182            3, 7
5     67441         47688           11
6     393075        277946          3, 5
7     2291009       1619988         7
8     13352979      9441982         3
9     77826865      55031904        5
10    453608211     320749442       3, 7
11    2643822401    1869464748      11

So q is never prime.

Dean Hickerson
dean at math.ucdavis.edu

Jon Schoenfield wrote today asking a question that I think Magma
could answer - maybe someone could help?
[Becuase these questions reduce to finding integer solutions
to cubic equations.]
Neil

>From jonscho at hiwaay.net  Wed May  9 20:16:01 2007
>From: "Jon Schoenfield" <jonscho at hiwaay.net>
>To: <njas at research.att.com>, <zakseidov at yahoo.com>,
>   "Camillia Smith Barnes" <cammie at math.harvard.edu>
>Subject: FYI:  Conjecture re A116108, A116145, et al.
>Date: Wed, 9 May 2007 19:15:43 -0500
>
>Regarding A116108 ("Squares that are equal to the sum of 3 consecutive
>cubes"), A116145 ("Squares that are equal to the sum of 5 consecutive
>cubes"), and similar sequences that could be defined as "Squares that are
>equal to the sum of 2k+1 consecutive cubes" (for a given positive integer
>k), I suspect that each of the sequences is finite and very short, although
>I don't know how to prove it....
>
>If we define c as the central value to be cubed, so that, e.g., in A116108,
>each value in the sequence can be written as
>
>(c-1)^3 + c^3 + (c+1)^3 = 3c^3 + 6c = 3c(c^2 + 2)
>
>(so c-1 equals the variable "m" in A116108's Comment field), then the
>sequence's terms, 0, 9, 36, and 41616, correspond to c = 0, 1, 2, and 24.
>After an exhaustive search up through c = 4*10^8, I can say that the next
>term exceeds 1.92*10^26 -- if it exists at all, which I doubt, but can't
>prove ....
>
>Defining c similarly in A116145 (so c-2 = m) gives
>
>(c-2)^3 + ... + (c+2)^3 = 5c^3 + 30c = 5c(c^2 + 6)
>
>and the sequence's terms, 0, 100, 225, 99225, 4708900, 8643600, correspond
>to c = 0, 2, 3, 27, 98, and 120.
>
>Having run similar tests for squares that are equal to the sum of 2k+1
>consecutive cubes (for positive integer values of k), and noting that
>
>(c-k)^3 + ... + (c+k)^3 = ... = (2k+1)c(c^2 + 2k(2k+1)(2k+2))
>
>it looks to me as though, for _most_ values of k, there will exist only four
>values in the sequence (as I believe is the case for A116108):  the ones
>corresponding to c = 0, k, k+1, and 2k(2k+1)(2k+2).  The only exceptions
>I've found (through k = 50) are as follows (and if there's any kind of
>pattern here, I haven't yet figured it out):
>
>    k = 2:  c = 27, 98    (as noted above)
>    k = 6:  c = 150
>    k = 7:  c = 32, 57967
>    k = 8:  c = 17, 128
>    k = 10:  c = 24, 154
>    k = 16:  c = 49
>    k = 17:  c = 242
>    k = 19:  c = 130
>    k = 22:  c = 198
>    k = 28:  c = 1653
>    k = 31:  c = 4, 248, 868, 1152
>    k = 34:  c = 115
>    k = 36:  c = 16900, 26973
>    k = 38:  c = 182
>    k = 43:  c = 275
>    k = 45:  c = 4830
>    k = 48:  c = 23716, 33708
>
(end)

At 4:43 PM -0700 5/9/07, Dean Hickerson wrote:
>Nick Hobson wrote:
>
>> Suppose p and q are consecutive primes.  Let
>>
>>    a = sqrt((p^2 + q^2)/2 - 1).   (1)
>>
>> It is easy to see that if q = p + 2 then a is an integer.  Is the converse
>> true?
>>
>> If we consider the smallest prime q > p + 2 which makes a an integer, we
>> generate the following sequence, where 0 is used if there is no such q:
>>
>> 11, 263, 59, 23, 101, 109, 0, 151, 193, 79, 269, 277, 311, 0, 179, 83,
>> 83003, 479, 487, 181, 563, 571, 613, 1201, 157, 141509, 739, 773, 479
>
>Don Reble replied:
>
>> I get p=19,q=1278886952463697; p=127,q=6858037981;
>> but I find no q for p=47.
>
>There is no q for p=47.  For this case, (1) simplifies to the Pell-type
>equation
>
>    q^2 - 2 a^2 = -2207.                                                (2)
>
>I claim that for every integer solution of this, q is divisible by either
>3, 5, 7, or 11, so it can't be prime.
>
>Equation (2) describes a hyperbola.  Given one point (q,a) on the a>0
>branch, we can construct infinitely many others (q', a') on the same branch
>by writing
>
>    q' + a' sqrt(2) = (q + a sqrt(2)) (3 + 2 sqrt(2))^n                 (3)
>
>where n is an integer.  Every point on the a>0 branch is equivalent in this
>way to exactly one with  -q < a <= q.  Combining that inequality with
>equation (2) implies  33 < sqrt(2207/2) <= a <= sqrt(2207) < 47.  Checking
>the values of a in that range produces just two integer solutions:
>(q,a) = (45,46)  and  (q,a) = (-45,46).  So every integer solution of (2)
>with a>0 is given by
>
>    (q,a) = (45 + 46 sqrt(2)) (3 + 2 sqrt(2))^n                         (4)
>or
>    (q,a) = (-45 + 46 sqrt(2)) (3 + 2 sqrt(2))^n                        (5)
>
>for some integer n.  Note that
>
>    (3 + 2 sqrt(2))^12 = 768398401 + 543339720 sqrt(2)
>
>                       = 1 + 1155 (665280 + 470424 sqrt(2))
>
>So if
>
>    q' + a' sqrt(2) = (q + a sqrt(2)) (3 + 2 sqrt(2))^12                (6)
>
>then q' == q (mod 1155).  Note that 1155 = 3*5*7*11.  So to verify that the
>q's given by (4) and (5) are always divisible by 3, 5, 7, or 11, it suffices
>to check 12 consecutive values in each sequence:
>
>n     q from (4)     a from (4)     q is divisible by
>-----------------------------------------------------
>0     45             46             3, 5
>1     319            228            11
>2     1869           1322           3, 7
>3     10895          7704           5
>4     63501          44902          3
>5     370111         261708         7
>6     2157165        1525346        3, 5
>7     12572879       8890368        11
>8     73280109       51816862       3, 7
>9     427107775      302010804      5
>10    2489366541     1760247962     3
>11    14509091471    10259476968    7
>
>n     q from (5)    a from (5)      q is divisible by
>-----------------------------------------------------
>0     -45           46              3, 5
>1     49            48              7
>2     339           242             3
>3     1985          1404            5
>4     11571         8182            3, 7
>5     67441         47688           11
>6     393075        277946          3, 5
>7     2291009       1619988         7
>8     13352979      9441982         3
>9     77826865      55031904        5
>10    453608211     320749442       3, 7
>11    2643822401    1869464748      11
>

Dean, I agree with your analysis.  Don Reble and I have been working on
this problem off-list.  I have computed a 1000 terms and Don has computed
even more.  I have done all my work with recursive equations instead of the
radicals you use.  For instance, after the q(0) and q(1) terms are known,
the second column of your tables can be computed using the recursion

To prove that there is no possible solution for a prime such as 47, only
the first 6 terms need to be computed.  Using this method, it can be shown
that there is no possible solution for the primes 47, 443, 1867, 6883,
13417, and 13907.

Tony

```