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.

A051908 Number of ways to express 1 as the sum of unit fractions such that the sum of the denominators is n.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 3, 0, 1, 1, 1, 1, 2, 3, 2, 2, 1, 2, 2, 2, 4, 5, 5, 2, 4, 5, 5, 9, 4, 4, 6, 4, 4, 7, 8, 4, 10, 9, 9, 11, 8, 13, 13, 15, 16, 21, 18, 16, 22, 19, 18, 30, 24, 19, 26, 28, 26, 29, 35, 29, 44, 28, 47, 48
Offset: 1

Views

Author

Jud McCranie, Dec 16 1999

Keywords

Comments

Also the number of partitions of n whose reciprocal sums to 1; "exact partitions". - Robert G. Wilson v, Sep 30 2009

Examples

			1 = 1/2 + 1/2, the sum of denominators is 4, and this is the only expression of 1 as unit fractions with denominator sum 4, so a(4)=1.
The a(22) = 3 partitions whose reciprocal sum is 1 are (12,4,3,3), (10,5,5,2), (8,8,4,2). - _Gus Wiseman_, Jul 16 2018
		

References

  • Derrick Niederman, "Number Freak, From 1 to 200 The Hidden Language of Numbers Revealed", a Perigee Book, Penguin Group, NY, 2009, pp. 82-83. [From Robert G. Wilson v, Sep 30 2009]

Crossrefs

A028229 lists n such that a(n)=0.

Programs

  • Mathematica
    (* first do *) << "Combinatorica`"; (* then *) f[n_] := Block[{c = i = 0, k = PartitionsP@n, p = {n}}, While[i < k, If[1 == Plus @@ (1/p), c++ ]; i++; p = NextPartition@p]; c]; Array[f, 88] (* Robert G. Wilson v, Sep 30 2009 *)
    Table[Length[Select[IntegerPartitions[n],Sum[1/m,{m,#}]==1&]],{n,30}] (* Gus Wiseman, Jul 16 2018 *)
  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
    end
    def A051908(n)
      ary = [1]
      (2..n).each{|m|
        cnt = 0
        partition(m, 2, m).each{|ary|
          cnt += 1 if ary.inject(0){|s, i| s + 1 / i.to_r} == 1
        }
        ary << cnt
      }
      ary
    end
    p A051908(100) # Seiichi Manyama, May 31 2016

Formula

a(n) > 0 for n > 23.