OFFSET
1,1
FORMULA
EXAMPLE
6430 is in the sequence because the sum of divisors is 1+2+5+10+643+1286+3215+6430 = 11592
which equals the sum of anti-divisors 3+4+7+9+11+20+77+167+1169+1429+1837+2572+4287 = 11592.
21541 is in the sequence because the sum of divisors is 1+13+1657+21541 = 23212
and equals the sum of anti-divisors 2+3+9+26+67+643+3314+4787+14361 = 23212.
MAPLE
with(numtheory): P:=proc(q) local j, k; k:=0; j:=q; while j mod 2<>1 do k:=k+1; j:=j/2; od; if sigma(q)=sigma(2*q+1)+sigma(2*q-1)+sigma(q/2^k)*2^(k+1)-6*q-2 then q; fi; end: seq(P(i), i=3..10^5);
# alternative Maple implementation:
antidivisors := proc(n) local a, k; a := {} ; for k from 2 to n-1 do if abs((n mod k)- k/2) < 1 then a := a union {k} ; end if; end do: a ; end proc:
A066417 := proc(n) add(d, d=antidivisors(n)) ; end proc:
isA178029 := proc(n) numtheory[sigma](n) = A066417(n) ; end proc:
for n from 1 do if isA178029(n) then printf("%d, \n", n) ; end if; end do:
# R. J. Mathar, May 24 2010
MATHEMATICA
antidivisors[n_] := Select[Range[2, n-1], Abs[Mod[n, #] - #/2] < 1&];
For[k = 1, k <= 10^5, k++, If[DivisorSigma[1, k] == Total[antidivisors[k]], Print[k]]] (* Jean-François Alcover, Jun 14 2023 *)
PROG
(Python)
from sympy import divisors
[n for n in range(1, 10**5) if sum([d for d in range(2, n) if (n % d) and (2*n) % d in [d-1, 0, 1]]) == sum(divisors(n))] # Chai Wah Wu, Aug 07 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, May 19 2010
EXTENSIONS
a(13)-a(28) from Donovan Johnson, Jun 12 2010
STATUS
approved