OFFSET
1,2
COMMENTS
Problem No. 40 from P. Erdős (see the first reference). The problem is "can we find for each positive integer k, k integers a1, a2, ..., ak such that the sums ai + aj are squares?” This problem is possible for k <= 4.
In this sequence we consider k = 3, a1 = n and a2 minimum.
LINKS
Michel Lagneau, Table of triples (n, b, c) for n = 1..1000
P. Erdős, Some unsolved problems, Publ. Inst. Hung. Acad. Sci. 6 (1961), 221-259.
P. Erdős, Quelques problèmes de théorie des nombres (in French), Monographies de l'Enseignement Mathématique, No. 6, pp. 81-135, L'Enseignement Mathématique, Université, Geneva, 1963.
EXAMPLE
Array A(n,k) begins:
[1, 8, 8]
[2, 2, 2]
[3, 22, 78]
[4, 21, 60]
[5, 20, 44]
...
Row 4 = [4, 21, 60] because 4 + 21 = 5^2, 4 + 60 = 8^2 and 21 + 60 = 9^2.
MAPLE
with(numtheory): T:=array(1..121):k:=1:nn:=121:C:=array(1..nn):for i from 1 to nn do:C[i]:=i^2:od:for n from 1 to nn do:ii:=0:for a from 1 to nn while(ii=0) do: aa:=C[a]-n: for b from 1 to nn while(ii=0) do: bb:=C[b]-n:if aa>0 and bb>0 and sqrt(aa+bb)=floor(sqrt(aa+bb)) then ii:=1:T[k]:=n: T[k+1]:=aa: T[k+2]:=bb:k:=k+3:else fi:od:od:od:print(T):
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Michel Lagneau, Jul 23 2013
STATUS
approved