A211225 Number of ways to represent sigma(n) as sigma(x) + sigma(y) where x+y = n.
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
Keywords
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.
Links
- Paolo P. Lava, Table of n, a(n) for n = 1..10000
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
Comments