Does there exist $a \in \mathbb{Q}$ such that $a^2 - a + 1$ is a square?

$$a^2-a+1=(a-\frac{1}{2})^2+\frac{3}{4}$$

So what you ask are there any rational numbers $u=a-\frac{1}{2}$ and $v$ such that,

$$u^2+\frac{3}{4}=v^2$$

$$v^2-u^2=\frac{3}{4}$$

$$(v-u)(v+u)=\frac{3}{4}$$

Let $x$ and $y$ be two real numbers that multiply to $\frac{3}{4}$, with the condition that $\frac{x+y}{2}$ and $\frac{y-x}{2}$ are both rational. Note that this condition equates to the condition that both $x$ and $y$ are rational.

Solving the system,

$$v-u=x$$

$$v+u=y$$

Yields the rational solutions $v=\frac{x+y}{2}$ and $u=\frac{y-x}{2}$. Which implies $a=\frac{y-x+1}{2}$.


If you restrict $v$ to be an integer. Then it must be that,

$$x+y=2v \in \mathbb{Z}$$

$$xy=\frac{3}{4}$$

Eliminating $y$ from this system gives,

$$x(2v-x)=\frac{3}{4}$$

Or,

$$4x^2-8vx+3=0$$

By the rational root theorem, the only rational solutions to the above equation are,

$$x=\pm \frac{3}{2}, \pm \frac{3}{4}, \pm 3, \pm \frac{1}{2}, \pm \frac{1}{4}, \pm 1$$

The only solutions which correspond to integer values of $v$ are $x=\pm \frac{3}{2}, \pm \frac{1}{2}$. These give $v=\pm 1$. So we have that,

$$x+y=\pm 2$$

$$xy=\frac{3}{4}$$

Solving for $x$ and $y$ leads to the conclusion that the only possible integer solutions for $a$ is $a=0$ or $a=1$.


For the record, integers $m,n$ such that $m^2-mn+n^2$ is a perfect square (integer) do exist, for instance $m=15$, $n=8$, for which $m^2-mn+n^2=169=13^2$. This is just to say that the answer to at least one unambiguous form of the question is affirmative.


An integer square multiple of one of your rational triples becomes an integer triple.

integer solutions ( with $a,b > 0$) of $a^2 - ab + b^2 = c^2$ are called Eisenstein triples, see https://en.wikipedia.org/wiki/Integer_triangle#Integer_triangles_with_a_60.C2.B0_angle_.28angles_in_arithmetic_progression.29

You would then get $$ \left( \frac{a}{b} \right)^2 - \left( \frac{a}{b} \right) + 1 = \left( \frac{c}{b} \right)^2 $$

I found an alternative parametrization: we can take $\gcd(u,v) = 1,$ also $u \neq v \pmod 3,$ then $0 < u < v,$ then take $$ a = u^2 + 2uv, \; \; b = 2uv+ v^2, \; \; c = u^2 + uv + v^2 $$

If you want $ab$ negative, you can replace $(a,b,c)$ by $(-a, -a+b,c),$ among other choices. Or, just allow $uv < 0.$ Put another way, if you begin with $a < 0, b > 0,$ replace $(a,b,c)$ by $(-a, -a+b,c)$ to get all positive. It all ends the same. If anyone can figure out the entire first line, please let me know, lyrics not posted anywhere easy to find. At about 27 seconds in, he says "A strongman from a carnival was in my dreams last night. He had an GIBBERISH and he rode upon a bike." GIBBERISH is about seconds 31-32.

           a^2 - a b + b^2 = c^2  

    c       a    b    c       u    v      c
    7       5    8    7       1    2     7 = 7
   13       7   15   13       1    3     13 = 13
   19      16   21   19       2    3     19 = 19
   31      11   35   31       1    5     31 = 31
   37      33   40   37       3    4     37 = 37
   43      13   48   43       1    6     43 = 43
   49      39   55   49       3    5     49 = 7^2
   61      56   65   61       4    5     61 = 61
   67      32   77   67       2    7     67 = 67
   73      17   80   73       1    8     73 = 73
   79      51   91   79       3    7     79 = 79
   91      19   99   91       1    9     91 = 7 * 13
   91      85   96   91       5    6     91 = 7 * 13
   97      57  112   97       3    8     97 = 97
  103      40  117  103       2    9     103 = 103
  109      95  119  109       5    7     109 = 109
  127     120  133  127       6    7     127 = 127
  133      23  143  133       1   11     133 = 7 * 19
  133      88  153  133       4    9     133 = 7 * 19
  139      69  160  139       3   10     139 = 139
  151     115  171  151       5    9     151 = 151
  157      25  168  157       1   12     157 = 157
  163      75  187  163       3   11     163 = 163
  169     161  176  169       7    8     169 = 13^2
  181     104  209  181       4   11     181 = 181
  193     175  207  193       7    9     193 = 193
  199      56  221  199       2   13     199 = 199
  211      29  224  211       1   14     211 = 211
  217     208  225  217       8    9     217 = 7 * 31
  217      87  247  217       3   13     217 = 7 * 31
  223     168  253  223       6   11     223 = 223
  229     145  264  229       5   12     229 = 229
  241      31  255  241       1   15     241 = 241
  247     203  275  247       7   11     247 = 13 * 19
  247      93  280  247       3   14     247 = 13 * 19
  259     155  299  259       5   13     259 = 7 * 37
  259      64  285  259       2   15     259 = 7 * 37
  271     261  280  271       9   10     271 = 271
  277     217  312  277       7   12     277 = 277
  283     192  325  283       6   13     283 = 283
  301     136  345  301       4   15     301 = 7 * 43
  301     279  319  301       9   11     301 = 7 * 43
  307      35  323  307       1   17     307 = 307
  313     105  352  313       3   16     313 = 313
  331     320  341  331      10   11     331 = 331
  337     272  377  337       8   13     337 = 337
  343      37  360  343       1   18     343 = 7^3
  349     111  391  349       3   17     349 = 349
  361     185  416  361       5   16     361 = 19^2
  367     315  403  367       9   13     367 = 367
  373     152  425  373       4   17     373 = 373
  379     259  435  379       7   15     379 = 379
  397     385  408  397      11   12     397 = 397
  403     333  448  403       9   14     403 = 13 * 31
  403      80  437  403       2   19     403 = 13 * 31
  409     304  465  409       8   15     409 = 409
  421      41  440  421       1   20     421 = 421
  427     123  475  427       3   19     427 = 7 * 61
  427     240  493  427       6   17     427 = 7 * 61
  433     407  455  433      11   13     433 = 433
  439     205  504  439       5   18     439 = 439
  457     287  527  457       7   17     457 = 457
  463      43  483  463       1   21     463 = 463
  469     129  520  469       3   20     469 = 7 * 67
  469     456  481  469      12   13     469 = 7 * 67
  481     215  551  481       5   19     481 = 13 * 37
  481     369  544  481       9   16     481 = 13 * 37
  487      88  525  487       2   21     487 = 487
  499     301  576  499       7   18     499 = 499
  511     264  589  511       6   19     511 = 7 * 73
  511     451  555  511      11   15     511 = 7 * 73
  523     387  595  523       9   17     523 = 523
  541     184  609  541       4   21     541 = 541
  547     533  560  547      13   14     547 = 547
  553     473  608  553      11   16     553 = 7 * 79
  553      47  575  553       1   23     553 = 7 * 79
  559     141  616  559       3   22     559 = 13 * 43
  559     440  629  559      10   17     559 = 13 * 43
  571     235  651  571       5   21     571 = 571
  577     368  665  577       8   19     577 = 577
  589     329  680  589       7   20     589 = 19 * 31
  589     559  615  589      13   15     589 = 19 * 31
  601      49  624  601       1   24     601 = 601
  607     147  667  607       3   23     607 = 607
  613     423  703  613       9   19     613 = 613
  619     245  704  619       5   22     619 = 619
  631     616  645  631      14   15     631 = 631
  637     200  713  637       4   23     637 = 7^2 * 13
  637     552  697  637      12   17     637 = 7^2 * 13
  643     517  720  643      11   18     643 = 643
  661     441  760  661       9   20     661 = 661
  673     400  777  673       8   21     673 = 673
  679     104  725  679       2   25     679 = 7 * 97
  679     611  731  679      13   17     679 = 7 * 97
  691     539  779  691      11   19     691 = 691
  703     312  805  703       6   23     703 = 19 * 37
  703      53  728  703       1   26     703 = 19 * 37
  709     159  775  709       3   25     709 = 709
  721     265  816  721       5   24     721 = 7 * 103
  721     705  736  721      15   16     721 = 7 * 103
  727     637  792  727      13   18     727 = 727
  733     600  817  733      12   19     733 = 733
  739     371  851  739       7   23     739 = 739
  751     520  861  751      10   21     751 = 751
  757      55  783  757       1   27     757 = 757
  763     165  832  763       3   26     763 = 7 * 109
  763     477  880  763       9   22     763 = 7 * 109
  769     735  799  769      15   17     769 = 769
  787     112  837  787       2   27     787 = 787
  793     385  912  793       7   24     793 = 13 * 61
  793     583  903  793      11   21     793 = 13 * 61
  811     336  925  811       6   25     811 = 811
  817     495  943  817       9   23     817 = 19 * 43
  817     800  833  817      16   17     817 = 19 * 43
  823     728  893  823      14   19     823 = 823
  829     689  920  829      13   20     829 = 829
  853     232  945  853       4   27     853 = 853
  859     560  989  859      10   23     859 = 859
  871      59  899  871       1   29     871 = 13 * 67
  871     795  931  871      15   19     871 = 13 * 67
  877     177  952  877       3   28     877 = 877
  883     715  987  883      13   21     883 = 883
  889     295  999  889       5   27     889 = 7 * 127
  889     464 1025  889       8   25     889 = 7 * 127
  907     413 1040  907       7   26     907 = 907
  919     901  936  919      17   18     919 = 919
  931     531 1075  931       9   25     931 = 7^2 * 19
  931      61  960  931       1   30     931 = 7^2 * 19
  937     183 1015  937       3   29     937 = 937
  949     305 1064  949       5   28     949 = 13 * 73
  949     696 1081  949      12   23     949 = 13 * 73
  961     649 1104  961      11   24     961 = 31^2
  967     427 1107  967       7   27     967 = 967
  973     248 1073  973       4   29     973 = 7 * 139
  973     935 1007  973      17   19     973 = 7 * 139
  991     549 1144  991       9   26     991 = 991
  997     767 1127  997      13   23     997 = 997
 1009     496 1161 1009       8   27     1009 = 1009
 1021     671 1175 1021      11   25     1021 = 1021
 1027    1008 1045 1027      18   19     1027 = 13 * 79
 1027     128 1085 1027       2   31     1027 = 13 * 79
 1033     928 1113 1033      16   21     1033 = 1033
 1039     885 1144 1039      15   22     1039 = 1039
 1051     384 1189 1051       6   29     1051 = 1051
 1057      65 1088 1057       1   32     1057 = 7 * 151
 1057     793 1200 1057      13   24     1057 = 7 * 151
 1063     195 1147 1063       3   31     1063 = 1063
 1069     744 1225 1069      12   25     1069 = 1069
 1087    1003 1155 1087      17   21     1087 = 1087
 1093     455 1247 1093       7   29     1093 = 1093
 1099     640 1269 1099      10   27     1099 = 7 * 157
 1099     915 1219 1099      15   23     1099 = 7 * 157
 1117     585 1288 1117       9   28     1117 = 1117
 1123      67 1155 1123       1   33     1123 = 1123
 1129     201 1216 1129       3   32     1129 = 1129
 1141    1121 1160 1141      19   20     1141 = 7 * 163
 1141     335 1271 1141       5   31     1141 = 7 * 163
 1147    1037 1232 1147      17   22     1147 = 31 * 37
 1147     715 1323 1147      11   27     1147 = 31 * 37
 1153     992 1265 1153      16   23     1153 = 1153
 1159     136 1221 1159       2   33     1159 = 19 * 61
 1159     469 1320 1159       7   30     1159 = 19 * 61
 1171     896 1325 1171      14   25     1171 = 1171
 1183     408 1333 1183       6   31     1183 = 7 * 13^2
 1183     603 1363 1183       9   29     1183 = 7 * 13^2
 1201    1159 1239 1201      19   21     1201 = 1201
 1213     737 1400 1213      11   28     1213 = 1213
 1231     680 1421 1231      10   29     1231 = 1231
 1237     280 1353 1237       4   33     1237 = 1237
 1249     871 1431 1249      13   27     1249 = 1249
 1261    1240 1281 1261      20   21     1261 = 13 * 97
 1261      71 1295 1261       1   35     1261 = 13 * 97
 1267    1152 1357 1267      18   23     1267 = 7 * 181
 1267     213 1360 1267       3   34     1267 = 7 * 181
 1273    1105 1392 1273      17   24     1273 = 19 * 67
 1273     560 1457 1273       8   31     1273 = 19 * 67
 1279     355 1419 1279       5   33     1279 = 1279
 1291    1005 1456 1291      15   26     1291 = 1291
 1297     497 1472 1297       7   32     1297 = 1297
 1303     952 1485 1303      14   27     1303 = 1303
 1321     639 1519 1321       9   31     1321 = 1321
 1327    1235 1403 1327      19   23     1327 = 1327
 1333      73 1368 1333       1   36     1333 = 31 * 43
 1333     840 1537 1333      12   29     1333 = 31 * 43
 1339    1139 1475 1339      17   25     1339 = 13 * 103
 1339     219 1435 1339       3   35     1339 = 13 * 103
 1351     365 1496 1351       5   34     1351 = 7 * 193
 1351     781 1560 1351      11   30     1351 = 7 * 193
 1369     511 1551 1369       7   33     1369 = 37^2
 1381     296 1505 1381       4   35     1381 = 1381
 1387    1365 1408 1387      21   22     1387 = 19 * 73
 1387     923 1595 1387      13   29     1387 = 19 * 73
 1393    1273 1488 1393      19   24     1393 = 7 * 199
 1393     657 1600 1393       9   32     1393 = 7 * 199
 1399    1224 1525 1399      18   25     1399 = 1399
 1417    1120 1593 1417      16   27     1417 = 13 * 109
 1417     592 1617 1417       8   33     1417 = 13 * 109
 1423     803 1643 1423      11   31     1423 = 1423
 1429    1065 1624 1429      15   28     1429 = 1429
 1447     152 1517 1447       2   37     1447 = 1447
 1453    1407 1495 1453      21   23     1453 = 1453
 1459     949 1680 1459      13   30     1459 = 1459
 1471     456 1645 1471       6   35     1471 = 1471
 1477    1207 1647 1477      17   27     1477 = 7 * 211
 1477     888 1705 1477      12   31     1477 = 7 * 211
 1483      77 1520 1483       1   38     1483 = 1483
 1489     231 1591 1489       3   37     1489 = 1489
 1501    1095 1711 1501      15   29     1501 = 19 * 79
 1501     385 1656 1501       5   36     1501 = 19 * 79
 1519    1496 1541 1519      22   23     1519 = 7^2 * 31
 1519     760 1749 1519      10   33     1519 = 7^2 * 31
 1531    1349 1664 1531      19   26     1531 = 1531
 1543     693 1768 1543       9   34     1543 = 1543
 1549    1241 1736 1549      17   28     1549 = 1549
 1561    1184 1769 1561      16   29     1561 = 7 * 223
 1561      79 1599 1561       1   39     1561 = 7 * 223
 1567     237 1672 1567       3   38     1567 = 1567
 1579     395 1739 1579       5   37     1579 = 1579
 1591    1064 1829 1591      14   31     1591 = 37 * 43
 1591    1491 1675 1591      21   25     1591 = 37 * 43
 1597     553 1800 1597       7   36     1597 = 1597
 1603    1387 1755 1603      19   27     1603 = 7 * 229
 1603     160 1677 1603       2   39     1603 = 7 * 229
 1609    1001 1856 1609      13   32     1609 = 1609
 1621     711 1855 1621       9   35     1621 = 1621
 1627     480 1813 1627       6   37     1627 = 1627
 1651    1155 1891 1651      15   31     1651 = 13 * 127
 1651     869 1904 1651      11   34     1651 = 13 * 127
 1657    1633 1680 1657      23   24     1657 = 1657
 1663    1533 1768 1663      21   26     1663 = 1663
 1669    1480 1809 1669      20   27     1669 = 1669
 1687    1027 1947 1687      13   33     1687 = 7 * 241
 1687    1368 1885 1687      18   29     1687 = 7 * 241
 1693     328 1833 1693       4   39     1693 = 1693
 1699    1309 1920 1699      17   30     1699 = 1699
 1723      83 1763 1723       1   41     1723 = 1723
 1729    1185 1984 1729      15   32     1729 = 7 * 13 * 19
 1729    1679 1775 1729      23   25     1729 = 7 * 13 * 19
 1729     249 1840 1729       3   40     1729 = 7 * 13 * 19
 1729     656 1961 1729       8   37     1729 = 7 * 13 * 19
   c       a    b    c        u    v      c

           a^2 - a b + b^2 = c^2