A089748 Numbers k that divide (sum of proper divisors of k + product of proper divisors of k).
2, 6, 28, 120, 496, 672, 8128, 30240, 32760, 523776, 2178540, 23569920, 33550336, 45532800, 142990848, 459818240
Offset: 1
Programs
-
Maple
isA087948 := proc(n) if modp( A001065(n)+A007956(n),n) = 0 then true; else false; end if; end proc: for n from 2 do if isA087948(n) then printf("%d\n",n) ; end if; end do: # R. J. Mathar, Oct 15 2021
-
Mathematica
l = {}; Do[d = Drop[Divisors[n], -1]; p = Apply[Plus, d]; t = Apply[Times, d]; m = Mod[p + t, n]; If[m == 0, l = Append[l, n]], {n, 2, 10^6}]; l Select[Range[2,22*10^5],Mod[Total[Most[Divisors[#]]]+Times@@Most[Divisors[#]],#]==0&] (* The program generates the first 11 terms of the sequence. *) (* Harvey P. Dale, Jun 05 2024 *)
-
Python
from math import prod from sympy import divisors def ok(n): d = divisors(n)[:-1]; return n > 1 and (sum(d) + prod(d))%n == 0 print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Oct 15 2021
Extensions
a(11)-a(16) from Michael S. Branicky, Oct 16 2021
Comments