A097796 Number of partitions of n into perfect numbers.
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0
Offset: 1
Keywords
Examples
a(90)=2: 90 = 15*6 = 15*A000396(1) = 3*28 + 1*6 = 3*A000396(2) + 1*A000396(1).
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Perfect Number
- Eric Weisstein's World of Mathematics, Partition
- Wikipedia, Perfect number
Programs
-
Haskell
a097796 = p a000396_list where p _ 0 = 1 p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m -- Reinhard Zumkeller, Jan 20 2012
-
Mathematica
f[x_] := Product[-(1/(-1 + x^i)), {i, {6, 28, 496, 8128, 33550336}}]; CoefficientList[Series[f[x], {x, 0, 1000}], x] (* Ben Branman, Jan 07 2012 *)
Comments