login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051908 Number of ways to express 1 as the sum of unit fractions such that the sum of the denominators is n. 44

%I #48 Oct 24 2018 08:21:06

%S 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,

%T 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,

%U 22,19,18,30,24,19,26,28,26,29,35,29,44,28,47,48

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

%C Also the number of partitions of n whose reciprocal sums to 1; "exact partitions". - _Robert G. Wilson v_, Sep 30 2009

%D 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]

%H David A. Corneth, <a href="/A051908/b051908.txt">Table of n, a(n) for n = 1..200</a> (terms a(1)-a(86) from Jud McCranie, a(87)-a(88) from Robert G. Wilson v, a(89)-a(100) from Seiichi Manyama)

%H David A. Corneth, <a href="/A051908/a051908.gp.txt">Tuples up to n = 170</a>

%H Gus Wiseman, <a href="/A051908/a051908.txt">Sequences counting and ranking integer partitions by their reciprocal sums</a>

%H <a href="/index/Ed#Egypt">Index entries for sequences related to Egyptian fractions</a>

%F a(n) > 0 for n > 23.

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

%e 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

%t (* 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 *)

%t Table[Length[Select[IntegerPartitions[n],Sum[1/m,{m,#}]==1&]],{n,30}] (* _Gus Wiseman_, Jul 16 2018 *)

%o (Ruby)

%o def partition(n, min, max)

%o return [[]] if n == 0

%o [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}

%o end

%o def A051908(n)

%o ary = [1]

%o (2..n).each{|m|

%o cnt = 0

%o partition(m, 2, m).each{|ary|

%o cnt += 1 if ary.inject(0){|s, i| s + 1 / i.to_r} == 1

%o }

%o ary << cnt

%o }

%o ary

%o end

%o p A051908(100) # _Seiichi Manyama_, May 31 2016

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

%Y Cf. A002966, A058360, A270599, A316854, A316855, A316888-A316904.

%K nonn

%O 1,22

%A _Jud McCranie_, Dec 16 1999

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 09:18 EDT 2024. Contains 371935 sequences. (Running on oeis4.)