OFFSET
0,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
C. B. Lacampagne, C. A. Nicol, and J. L. Selfridge, Sets With Non-Squarefree Sums, in: Richard Mollin (ed.), Number Theory: Proceedings of the First Conference of the Canadian Number Theory Association, Held at the Banff Center, Banff, Alberta, April 17-27, 1988, Berlin; New York: W. de Gruyter, 1990, pp. 299-310.
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Module[{t = Array[a, n, 0], k = a[n - 1] + 1}, While[AnyTrue[t, SquareFreeQ[k + #] &], k++]; k]; Array[a, 20, 0] (* Amiram Eldar, Aug 21 2023 *)
PROG
(PARI) v=vector(60); v[1]=1; print1("1, "); for(n=2, 60, for(k=v[n-1]+1, 10^15, s=0; for(l=1, n-1, if(issquarefree(k+v[l]), break); s=s+1); if(s==n-1, print1(k", "); v[n]=k; break)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Mar 25 2003
EXTENSIONS
More terms from Lambert Klasen (Lambert.Klasen(AT)gmx.net) and lambert.herrgesell(AT)aschendorff.de, Jul 26 2005
a(33)-a(36) from Amiram Eldar, Aug 21 2023
STATUS
approved