All positive integers $a,b$ such that $a^2+b \mid b^2+a$

How can one find all positive integers $a,b$ such that $a^2+b \mid b^2+a$?

-
@NUm: Yes, not only that. The source seems to missing. And I am guessing he already knows the solution. (I was about to write a comment asking for that info...) – Aryabhata Apr 8 '11 at 15:07
@Moron @Numth This posts are starting to look a lot like Chandru1's posts in the past. – Adrián Barquero Apr 8 '11 at 17:26
@Adrian: Very true... I guess we can point Amir to the meta threads present already. – Aryabhata Apr 8 '11 at 17:29
@Moron Yes, I think that would be a good idea. – Adrián Barquero Apr 8 '11 at 17:31
Here are a couple of threads about asking questions whose answers you already know/asking puzzles: Questions whose answers are known to OP and Are puzzles on-topic. Please also see How to ask a Good question – Aryabhata Apr 8 '11 at 20:13

1 Answer

First of all, as already noted, $a\le b$. Next, since $b^2+a=(b-a^2)(b+a^2)+a+a^4$, it follows that $a^2+b$ must divide $a^4+a$. We see then that given $a\ge1$, if a positive integer $b$ is such that $a^2+b\mid b^2+a$, then $b=d-a^2$, where $d$ is a divisor of $a^4+a$ greater than $a^2$. For instance, $b=a^4-a^2+a$ is a solution for all $a\in\mathbb{N}$.

A one-liner in Mathematica to compute all the $b$'s for a given $a$ is

f[a_] := Select[Divisors[a + a^4]-a^2, Positive]


Some examples:

a=2 ; b -> {2,5,14}
a=3 ; b -> {3,5,12,19,33,75}
a=4 ; b -> {4,10,36,49,114,244}
a=5 ; b -> {5,10,17,20,38,45,65,80,101,185,290,605}
a=6 ; b -> {6,26,57,150,181,398,615,1266}
a=7 ; b -> {7,37,123,252,295,553,1155,2359}
a=8 ; b -> {8,12,44,50,88,107,152,164,278,392,449,620,962,1304,1988,4040}
a=9 ; b -> {9,65,138,284,357,576,649,1014,1233,2109,3204,6489}
a=10 ; b -> {10,30,43,54,82,186,285,355,615,670,810,901,1330,1902,4905,9910}


One obvious question to ask is ¿how many solutions are there for a given $a$? Here are the first numbers in the sequence:

Table[Length[f[a]], {a, 2, 100}]

{3, 6, 6, 12, 8, 8, 16, 12, 16, 18, 24, 8, 24, 20, 10, 32,
12, 24, 36, 16, 8, 36, 48, 12, 40, 48, 12, 24, 32, 36, 36, 32, 16,
48, 36, 16, 48, 32, 32, 24, 16, 24, 48, 48, 16, 60, 60, 36, 72, 24,
24, 20, 64, 32, 96, 32, 8, 72, 24, 16, 64, 42, 56, 96, 32, 12, 108,
96, 16, 32, 24, 16, 36, 144, 24, 48, 16, 20, 180, 20, 32, 36, 96, 32,
24, 64, 64, 64, 48, 24, 36, 32, 32, 144, 48, 24, 48, 108, 18}

-
I think that sequence is just $\tau(a^4+a)/2$, half the number of factors of $a^4+a.$ – Thomas Andrews Apr 8 '11 at 19:46
Whoops, wrong, it's equal to the number of factors of $a^4+a$ that are less than $a^2-a+1$. This might often equal my result, but not always. – Thomas Andrews Apr 8 '11 at 19:50
Okay, I think that there is a way to prove that there are no factors of $a^4+a$ greater than $a^2-a+1$ and less than $\sqrt{a^4+a}<a^2+1$, so my original count, $\frac{\tau(a^4+a)}{2}$, should be correct – Thomas Andrews Apr 8 '11 at 20:16
It's simpler to work with the conjugates $\rm\ b' = k - b = a\:(1-ab)/(a+b^2)\:.\:$ E.g. for $\rm\ a = 7\$ we have $\rm\: -b' = \{6, 21, 35, 41, 42, 45, 47, 48 = a^2-1\}$ versus the more complicated $\rm\ \ \ b\ =\: \{7,37,123,252,295,553,1155,2359\}\:.$ – Bill Dubuque Apr 8 '11 at 23:09