OFFSET
1,2
COMMENTS
If m is in the sequence then so is m*k^2 for k >= 1. - David A. Corneth, Jan 22 2024
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
David A. Corneth, PARI program
EXAMPLE
20 is in the list since 20 = 2^2 + 4^2 and 2 and 4 are divisors of 20
MAPLE
isA066213 := proc(n)
local S, els;
S:=subsets(numtheory[divisors](n));
while not S[finished] do
els:=S[nextvalue]() ;
if add(d^2, d=els) = n then
return true ;
end if ;
end do;
false
end proc:
for n from 1 do
if isA066213(n) then
print(n) ;
end if;
end do: # R. J. Mathar, Oct 09 2023
MATHEMATICA
okQ[k_] := AnyTrue[Subsets[Select[Divisors[k]^2, # <= k&]], Total[#]==k&];
Reap[For[k = 1, k <= 5000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, May 27 2024 *)
PROG
(PARI) \\ See PARI link
CROSSREFS
KEYWORD
nonn
AUTHOR
Erich Friedman, Dec 17 2001
EXTENSIONS
Offset 1 from David A. Corneth, Jan 22 2024
STATUS
approved