login
Sum of proper divisors of n-th nonprime number A018252(n).
2

%I #7 Dec 15 2017 14:32:47

%S 0,3,6,7,4,8,16,10,9,15,21,22,11,14,36,6,16,13,28,42,31,15,20,13,55,

%T 22,17,50,54,40,33,26,76,8,43,21,46,66,17,64,23,32,108,34,41,63,19,78,

%U 58,27,74,123,40,49,64,19,90,106,40,44,140,23,46,33,92,144,21,76,35,50,25

%N Sum of proper divisors of n-th nonprime number A018252(n).

%C The k-th positive integer of this sequence is equal to the sum of proper divisors of k-th composite number A002808(k).

%F a(n) = A001065(A018252(n)).

%t NonPrime[n_Integer] := FixedPoint[n + PrimePi@# &, n + PrimePi@n]; f[n_] := Block[{m = NonPrime@n}, DivisorSigma[1, m] - m]; Array[f, 71] (* _Robert G. Wilson v_, Aug 17 2009 *)

%t Table[If[PrimeQ[n],-1,Total[Most[Divisors[n]]]],{n,100}]/.(-1->Nothing) (* _Harvey P. Dale_, Dec 15 2017 *)

%Y Cf. A001065, A018252, A002808, A162194, A162196.

%K easy,nonn

%O 1,2

%A _Omar E. Pol_, Jul 04 2009

%E a(17) and further terms from _Robert G. Wilson v_, Aug 17 2009