reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
with(numtheory):soa:=proc(n) local div, s, j: div:=convert(divisors(n), list): s:=0: for j from 1 to nops(div)-1 do if div[j] mod 2=1 then s:=s+div[j] else s:=s: fi: od: end: p:=proc(n) if type(n/soa(n), integer)=true then n else fi end: seq(p(n), n=1..240); (* _# _Emeric Deutsch_, Feb 26 2005 *)
proposed
editing
editing
proposed
Harry J. Smith, <a href="/A066191/b066191.txt">Table of n, a(n) for n=1,...,1000</a>
with(numtheory):soa:=proc(n) local div, s, j: div:=convert(divisors(n), list): s:=0: for j from 1 to nops(div)-1 do if div[j] mod 2=1 then s:=s+div[j] else s:=s: fi: od: end: p:=proc(n) if type(n/soa(n), integer)=true then n else fi end: seq(p(n), n=1..240); (* _Emeric Deutsch_, Feb 26 2005 *)
(PARI) { n=0; for (m=2, 10^9, d=divisors(m); s=1; for (i=2, numdiv(m) - 1, if (d[i]%2, s += d[i])); if (s > 0 && m%s == 0, write("b066191.txt", n++, " ", m); if (n==1000, return)) ) } [From _\\ _Harry J. Smith_, Feb 05 2010]
(PARI) isok(n) = !(n % sumdiv(n, d, d*(d%2)*(d!=n))); \\ Michel Marcus, Apr 06 2015
approved
editing
More terms from _Emeric Deutsch (deutsch(AT)duke.poly.edu), _, Feb 26 2005
_Robert G. Wilson v (rgwv(AT)rgwv.com), _, Dec 15 2001
(PARI) { n=0; for (m=2, 10^9, d=divisors(m); s=1; for (i=2, numdiv(m) - 1, if (d[i]%2, s += d[i])); if (s > 0 && m%s == 0, write("b066191.txt", n++, " ", m); if (n==1000, return)) ) } [From _Harry J. Smith (hjsmithh(AT)sbcglobal.net), _, Feb 05 2010]
Harry J. Smith, <a href="/A066191/b066191.txt">Table of n, a(n) for n=1,...,1000</a>
nonn,easy,new