cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A178029 Numbers whose sum of divisors equals the sum of their anti-divisors.

Original entry on oeis.org

11, 22, 33, 65, 82, 117, 218, 483, 508, 537, 6430, 21541, 117818, 3589646, 7231219, 8515767, 13050345, 47245905, 50414595, 104335023, 217728002, 1217532421, 1573368218, 1875543429, 2269058065, 11902221245, 12196454655, 12658724029
Offset: 1

Views

Author

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Formula

{n: A066417(n) = A000203(n)}. - R. J. Mathar, May 24 2010

Extensions

a(13)-a(28) from Donovan Johnson, Jun 12 2010