%I #22 Aug 29 2021 12:01:06
%S 1,22,25,118,414,2745,10623,63201,1039161,1693864,2285297,52962021,
%T 66998865,232974402,315796805,336125877,834972771,1233903294,
%U 1309750075,1617454215,2056836133,5455816485,8589896196,9030058217,10622144467,12324258770,33725308558
%N Nonprimes k that divide the sum of the nonprimes up to k.
%C Standard heuristics suggest that this sequence is infinite. - _Charles R Greathouse IV_, Dec 29 2013
%e a(2) = 22 because 1 + 4 + 6 + 8 + 9 + 10 + ... + 22 = 176 and 176/22 = 8.
%t s = 0; Do[If[PrimeQ[k], Continue[]]; s += k; If[Mod[s, k] == 0, Print[k]], {k, 10^10}] (* Gomez *)
%t Select[Range[10^4], Not[PrimeQ[#]] && Divisible[Sum[Boole[Not[PrimeQ[m]]]m, {m, #}], #] &] (* _Alonso del Arte_, Dec 29 2013 *)
%o (PARI) v=List([s=1]); forcomposite(n=4,1e9,if(s%n==0, listput(v,n)); s+=n); Vec(v) \\ _Charles R Greathouse IV_, Dec 29 2013
%Y Cf. A007506.
%K nonn
%O 1,2
%A _Vicente Izquierdo Gomez_, Dec 27 2013
%E a(14)-a(27) from _Donovan Johnson_, Dec 30 2013
|