|
|
A224875
|
|
Array A(n,k), n > 0, k=1,2,3, read by rows such that A(n,i) + A(n,j) is a square for i <> j with A(n,1) = n.
|
|
1
|
|
|
1, 8, 8, 2, 2, 2, 3, 22, 78, 4, 21, 60, 5, 20, 44, 6, 19, 30, 7, 2, 2, 8, 1, 8, 9, 40, 216, 10, 39, 186, 11, 38, 158, 12, 37, 132, 13, 36, 108, 14, 2, 2, 15, 34, 66, 16, 33, 48, 17, 8, 8, 18, 7, 18, 19, 6, 30, 20, 5, 44, 21, 4, 60, 22, 3, 78, 23, 2, 2, 24
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|