|
|
A066214
|
|
Nonsquare numbers which are sums of squares of some subset of divisors.
|
|
4
|
|
|
20, 30, 80, 90, 120, 126, 130, 150, 180, 195, 210, 252, 264, 270, 272, 280, 294, 300, 315, 320, 330, 336, 350, 360, 378, 390, 396, 414, 420, 450, 468, 480, 500, 504, 520, 525, 540, 600, 630, 650, 660, 690, 693, 696, 700, 720, 750, 756, 780, 792
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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;
|
|
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]];
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|