OFFSET
1,1
COMMENTS
MATHEMATICA
seq[nmax_] := Module[{s = {1}, sum, sum2, am = {}, ak}, Do[sum = Total[Select[Divisors[n], MemberQ[s, #] &]]; If[sum <= n, AppendTo[s, n]; If[sum < n, sum2 = Total[Select[Most[Divisors[sum]], MemberQ[s, #] &]]; If[sum2 == n, AppendTo[am, sum]]]], {n, 2, nmax}]; am]; seq[10^4]
PROG
(PARI) lista(nmax) = {my(c = 0, s, s2); for(n=2, nmax, s = sumdiv(n, d, !bittest(c, d)*d) - n; if(s > n, c+=1<<n); if(s < n, s2 = sumdiv(s, d, ((d<s)&&!bittest(c, d))*d); if(s2 == n, print1(s, ", ")))); } \\ after M. F. Hasler at A181487
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Amiram Eldar, Aug 11 2023
STATUS
approved