OFFSET
1,1
LINKS
Robert Israel and Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 2667 terms from Israel)
EXAMPLE
20 is in the list since 20 = 2^2 + 4^2 and 2 and 4 are divisors of 20
MAPLE
N:= 10000; # to get entries up to N
filter:= proc(t)
local L;
L:= select(d -> (d^2<t), numtheory[divisors](t));
evalb(coeff(mul(1+x^(d^2), d=L), x, t) <> 0);
end proc;
A066214:= select(filter, [$2..N]); # Robert Israel, Apr 17 2014
MATHEMATICA
filterQ[n_] := If[IntegerQ[Sqrt[n]], False, Module[{L}, L = Select[ Divisors[n], #<n&]; SeriesCoefficient[Product[1+x^(d^2), {d, L}], {x, 0, n}] != 0]];
Select[Range[1000], filterQ] (* Jean-François Alcover, Jun 07 2020, after Maple *)
okQ[k_] := AnyTrue[Subsets[Select[Divisors[k]^2, # <= k&]], Total[#]==k&];
Reap[For[k = 1, k <= 1000, k++, If[!IntegerQ[k^(1/2)] && okQ[k], Sow[k]]]][[2, 1]] (* Jean-François Alcover, May 27 2024 *)
PROG
(PARI) is(n)=if(issquare(n), return(0)); my(d=divisors(n), v=[0], t); d=apply(sqr, select(k->k^2<n, d)); t=vecsum(d); if(t<n, return(0)); forstep(i=#d, 1, -1, v=concat(apply(k->k+d[i], v), v); t-=d[i]; v=Set(select(k->k<=n && k+t>=n, v)); if(setsearch(v, n), return(1))); 0 \\ Charles R Greathouse IV, Aug 28 2016
KEYWORD
nonn
AUTHOR
Erich Friedman, Dec 17 2001
STATUS
approved