login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A303878 Consider the representation of some integer (>1) as the sum of distinct unit fraction (<1). The sum of these denominators is least. 0
2, 3, 4, 5, 6, 8, 9, 10, 15, 18, 20, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Consider the representation of 1 as the sum of distinct unit fraction (<1). We can easily found the least sum of the denominators. The solution is 1 = 1/2 + 1/3 + 1/6.

LINKS

Table of n, a(n) for n=1..12.

EXAMPLE

Denominators                                 | Sum

---------------------------------------------+-----

2, 3, 4, 5, 6, 8,  9, 10, 15, 18, 20, 24     | 124

2, 3, 4, 5, 6, 7, 10, 12, 14, 15, 20, 28     | 126

2, 3, 4, 5, 6, 7,  9, 12, 14, 18, 20, 28     | 128

2, 3, 4, 5, 6, 8,  9, 10, 12, 18, 24, 30     | 131

2, 3, 4, 5, 6, 7,  8, 12, 14, 20, 24, 28     | 133

PROG

(Ruby)

def partition(n, min, max)

  return [[]] if n == 0

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

end

def f(n)

  a = []

  partition(n, 2, n).each{|ary|

    sum = ary.inject(0){|s, i| s + 1 / i.to_r}

    a << ary.reverse if sum.denominator == 1 && sum.numerator > 1

  }

  a

end

n = 1

a = []

while a == []

  n += 1

  a = f(n)

end

p a

CROSSREFS

Sequence in context: A256007 A324689 A280578 * A039170 A097624 A000398

Adjacent sequences:  A303875 A303876 A303877 * A303879 A303880 A303881

KEYWORD

nonn,fini,full

AUTHOR

Seiichi Manyama, May 02 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 10 23:18 EST 2019. Contains 329910 sequences. (Running on oeis4.)