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.

Showing 1-4 of 4 results.

A105401 a(n) is the final term of the n-th row of A106394.

Original entry on oeis.org

1, 2, 3, 12, 30, 180, 395780, 56, 5339880, 18448242120, 1192281609186360, 180180, 393869810468558572779517216129800, 2914872400440, 2914872400440, 180026486640, 4193048661254917704240, 2640766128, 11832093494672880
Offset: 1

Views

Author

Leroy Quet, May 01 2005

Keywords

Comments

It's interesting that some terms are so much smaller than their neighbors, like row 8 (1 1 2 5 56) and row 26 (1 1 1 2 3 48 3952 76271067 17451826907684400). - Joshua Zucker, May 11 2006

Crossrefs

Programs

  • Mathematica
    egyptFraction[f_] := Ceiling[1/Most[NestWhileList[# - 1/Ceiling[1/#] &, f, # != 0 &]]]; a[n_] := egyptFraction[HarmonicNumber[n]][[-1]]; Array[a, 20] (* Amiram Eldar, Apr 09 2022 *)

Extensions

More terms from Joshua Zucker, May 11 2006

A112330 a(n) is the number of terms in the n-th row of A106394.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 6, 5, 7, 8, 7, 6, 9, 7, 8, 8, 9, 8, 8, 9, 8, 11, 11, 11, 11, 9, 14, 10, 15, 12, 12, 15, 11, 14, 10, 14, 12, 13, 12, 16, 15, 13, 12, 12, 17, 13, 16, 16, 15, 16, 19, 14, 17, 16, 16, 21, 15, 18, 16, 18, 18, 18, 19, 21, 20, 19, 20, 22, 17, 20, 27, 19, 25, 20, 18, 23, 24
Offset: 1

Views

Author

Leroy Quet, Sep 04 2005

Keywords

Examples

			H(4) = 1 + 1/2 + 1/3 + 1/4 = 25/12 has the Egyptian fraction expansion, by the greedy algorithm, of 1 + 1 + 1/12. Since there are 3 terms in this expansion, a(4) = 3.
		

Crossrefs

Programs

  • Mathematica
    egyptFraction[f_] := Ceiling[1/Most[NestWhileList[# - 1/Ceiling[1/#] &, f, # != 0 &]]]; a[n_] := Length[egyptFraction[HarmonicNumber[n]]]; Array[a, 100] (* Amiram Eldar, Apr 09 2022 *)

Extensions

More terms from David Wasserman, Apr 16 2009

A106395 a(n) = sum of terms of n-th row of A106394.

Original entry on oeis.org

1, 3, 6, 14, 36, 194, 396309, 65, 5340390, 18448355363, 1192281639870330, 180505, 393869810468558586067193126963349, 2914872842753, 2914872842768, 180026806679, 4193048661303182427879, 2640786324, 11832093582726989
Offset: 1

Views

Author

Leroy Quet, May 01 2005

Keywords

Examples

			By the greedy algorithm, sum{k=1 to 4} 1/k = 1 + 1 + 1/12.
So a(4) = 1+1+12 = 14.
		

Crossrefs

Cf. A106394.

Extensions

More terms from Jud McCranie, May 03 2005
More terms from Joshua Zucker, May 11 2006

A364200 Minimal number of terms of mixed-sign Egyptian fraction f such that H(n) + f is an integer, where H(n) is the n-th harmonic number.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 3, 3, 2, 2, 3, 4, 3, 4, 4, 4, 4, 4, 5, 5, 4, 5, 5, 5, 4, 5, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6
Offset: 1

Views

Author

Denis Ivanov, Jul 13 2023

Keywords

Comments

For H(n) - floor(H(n)) and ceiling(H(n)) - H(n), the shortest mixed-sign Egyptian fractions are calculated, and the smaller length of fractions is selected.
Similar to A106394 and A224820. But those sequences use the greedy algorithm, which does not guarantee the shortest length of expansion.
For 1 < n < 41, a(n) < A363937(n) only for n = 10 and n = 22.

Examples

			For n=10: H(10) = 7381/2520 = 2.928...; H(10) - floor(H(10)) = 7381/2520 - 2 = 2341/2520 = 1/2 + 1/7 + 1/8 + 1/9 + 1/20, which cannot be expressed as the sum of fewer than 5 reciprocals, and ceiling(H(10)) - H(10) = 3 - 7381/2520 = 179/2520 = 1/30 + 1/42 + 1/72, which cannot be expressed as the sum of fewer than 3 reciprocals, so A363937(10) = 3.
But 179/2520 = 1/14 - 1/2520 (a "mixed-sign Egyptian fraction"), so a(10) = 2.
		

Crossrefs

Cf. A363937.

Programs

  • Mathematica
    check[f_, k_] := (If[Numerator@f == 1, Return@True];
       If[k == 1, Return@False];
       Catch[Do[If[check[f - 1/i, k - 1], Throw@True],
         {i, Range[Ceiling[1/f], Floor[k/f]]}];
        Throw@False]);
    checkMixed[f_, k_, m_] := If[m == 1,
       Catch[Do[If[check[1/i - f, k], Throw@True],
         {i, Range[2, Floor[1/f]]}];
        Throw@False],
       checkMixed[f, k, m - 1]];
    a[n_] := (h = HarmonicNumber[n];
      d = Min[h - Floor@h, Ceiling@h - h];
      j = 1;
      While[Not@check[d, j], j++];
      res = j;
      Do[
       If[checkMixed[d, i - m, m], res = i],
       {i, 2, j - 1}, {m, 1, i - 1}];
      res);

Formula

a(n) <= A363937(n).
Showing 1-4 of 4 results.