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.

Showing 1-1 of 1 results.

A213239 Numbers n such that sum of digits of n = sum of digits of anti-divisors of n.

Original entry on oeis.org

5, 8, 64, 691, 1779, 2851, 6361, 9066, 9606, 9771, 10789, 10996, 18996, 21481, 22569, 27529, 27691, 31516, 36709, 36776, 42649, 48651, 53296, 56586, 58749, 60369, 64794, 72889, 76754, 78766, 79374, 79896, 80989, 86596, 90606, 90879, 92766, 96171, 98979, 108529
Offset: 1

Views

Author

Paolo P. Lava, Jun 07 2012

Keywords

Examples

			Sum of digits of 1779 is 1+7+7+9=24.
Anti-divisors of 1779 are 2, 6, 1186 and their digits’ sum is 2+6+1+1+8+6=24.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    A213239:=proc(q)
    local a,b,c,d,k,n;
    for n from 1 to q do
      a:=0; b:=0;
      for k from 2 to n-1 do
        if abs((n mod k)-k/2)<1 then
           c:=k; while c>0 do b:=b+(c mod 10); c:=trunc(c/10); od; fi; od;
      c:=n; d:=0; while c>0 do d:=d+(c mod 10); c:=trunc(c/10); od;
      if b=d then print(n); fi; od; end:
    A213239(100000);
  • Python
    [n for n in range(1,10**5) if sum([sum([int(x) for x in str(d)]) for d in range(2,n) if n % d and 2*n % d in [d-1,0,1]]) == sum([int(x) for x in str(n)])] # Chai Wah Wu, Aug 08 2014
Showing 1-1 of 1 results.