A258786 Numbers n whose sum of anti-divisors is a permutation of their digits.
5, 8, 41, 56, 64, 358, 614, 946, 1092, 1382, 1683, 2430, 2683, 2734, 2834, 2945, 3045, 3067, 3602, 4056, 4286, 5186, 5784, 6874, 7251, 8104, 8546, 9264, 12881, 14028, 14384, 15258, 17386, 21103, 22044, 23331, 24434, 24603, 25346, 26420, 26822, 26845, 27024, 27232
Offset: 1
Examples
Anti-divisors of 5 are 2, 3 whose sum is 5. Anti-divisors of 41 are 2, 3, 9, 27 whose sum is 41. Anti-divisors of 64 are 3, 43 whose sum is 46 that is a permutation of the digit of 64.
Links
- Paolo P. Lava, Table of n, a(n) for n = 1..200
Programs
-
Maple
with(numtheory):P:=proc(q) local a,b,j,k,ok,n,p; 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; if ilog10(n)=ilog10(a) then j:=sort(convert(n,base,10)); a:=sort(convert(a,base,10)); ok:=1; for k from 1 to nops(a) do if j[k]<>a[k] then ok:=0; break; fi; od; if ok=1 then print(n); fi; fi; od; end: P(10^9);
-
Mathematica
ad[n_] := Cases[Range[2, n - 1], ?(Abs[Mod[n, #] - #/2] < 1 &)]; Select[Range@ 5000, SameQ[DigitCount@ #, DigitCount[Total[ad@ #]]] &] (* _Michael De Vlieger, Jun 10 2015 *)
-
Python
from sympy.ntheory.factor_ import antidivisors A258786_list = [n for n in range(1,10**5) if sorted(str(n)) == sorted(str(sum(antidivisors(n))))] # Chai Wah Wu, Jun 11 2015
Comments