OFFSET
1,2
COMMENTS
The first 11 terms are identical to those of A210570.
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..1000
FORMULA
a(n) >= A210570(n) by definition of the latter. - Charles R Greathouse IV, Nov 28 2024
MAPLE
N:= 1000: # to get all terms <= N
V:= Vector(N):
Res:= NULL:
for m from 1 to N do
if V[m] = 0 then
V[m]:= 1;
Res:= Res, m;
for k from 1 to floor(sqrt(N-m)) do V[m+k^2]:= 1 od:
fi
od:
Res; # Robert Israel, Nov 30 2016
MATHEMATICA
a[1] = 1; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, If[FreeQ[k - Array[a, n-1], d_ /; IntegerQ[Sqrt[d]]], Return[k]]]; Table[a[n], {n, 1, 40}]
PROG
(Haskell)
a224839 n = a224839_list !! (n-1)
a224839_list = f [1..] [] where
f (x:xs) ys = if all ((== 0) . a010052) $ map (x -) ys
then x : f xs (x:ys) else f xs ys
-- Reinhard Zumkeller, May 02 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-François Alcover, Sep 18 2013
STATUS
approved