%I #10 Jul 14 2017 22:19:39
%S 1,2,2,3,2,4,2,4,3,4,2,4,2,3,3,5,2,5,2,5,3,4,2,6,3,3,4,6,2,5,2,6,4,4,
%T 4,4,2,3,3,7,2,6,2,6,4,3,2,6,3,5,3,5,2,6,3,6,3,4,2,8,2,3,4,7,3,6,2,5,
%U 3,7,2,6,2,4,4,4,3,6,2,7,5,4,2,6,3,3,3,6,2,6
%N a(n) is the number of partial sums of the divisors of n that are the sum of divisors of some integer.
%H Robert Israel, <a href="/A289872/b289872.txt">Table of n, a(n) for n = 1..10000</a>
%F For n>=1 and p prime, a(p^n) = n+1.
%e For n=2, the divisors are 1, 2; the partial sums are 1, 3; 1=sigma(1) and 3=sigma(2); so a(2)=2.
%e For n=10, the divisors are 1, 2, 5, 10; the partial sums are 1, 3, 8, 18; 1=sigma(1), 3=sigma(2), 8=sigma(7) and 18=sigma(10); so a(10)=4.
%p M:= 1000: # get a(n) for n=1..m where m is the first number with sigma(m+1) > M
%p S:= Vector(M):
%p for n from 1 to M-1 do
%p v:= numtheory:-sigma(n);
%p if v > M then if not assigned(nmax) then nmax:= n-1 fi
%p elif S[v] = 0 then S[v]:= 1
%p fi;
%p od:
%p seq(add(S[i],i=ListTools:-PartialSums(sort(convert(numtheory:-divisors(n),list)))), n = 1..nmax); # _Robert Israel_, Jul 14 2017
%t s = Union@ DivisorSigma[1, Range[10^6]]; Array[Count[Accumulate@ Divisors@ #, k_ /; MemberQ[s, k]] &, 90] (* _Michael De Vlieger_, Jul 14 2017 *)
%o (PARI) issigma(n) = {for (k=1, n, if (sigma(k) == n, return (1));); 0;}
%o a(n) = {d = divisors(n); v = vector(#d, k, sum(j=1, k, d[j])); sum(k=1, #v, issigma(v[k]));}
%Y Cf. A000203, A002191, A027750, A240698.
%K nonn
%O 1,2
%A _Michel Marcus_, Jul 14 2017