%I #8 Sep 08 2022 08:45:42
%S 9,12,20,21,24,25,28,35,40,44,49,52,54,55,56,57,63,65,72,77,81,88,90,
%T 91,92,93,95,96,98,105,108,111,115,116,119,121,125,126,128,130,133,
%U 143,144,145,147,148,150,155,161,164,165,169,170,172,180,184,185,187,188,189
%N Numbers n > 1 with spf(n) < n such that there is a number k, n < k <= 2*n, with k - spf(k) = n - spf(n).
%C spf(k) is the sum of the prime factors of k with multiplicity, cf. A001414.
%C Condition spf(n) < n excludes 4 and the primes.
%C It appears that if a number k > n with k - spf(k) = n - spf(n) exists at all, then k <= 2*n. If this can be proved, the corresponding condition in the definition could be omitted.
%H Amiram Eldar, <a href="/A157973/b157973.txt">Table of n, a(n) for n = 1..10000</a>
%e For n = 77, n-spf(n) = 77-18 = 59; for k = 93, k-spf(k) = 93-34 =59. Hence 77 is in the sequence.
%t f[1] = 1; f[n_] := n - Plus @@ Times @@@ FactorInteger@n; aQ[n_] := (fn = f[n]) > 0 && Module[{ans = False}, Do[If[f[k] == fn, ans = True; Break[]], {k, n + 1, 2 n}]; ans]; Select[Range[200], aQ] (* _Amiram Eldar_, Sep 08 2019 *)
%o (Magma) spf:=func< n | &+[a[1]*a[2]: a in Factorization(n)] >; [ n: n in [2..190] | d gt 0 and exists(t){ k: k in [n+1..2*n] | d eq k-spf(k) } where d is n-spf(n) ];
%Y Cf. A001414 (sum of primes dividing n).
%K nonn
%O 1,1
%A _J. M. Bergot_, Mar 10 2009
%E Edited, missing terms inserted and extended by _Klaus Brockhaus_, Mar 30 2009