3

Find all solutions in integers to $a^2 = 3^b + 37$.

I came up with this problem myself. (I chose $37$ so there would be a relatively large solution.) But is there a nice way to approach this problem? I got that $a$ must be divisible by $4$ and that $b$ must be odd, but I couldn't progress past this. I tried making a substitution out of this, saying that $a = 4x$ and $b = 2y + 1$ but I couldn't quite get this to work.

For reference, Wolfram Alpha says there are four solutions: (a, b) = (8, 3); (-8, 3); (3788, 15); (-3788, 15)

Avery Wenger
  • 534
  • 3
  • 9

2 Answers2

0
from decimal import Decimal, getcontext

def find_values():
    results = []
    getcontext().prec = 1000  # Set precision high enough
    for b in range(1, 1000, 2):  # b must be odd, so we step by 2
        value = Decimal(3)**b + 37
        a = int(value.sqrt())
        if a % 4 == 0 and a**2 == value:
            results.append((a, b))
    return results

values = find_values()
for a, b in values:
    print(f"a = {a}, b = {b}")

if not values:
    print("No values found.")

a = 8, b = 3
a = 3788, b = 15

I think that [a = 8, b = 3] , [a = 3788, b = 15] (and it's negative values for a) are only that work for that sequence

code only gives positive values !

0

Comment: Starting from the solutions you found we may try to pridict the existence of more solutions. We may manipulate like this:

$3^b+3^3=a^2-10\Rightarrow a^2-10\geq 27$

In the case $a^2=27$ we have:

$27=3^b\Rightarrow b=3$

Which gives $(a, b)=(8, 3)$

We may also say $3\mid a^2-37$ and a is even. For searching we write:

$a=8, 10, 12, 14, 16\cdot\cdot 28\cdot\cdot\cdot$

$a^2= 64, 100, 144, 256, \cdot\cdot\cdot784$

then try to find a sequence or a progression, for example take $64$ as the first number of a progression:

$100=64+4\times 9$

$196=54+4\times 33$

$256=64+4\times 48$

$\cdot$

$\cdot$

$\cdot$

$724=64+4\times 165$

$\cdot$

$\cdot$

$\cdot$

$3788^2=64+ 4\times 3587220$

Now in the progression formula $N= a+n \cdot d$ we have $a=64$ and $d=4$ and we have to find a relation between n and N. $n$ is not the number of term or elements but it has the following sequence:

$9, 33, 48, 84, 108, 153, 165, \cdot\cdot\cdot 3587220\cdot\cdot\cdot \infty $

The number $3587220$ gives $a^2= 64+4\times 3587220=3788^2$ which gives $(a, b)(3788, 15)=15$.

That means more solutions are probable as Kodzis found in his second post.

sirous
  • 12,694