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.

A211225 Number of ways to represent sigma(n) as sigma(x) + sigma(y) where x+y = n.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2
Offset: 1

Views

Author

Paolo P. Lava, May 07 2012

Keywords

Comments

From an idea of Charles R Greathouse IV.
a(A211223(n)) > 0. - Reinhard Zumkeller, Jan 06 2013

Examples

			a(3)=1 because sigma(3)=sigma(1)+sigma(2)=4;
a(32)=2 because sigma(32)=sigma(4)+sigma(28)=sigma(14)+sigma(18)=63;
a(117)=3 because sigma(117)=sigma(41)+sigma(76)=sigma(52)+sigma(65)=sigma(56)+sigma(61)=182; etc.
		

Crossrefs

Programs

  • Haskell
    a211225 n = length $ filter (== a000203 n) $ zipWith (+) us' vs where
       (us,vs@(v:_)) = splitAt (fromInteger $ (n - 1) `div` 2) a000203_list
       us' = if even n then v : reverse us else reverse us
    -- Reinhard Zumkeller, Jan 06 2013
  • Maple
    with(numtheory);
    A211225:=proc(q)
    local b,i,n;
    for n from 1 to q do
      b:=0;
      for i from 1 to trunc(n/2) do
        if sigma(i)+sigma(n-i)=sigma(n) then b:=b+1; fi;
      od;
      print(b)
    od; end:
    A211225(1000);
  • Mathematica
    a[n_] := With[{s = DivisorSigma[1, n]}, Sum[Boole[s == DivisorSigma[1, x] + DivisorSigma[1, n-x]], {x, 1, Quotient[n, 2]}]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, May 04 2023 *)
  • PARI
    a(n)=my(t=sigma(n)); sum(i=1, n\2, sigma(i)+sigma(n-i)==t) \\ Charles R Greathouse IV, May 07 2012