OFFSET
1,1
COMMENTS
All perfect numbers belong to this sequence.
There are two sets of candidates of k: (i) k|A001065(k) and k|A007956(k) individually, or (ii) neither k|A001065(k) nor k|A007956(k) but the remainders of A001065(k)/k and A007956(k)/k sum up to k. If k has at least 4 divisors, the product of the second and penultimate divisor (in the sorted divisors list) is k, so k|A007956(k). This means for all k in A080257 we have k|A007956(k), and the k that do not divide A007956(k) are in A000430, which means k=p or k=p^2 for some prime p. If k=p, A001065(k)+A007956(k) = 1+1 =2, and the requirement here reduces to k|2 and only k=2 is left. If k=p^2, A001065(k) +A007956(k) = 1+p+p = 1+2*p, and the requirement here reduces to p^2 | (1+2*p), which has no solutions. This means case (ii) does not generate any solutions besides k=2. And this means all other solutions are from case (i), and therefore elements A007691 > 1 are the only remaining candidates. - R. J. Mathar, Oct 15 2021
MAPLE
isA087948 := proc(n)
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Joseph L. Pe, Jan 08 2004
EXTENSIONS
a(11)-a(16) from Michael S. Branicky, Oct 16 2021
STATUS
approved