%I #18 Jun 28 2023 09:19:58
%S 94,123,147,806,1081,1179,1775,2575,5374,14865,20490,20845,27177,
%T 54934,72599,87031,101827,391514,452574,534389,1197146,1219229,
%U 1297767,1327510,4565354,4946164,6124646,7967984,8637602,9615708,10061718,14563178,18997520,24277270
%N Composite numbers equal to the sum of the prime factors, with multiplicity, of the previous k numbers, for some k.
%C Values of k are 4, 4, 4, 8, 8, 7, 7, 8, 9, 13, 5, 19, 14, 14, 5, 17, 11, 21, 17, 5, 12, 10, 22, 14, 23, 24, 19, 17, 18, 22, 34, 8, 38, 35, ...
%H Paolo P. Lava, <a href="/A257525/a257525.txt">First 50 terms with associated k values</a>
%e For 94, consider the prime factors of the previous 4 numbers, 90, 91, 92, 93: 2, 3, 3, 5; 7, 13; 2, 2, 23; 3, 31. Their sum is 2 + 3 + 3 + 5 + 7 + 13 + 2 + 2 + 23 + 3 + 31 = 94.
%e For 123, consider the prime factors of the previous 4 numbers, 119, 120, 121, 122: 7, 17; 2, 2, 2, 3, 5; 11, 11; 2, 61. Their sum is 7 + 17 + 2 + 2 + 2 + 3 + 5 + 11 + 11 + 2 + 61 = 123.
%p with(numtheory): P:= proc(q) local a,d,j,k,n;
%p for n from 2 to q do if not isprime(n) then a:=0; k:=0;
%p while a<n do k:=k+1; d:=ifactors(n-k)[2];
%p d:=add(d[j][1]*d[j][2],j=1..nops(d));
%p a:=a+d; od; if a=n then print(n);
%p fi; fi; od; end: P(10^9);
%o (PARI) sopfr(n) = my(f=factor(n)); sum(k=1, #f~, f[k, 1]*f[k, 2]);
%o isok(n) = {my(s = 0); my(k = 1); while (s < n, s += sopfr(n-k); k++); s == n;}
%o lista(nn) = {forcomposite(n=2, nn, if (isok(n), print1(n, ", ")););} \\ _Michel Marcus_, May 27 2015
%Y Cf. A257367, A257524, A257929, A257930.
%K nonn
%O 1,1
%A _Paolo P. Lava_, Apr 28 2015