OFFSET
1,1
EXAMPLE
Sum of anti-divisors of 11 is 12. Unitary divisors of 11 are 1, 11 and their sum is 12.
MAPLE
with(numtheory): P:=proc(q) local a, b, c, j, k, n;
for n from 1 to q do k:=0; j:=n;
while j mod 2 <> 1 do k:=k+1; j:=j/2; od;
a:=sigma(2*n+1)+sigma(2*n-1)+sigma(n/2^k)*2^(k+1)-6*n-2;
c:=ifactors(n)[2]; b:=mul(c[j][1]^c[j][2]+1, j=1..nops(c));
if a=b then print(n); fi; od; end: P(10^6);
MATHEMATICA
Select[Range[5000], Function[n, Total[Cases[Range[2, n - 1], _?(Abs[Mod[n, #] - #/2] < 1 &)]] == Plus @@ Select[Divisors@ n, GCD[#, n/#] == 1 &]]] (* Michael De Vlieger, Jun 06 2016, after Robert G. Wilson v at A034448 and Harvey P. Dale at A066272 *)
PROG
(PARI) sud(n) = sumdiv(n, d, if(gcd(d, n/d)==1, d));
sad(n) = my(k); if(n>1, k=valuation(n, 2); sigma(2*n+1)+sigma(2*n-1)+sigma(n/2^k)*2^(k+1)-6*n-2, 0);
isok(n) = sad(n) == sud(n); \\ Michel Marcus, Jun 12 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Jun 06 2016
EXTENSIONS
a(23)-a(26) from Michel Marcus, Jun 12 2016
a(27)-a(35) from Amiram Eldar, Jul 12 2022
STATUS
approved