Finding elements such that none add to a perfect square

488 Views Asked by At

Bob asks us to find an infinite set $S$ of positive integers such that the sum of any finite number of distinct elements of S is not a perfect square.

Can Bob's request be fulfilled?

I can find some finite sets, and the sequence A133662 (OEIS) seems to work but I don't know if that sequence is infinite or not.

Maybe if we picked lots of elements with a common property?

2

There are 2 best solutions below

2
On

Pick a prime $p$ and consider $S_p=\{p,p^3,p^5,\cdots\}$.

Let $v_p(n)$ denote the maximal power of $p$ which divides $n$, so $v_3(18)=2$ for example.

Any finite sum of elements in $S_p$ has the form $m=p^{2a_1+1}+\cdots p^{2a_k+1}$ with $a_1<a_2<\cdots <a_k$. But we then have $$v_p\left(m\right)=v_p\left(p^{2a_1+1}+\cdots p^{2a_k+1}\right)=2a_1+1$$ which is odd, so $m$ can not be a perfect square.

1
On

Pick any sequence $a_1,a_2,\ldots$ which grows fast enough so that $a_1+a_2+\ldots a_{n-1}$ is smaller than the distance from $a_n$ up to the next perfect square (and $a_n$ should itself never be a perfect square, of course). That way, any finite sum of terms will have a largest term, and the rest of the terms in the sum won't be enough to reach the next square from there.

So, for instance, let $a_1=2$. Then we can let $a_2=5$, because the next square from $5$ is $9$, and $2+5<9$.

From here, $2+5=7$, so the next candidate for $a_3$ is $17$, as the next square up from $17$ is $25$, and you can't reach $25$ from $17$ by adding $2$ and / or $5$.

We now have $2+5+17=24$, so the next candidate is $170$, as the next square from there is $196$, and $2,5,17$ aren't large enough to reach that high.

This can continue indefinitely. The gaps between consecutive squares grow, so you can always find a large enough gap to put the next element of your sequence.