OFFSET
3,1
COMMENTS
Similar to A191150 but using anti-divisors. The recursion is stopped when 2 is reached because 2 has no anti-divisors.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 3..5000
EXAMPLE
n=14 -> anti-divisors are 3,4,9. We start with 3+4+9=16.
Now for 3, 4 and 9 we repeat the procedure:
3-> 2 -> no anti-divisors. To add: 2.
4-> 3 -> 2 -> no anti-divisors. To add: 3+2=5.
9-> 2,6. To add: 2+6=8.
--- 2 -> no anti-divisors.
--- 6 -> 4 -> 3 -> 2 -> no anti-divisors. To add: 4+3+2=9.
Total is 16+2+5+8+9=40.
MAPLE
with(numtheory);
P:=proc(n)
local a, b, c, k, s;
a:={};
for k from 2 to n-1 do if abs((n mod k)- k/2) < 1 then a:=a union {k}; fi;
od;
b:=nops(a); c:=op(a); s:=0;
if b>1 then
for k from 1 to b do s:=s+c[k]; od;
else s:=c;
fi;
b:=nops(a); c:=(sort([op(a)]));
for k from 1 to b do if c[k]>2 then s:=s+P(c[k]); fi; od;
s;
end:
Antihps:=proc(i)
local n;
for n from 1 to i do print(P(n)); od;
end:
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Jul 13 2011
STATUS
approved