When is $x^2+9y^2 \pm y$ a perfect square

163 Views Asked by At

I have come across a problem in which it is to be determined for what values of $x$ the expression $x^2+9y^2 \pm y$ is a perfect square, i.e. $x^2+9y^2 \pm y=z^2$, for $x,y,z \in \mathbb N$

There are obvious trivial solutions, when $y=0$ and $y=x^2$, so I am interested in solutions where $0<y<x^2$. Looking at small numbers by trial and error calculation, there are some values of $x$ that give rise to no solutions, such as $x=5,10,12$. But many other values of $x$ give rise to one or more solutions, including $(x,y,z)=(4,3,10),(8,9,28),(20,23,72),(20,36,110),(20,57,172)$, etc.

I have included the tag Pythagorean triples because when $9y^2$ is viewed as $(3y)^2$ the equation resembles a variation of the Pythagorean equation, and some students of that relationship may have insights. I am unaware of any tools to analyze the equation of interest, $x^2+9y^2 \pm y=z^2$ with regard to what values of $x$ do or do not give rise to solutions.

My questions are: Are there methods to decide what values of $x$ will give rise to solutions? And, more specifically, is there a value of $x$, call it $x_m$, such that for all $x>x_m$, solutions can be found?

I am extremely embarrassed to have posted essentially the same question twice (see link in comments). The reason I find this question to be so important (and I arrived at it twice in my pursuits) is because the statement "There are infinitely many values of $x$ for which the expression $x^2+9y^2 \pm y$ cannot be a perfect square" (for $y$ within the range specified) is equivalent to the statement "The twin prime conjecture is true." The demonstration of that claim is lengthy and goes far afield beyond the specific question posed, but if proof thereof is demanded, I can append it in a further addition to this question.

3

There are 3 best solutions below

0
On

To big for a comment

For $\quad x^2+9y^2-y=z^2\quad$ the pattern appears to be $\quad (x,y,z)=(x,x^2,3x^2).\quad$

This means there is no case where $\,y<x^2.\quad$ For example, a spreadsheet reveals these values

$$(x,y,z)\in\big\{(1,1,3),(2,4,12),(3,9,27), (4,16,48),(5,25,75),(7,49,147),\cdots\big\}$$

For $\quad x^2+9y^2+y=z^2\quad$ the nearest thing to a pattern, given limited examples, appears to be that $\,z=3y+c\,$ where $\,c\in\mathbb{N}$

For example:

$$(x,y,z)\in\big\{ (4,3,10),(6,7,22),(9,7,23),(9,16,49), (11,24,73),(13,15,47),(14,11,36), (14,39,118),(16,51,154),(19,15,49), (19,72,217),(20,3,22),(20,23,72), (20,36,110),(21,88,265),(24,7,32), (24,19,62),(24,52,158),(24,115,346) \big\}$$

These are in ascending order of $\,x.\quad$ Perhaps you can find a pattern among these values that I did not.

0
On

CW I put an answer at the earlier incarnation that Jyrki found
When are numbers of the form $m^2+9k^2\pm k$ perfect squares?

Short version: integers $ad - bc = \pm 1.$ $$ m = \frac{ac-bd}{6}$$ $$ k = \frac{ \left| \frac{a^2 - b^2 - c^2 + d^2}{2} \right| \pm 1}{18} $$ $$ z= \frac{a^2 - b^2 + c^2 - d^2}{12} $$

Fri 24 Nov 2023 01:42:59 PM PST
-------------------------------------------------
    m    k    z              a    b    c    d  
-------------------------------------------------
    1    1    3              6    1    1    0
    4    3   10             14    9    3    2
    6    5   16             21   16    4    3
    6    7   22             22   15    3    2
    8    9   28             27   20    4    3
    9   16   49             32   21    3    2
    9    7   23             29   24    6    5
   11   24   73             40   27    3    2
   11    9   29             36   31    7    6
   13   15   47             43   36    6    5
   13   24   73             45   34    4    3
   14   11   36             44   39    9    8
   14   39  118             50   33    3    2
   15   17   53             48   41    7    6
   15   32   97             51   38    4    3
   16   13   42             51   46   10    9
   16   51  154             58   39    3    2
   19   15   49             59   54   12   11
   19   72  217             68   45    3    2
   20   23   72             64   57    9    8
   20    3   22             14    3    9    2
   20   36  110             65   54    6    5
   20   57  172             69   52    4    3
   21   17   55             66   61   13   12
   21   88  265             76   51    3    2
   22   25   78             69   62   10    9
   22   69  208             75   56    4    3
   24  115  346             86   57    3    2
   24   19   62             74   69   15   14
   24   44  134             78   67    7    6
   24   52  158             79   66    6    5
   24    7   32             20    9    9    4
   24    9   36             21    8    8    3
   26  135  406             94   63    3    2
   26   21   68             81   76   16   15
   27  104  313             93   70    4    3
   27   31   97             85   78   12   11
   28   60  182             90   77    7    6
   29  120  361             99   74    4    3
   29   23   75             89   84   18   17
   29   33  103             90   83   13   12
   31   16   57             27   10    8    3
   31   25   81             96   91   19   18
   31   56  171             98   87    9    8
   31   87  263            101   84    6    5
   31    9   41             24   13   11    6
   34   32  102             35    6    6    1
   34    4   36             24   17   17   12
   36   36  114             37    6    6    1
   36    4   38             25   18   18   13
   41   15   61             31   18   12    7
   41   16   63             27    8   10    3
   41   24   83             34   15    9    4
   41    9   49             24   11   13    6
   48   16   68             29   12   12    5
   50   11   60             28   15   15    8
   50   25   90             33   10   10    3
   54   28  100             41   24   12    7
   54   32  110             42   23   11    6
   54    5   56             21    4   16    3
   54    7   58             22    3   15    2
   57   40  133             40    9    9    2
   57    9   63             30   19   19   12
   69  135  411             71   12    6    1
   69    8   73             45   38   32   27
   71  143  435             73   12    6    1
   71   24  101             39   22   16    9
   71   39  137             43   18   12    5
   71    8   75             46   39   33   28
   79  112  345             69   26    8    3
   79   15   91             31   12   18    7
   79   23  105             53   42   24   19
   79   24  107             34    9   15    4
   86  133  408             75   28    8    3
   86   25  114             57   46   26   21
   88    9   92             27    4   20    3
   89  120  371             74   33    9    4
   89   33  133             60   47   23   18
   92   36  142             49   30   18   11
   92   60  202             54   25   13    6
   97  120  373             68   15    9    2
   97   15  107             47   36   30   23
  104   12  110             66   59   47   42
  104   57  200             57   32   16    9
  106   12  112             67   60   48   43
  106  171  524             88   39    9    4
  106   39  158             70   57   27   22
  111  104  331             81   52   14    9
  111   16  121             32    3   21    2
  111   55  199             59   36   18   11
  111    7  113             29    6   24    5
  111   72  243             62   33   15    8
  111   81  267             78   55   17   12
  116  156  482             90   49   11    6
  116   60  214             78   61   23   18
  119  120  379             87   56   14    9
  119   24  139             39   16   22    9
  119   32  153             44   21   21   10
  119   39  167             43   12   18    5
  119   49  189             48   17   17    6
  119   87  287             83   60   18   13
  130   25  150             45   26   26   15
  130   75  260             56   15   15    4
  132  189  582             87   26   10    3
  132   29  158             63   50   34   27
  134   21  148             63   52   40   33
  134  231  706             94   21    9    2
  134   36  172             48   25   23   12
  134   39  178             86   75   39   34
  134   64  234             54   19   17    6
  136   80  276             91   72   24   19
  139   16  147             87   80   62   57
  139   72  257             92   75   27   22
  141  135  429             71    6   12    1
  141   16  149             88   81   63   58
  141  216  663             93   28   10    3
  141   31  169             67   54   36   29
  141   41  187             90   79   41   36
  141    8  143             45   32   38   27
  145  143  453             73    6   12    1
  145    8  147             46   33   39   28
  149   88  303             99   80   26   21
  150   28  172             41   12   24    7
  150   32  178             42   11   23    6
  154   36  188             48   23   25   12
  154   57  230             99   86   38   33
  154   64  246             54   17   19    6
  160  112  372             84   53   19   12
  167  120  397             68    9   15    2
  167  144  463             75   16   14    3
  167   15  173             47   30   36   23
  167  231  713            101   42   12    5
  167   25  183             54   37   35   24
  167   56  237             80   63   33   26
  171   40  209             52   27   27   14
  171   81  297             60   19   19    6
  174   27  192             80   69   51   44
  174   68  268             84   65   31   24
  179   24  193             40    3   27    2
  179    9  181             36    7   31    6
  180  100  350             65   18   18    5
  180   36  210             53   30   30   17
  190   64  270             90   73   37   30
  193  144  473             75   14   16    3
  193   25  207             54   35   37   24
  196  132  442             77   30   18    7
  196   60  266             66   41   29   18
  207  224  703             93   20   14    3
  207   31  227             65   48   42   31
  211   33  233             96   85   61   54
  212   36  238             49   18   30   11
  212   60  278             54   13   25    6
  222  135  462             82   39   21   10
  222   91  352             76   45   27   16
  251  120  439             86   51   27   16
  251  153  523             90   47   23   12
  253   15  257             43    6   36    5
  253   24  263             45    4   34    3
  274   11  276             44    9   39    8
  274   39  298             50    3   33    2
  275   25  285             72   55   55   42
  280   57  328             57   16   32    9
  284   16  288             84   71   71   60
  284  189  634             93   38   22    9
  284   93  398             81   50   34   21
  286  121  462             75   26   26    9
  286   75  364             68   33   33   16
  288   16  292             85   72   72   61
  288   55  332             88   69   51   40
  295  111  445             95   66   36   25
  295  112  447             69    8   26    3
  295   23  303             53   24   42   19
  301   39  323             79   60   54   41
  303  224  737             93   14   20    3
  303   31  317             65   42   48   31
  309  144  531             81   28   26    9
  309   81  393             72   37   35   18
  320   12  322             66   47   59   42
  321   17  325             48    7   41    6
  321   32  335             51    4   38    3
  321   55  361             59   18   36   11
  321   72  387             62   15   33    8
  326   12  328             67   48   60   43
  326   21  332             63   40   52   33
  326  231  766             94    9   21    2
  327  136  523             94   57   33   20
  337  120  493             81   38   32   15
  337  135  527             83   36   30   13
  339  144  549             81   26   28    9
  339   81  417             72   35   37   18
  343  225  757             96   25   23    6
  343   64  393             75   46   44   27
  346  133  528             75    8   28    3
  346   25  354             57   26   46   21
  353  105  473             96   67   43   30
  364  132  538             77   18   30    7
  364  169  624             87   28   28    9
  364   60  406             66   29   41   18
  364   87  448             76   39   39   20
  371   49  399             78   53   53   36
  372  189  678             87   10   26    3
  372   29  382             63   34   50   27
  376   13  378             51   10   46    9
  376   51  406             58    3   39    2
  377  225  773             96   23   25    6
  377   64  423             75   44   46   27
  377   80  447             82   51   45   28
  388   35  402             98   81   75   62
  394  140  576             91   48   36   19
  394  192  698             97   42   30   13
  401  120  539             74    9   33    4
  401   33  413             60   23   47   18
  415  143  597             89   42   36   17
  415  168  653             92   39   33   14
  421   39  437             79   54   60   41
  429  216  777             93   10   28    3
  429   31  439             67   36   54   29
  433  120  563             81   32   38   15
  433  135  593             83   30   36   13
  440   64  480             84   55   55   36
  478  165  688             99   52   40   21
  479   49  501             96   73   71   54
  479   63  515             97   72   66   49
  487   80  543             82   45   51   28
  498  135  642             82   21   39   10
  498   91  568             76   27   45   16
  509   15  511             59   12   54   11
  509   72  553             68    3   45    2
  521  143  675             89   36   42   17
  521  168  725             92   33   39   14
  525  136  665             92   45   45   22
  529   49  549             96   71   73   54
  546   27  552             80   51   69   44
  548   35  558             98   75   81   62
  556  144  704             96   49   47   24
  556  189  794             93   22   38    9
  556   93  622             81   34   50   21
  566  171  764             88    9   39    4
  566   39  578             70   27   57   22
  571   16  573             87   62   80   57
  579   16  581             88   63   81   58
  580   36  590             65    6   54    5
  596  144  736             96   47   49   24
  596   23  600             64    9   57    8
  596   57  620             69    4   52    3
  614  140  744             91   36   48   19
  614  192  842             97   30   42   13
  625   63  653             97   66   72   49
  629  152  777            100   51   51   26
  645   17  647             66   13   61   12
  645   88  697             76    3   51    2
  659  120  751             86   27   51   16
  659  153  803             90   23   47   12
  672   55  692             88   51   69   40
  681  104  749             81   14   52    9
  681   81  723             78   17   55   12
  697  231  983            101   12   42    5
  697   56  717             80   33   63   26
  698   25  702             69   10   62    9
  698   69  728             75    4   56    3
  704  112  780             84   19   53   12
  718  165  872             99   40   52   21
  724  156  862             90   11   49    6
  724   60  746             78   23   61   18
  783  136  883             94   33   57   20
  786   68  812             84   31   65   24
  791  120  869             87   14   56    9
  791   87  833             83   18   60   13
  811   33  817             96   61   85   54
  816  115  886             86    3   57    2
  816   19  818             74   15   69   14
  854   39  862             86   39   75   34
  857  105  913             96   43   67   30
  864   44  874             78    7   67    6
  864   52  878             79    6   66    5
  895  111  955             95   36   66   25
  910   64  930             90   37   73   30
  939   41  947             90   41   79   36
  986  135 1066             94    3   63    2
  986   21  988             81   16   76   15
 1016   80 1044             91   24   72   19
 1051   72 1073             92   27   75   22
 1083  104 1127             93    4   70    3
 1083   31 1087             85   12   78   11
 1148   60 1162             90    7   77    6
 1195   23 1197             89   18   84   17
 1210   57 1222             99   38   86   33
 1219  120 1271             99    4   74    3
 1219   33 1223             90   13   83   12
 1229   88 1257             99   26   80   21
 1399   25 1401             96   19   91   18
 1409   56 1419             98    9   87    8
 1409   87 1433            101    6   84    5
-------------------------------------------------
    m    k    z              a    b    c    d  
-------------------------------------------------
0
On

This is a long comment.

Let $z = 3y+m$ as poetasis pointed out.

Case: $x^2+9y^2+y=z^2$

We get $y= \frac{x^2-m^2}{-1+6m}.$

Taking $x+m=(-1+6m)n$, then we get $$(x,y,z)=((-1+6m)n-m, (-1+6m)n^2-2nm, 3(-1+6m)n^2-6nm+m)$$ $m,n$ are positive integers.

For $n=1$ and $m=1 \cdots 10$, we get $$(x,y,z)=(4, 3, 10), (9, 7, 23), (14, 11, 36), (19, 15, 49), (24, 19, 62), (29, 23, 75), (34, 27, 88), (39, 31, 101), (44, 35, 114), (49, 39, 127).$$

Next, taking $x-m=(-1+6m)n$, then we get $$(x,y,z)=((-1+6m)n+m, (-1+6m)n^2+2nm, 3(-1+6m)n^2+6nm+m)$$ For $n=1$ and $m=1 \cdots 10$, we get $$(x,y,z)=(6, 7, 22), (13, 15, 47), (20, 23, 72), (27, 31, 97), (34, 39, 122), (41, 47, 147), (48, 55, 172), (55, 63, 197), (62, 71, 222), (69, 79, 247).$$

Case: $x^2+9y^2-y=z^2$

Similarly, we can get a parametric solution.