OFFSET
1,3
LINKS
Peter Kagey and Giovanni Resta, Table of n, a(n) for n = 1..2500 (first 500 terms from Peter Kagey)
EXAMPLE
Let p_n = (n, a(n)).
For n = 4, a(4) = 5 because
d(p_3, p_4) = sqrt(2) = d(p_2, p_3) if a(4) = 1,
d(p_3, p_4) = 1 = d(p_1, p_2) if a(4) = 2,
d(p_3, p_4) = sqrt(2) = d(p_2, p_3) if a(4) = 3,
d(p_3, p_4) = sqrt(5) = d(p_1, p_3) if a(4) = 4, therefore
a(4) = 5, the least value that does not create a contradiction.
MATHEMATICA
dq[p_, q_] := Total[(p - q)^2]; good[w_] := Catch[ Do[ If[ MemberQ[di, dq[w, P[[i]]]], Throw@False], {i, Length@ P}]; True]; P = di = {}; n = 0; While[n < 58, n++; k = 1; While[! good[{n, k}], k++]; di = Join[di, dq[{n, k}, #] & /@ P]; AppendTo[P, {n, k}]]; Last /@ P (* Giovanni Resta, Apr 06 2017 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Peter Kagey, Apr 05 2017
STATUS
approved