cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A289872 a(n) is the number of partial sums of the divisors of n that are the sum of divisors of some integer.

Original entry on oeis.org

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, 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, 3, 7, 2, 6, 2, 4, 4, 4, 3, 6, 2, 7, 5, 4, 2, 6, 3, 3, 3, 6, 2, 6
Offset: 1

Views

Author

Michel Marcus, Jul 14 2017

Keywords

Examples

			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.
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.
		

Crossrefs

Programs

  • Maple
    M:= 1000: # get a(n) for n=1..m where m is the first number with sigma(m+1) > M
    S:= Vector(M):
    for n from 1 to M-1 do
      v:= numtheory:-sigma(n);
      if v > M then if not assigned(nmax) then nmax:= n-1 fi
      elif S[v] = 0 then S[v]:= 1
      fi;
    od:
    seq(add(S[i],i=ListTools:-PartialSums(sort(convert(numtheory:-divisors(n),list)))), n = 1..nmax); # Robert Israel, Jul 14 2017
  • Mathematica
    s = Union@ DivisorSigma[1, Range[10^6]]; Array[Count[Accumulate@ Divisors@ #, k_ /; MemberQ[s, k]] &, 90] (* Michael De Vlieger, Jul 14 2017 *)
  • PARI
    issigma(n) = {for (k=1, n, if (sigma(k) == n, return (1));); 0;}
    a(n) = {d = divisors(n); v = vector(#d, k, sum(j=1, k, d[j])); sum(k=1, #v, issigma(v[k]));}

Formula

For n>=1 and p prime, a(p^n) = n+1.