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-6 of 6 results.

A020473 Egyptian fractions: number of partitions of 1 into reciprocals of positive integers <= n.

Original entry on oeis.org

1, 2, 3, 5, 6, 13, 14, 24, 34, 60, 61, 168, 169, 252, 627, 1011, 1012, 2430, 2431, 7212, 15024, 16553, 16554, 50219, 60008, 64284, 92071, 260178, 260179, 844846, 844847, 1431187, 2608883, 2661217, 7946814, 22692855, 22692856, 22911815, 36004488, 120859171
Offset: 1

Views

Author

Keywords

Comments

Number of ways to represent 1 = Sum_{k=1..n} b(k)/k, where the b(k) >= 0. - Franklin T. Adams-Watters, Aug 01 2006

Crossrefs

Programs

  • Mathematica
    Table[Length[IntegerPartitions[1, All, 1/Range[n]]], {n, 1, 20}] (* Ben Branman, Apr 21 2012 *)

Formula

a(n) = Sum(A092666(i), i=1..n).
For prime p, a(p) = a(p-1) + 1. - Max Alekseyev, May 07 2012

A038034 Number of compositions (ordered partitions) of 1 into {1/1, 1/2, 1/3, ..., 1/n}.

Original entry on oeis.org

1, 2, 3, 7, 8, 52, 53, 288, 1209, 5247, 5248, 71395, 71396, 375779, 6957533, 52310862, 52310863, 1152622553, 1152622554, 45575902465, 1296407854551, 1580527987951, 1580527987952, 73245316681199, 584407520822198, 639887219617512, 11355804443049274, 516959218512416104, 516959218512416105, 29213061562205847736, 29213061562205847737, 886912328033731357358, 31286298736622399674197, 31349361777225437765677
Offset: 1

Views

Author

Christian G. Bower, Jun 15 1998

Keywords

Comments

a(n) = number of Egyptian fractions 1 = 1/x_1 + ... + 1/x_k (for any k), with max{x_i}<=n.

Examples

			a(4) = 7 since there are seven compositions into parts {1/1, 1/2, 1/3, 1/4}:
1 = 1/1, 1 = 1/2 + 1/2, 1 = 1/3 + 1/3 + 1/3, 1 = 1/2 + 1/4 + 1/4, 1 = 1/4 + 1/2 + 1/4, 1 = 1/4 + 1/4 + 1/2, and 1 = 1/4 + 1/4 + 1/4 + 1/4.
		

Crossrefs

Formula

a(n) = Sum_{i=1..n} A092667(i).
a(p) = a(p-1) + 1 for p prime. - Chai Wah Wu, Dec 27 2024

Extensions

More terms from Max Alekseyev, Mar 02 2004

A092669 a(n) = number of Egyptian fractions 1 = 1/x_1 + ... + 1/x_k (for any k), 0

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 5, 0, 11, 0, 0, 0, 19, 0, 0, 0, 73, 0, 86, 0, 0, 163, 0, 203, 286, 0, 0, 0, 803, 0, 1399, 0, 0, 2723, 0, 0, 4870, 0, 0, 0, 8789, 0, 13937, 14987, 42081, 0, 0, 0, 85577, 0, 0, 159982, 0, 117889, 437874, 0, 0, 0, 818640, 0
Offset: 1

Views

Author

Max Alekseyev, Mar 02 2004

Keywords

Comments

For a given n, the Mathematica program uses backtracking to count the solutions. The solutions can be printed by uncommenting the print statement. It is very time-consuming for large n. A092671 gives the n that yield a(n) > 0. - T. D. Noe, Mar 26 2004

Examples

			a(6) = 1 since there is the only fraction 1 = 1/2+1/3+1/6.
		

Crossrefs

Programs

  • Mathematica
    n=20; try2[lev_, s_] := Module[{nmim, nmax, si, i}, AppendTo[soln, 0]; If[lev==1, nmin=2, nmin=1+soln[[ -2]]]; nmax=n-1; Do[If[iT. D. Noe, Mar 26 2004 *)

Formula

a(n) = A092670(n) - A092670(n-1).

Extensions

More terms from T. D. Noe, Mar 26 2004
More terms from T. Suzuki (suzuki(AT)scio.co.jp), Nov 24 2006

A379335 Number of subsets of {-n..n} whose sum of reciprocals is 1.

Original entry on oeis.org

1, 2, 4, 8, 16, 48, 96, 192, 384, 768, 1536, 5632, 11264, 22528, 77312, 154624, 309248, 922624, 1845248, 6848512, 17096576, 34193152, 68386304, 272849152
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 21 2024

Keywords

Comments

Number of ways of writing 1 as Sum_{k=-n..n, k<>0} e(k)/k, where e(k) is 0 or 1.

Examples

			a(3) = 4 subsets: {1}, {-3, 1, 3}, {-2, 1, 2}, {-3, -2, 1, 2, 3}.
		

Crossrefs

Cf. A092670.

Programs

  • Python
    from functools import cache
    from fractions import Fraction
    @cache
    def b(i, s):
        if i == 0: return 1 if s == 1 else 0
        return b(i-1, s) + b(i-1, s+Fraction(1, (-1)**(i&1)*((i+1)>>1)))
    a = lambda n: b(2*n, 0)
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Dec 21 2024

Formula

a(n) <= 2*a(n-1) since we count s and s union {-1/n, 1/n} for each subset s counted in a(n-1); equality holds for n prime (and other cases). - Michael S. Branicky, Dec 21 2024

Extensions

a(12)-a(24) from Michael S. Branicky, Dec 21 2024

A305442 Number of subsets of {1, 2, ..., n} such that the sum of the reciprocals is strictly less than 1.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 501, 918, 1686, 3110, 5724, 10543, 19435, 35857, 66198, 122294, 226135, 418351, 774372, 1434089, 2657205, 4925796, 9135403, 16949546, 31460330, 58415177, 108502732, 201603881, 374707879, 696649896, 1295562234, 2410000999
Offset: 0

Views

Author

Peter Kagey, Jun 01 2018

Keywords

Examples

			For n = 4 the a(4) = 7 subsets are:
{}     because 0 < 1,
{2}    because 1/2 < 1,
{2, 3} because 1/2 + 1/3 = 5/6 < 1,
{2, 4} because 1/2 + 1/4 = 3/4 < 1,
{3}    because 1/3 < 1,
{3, 4} because 1/3 + 1/4 = 7/12 < 1, and
{4}    because 1/4 < 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := 1 + Length@ Select[Subsets[Range[2,n], {1, n-1}], Total[1/#] < 1  &]; Array[a, 15] (* Giovanni Resta, Jun 01 2018 *)

Formula

a(n) = A212657(n) - A092670(n).

Extensions

a(26)-a(36) from Giovanni Resta, Jun 01 2018

A339569 Number of subsets of {1..n} whose cardinality is equal to the root-mean-square of the elements.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 10, 16, 32, 56, 90, 134, 186, 304, 476, 746, 1308, 2522, 4845, 9129, 17260, 32684, 59908, 106181, 191779, 337793, 596689, 1061991, 1907311, 3518903, 6426672, 12093858, 22777645, 42886411, 81002076, 151575988, 285280108, 529313088
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 09 2020

Keywords

Examples

			a(12) = 10 subsets: {1}, {1, 2, 4, 5, 7, 11}, {1, 3, 5, 6, 8, 9}, {3, 4, 5, 6, 7, 9}, {1, 2, 3, 6, 7, 10, 12}, {2, 3, 4, 5, 8, 9, 12}, {2, 3, 6, 7, 8, 9, 10}, {3, 4, 5, 6, 7, 8, 12}, {1, 2, 5, 6, 9, 10, 11, 12} and {1, 4, 6, 7, 8, 9, 11, 12}.
		

Crossrefs

Programs

  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def b(n, sos, c):
      if n == 0:
        if c>0:
          if sos==c*c*c: return 1
        return 0
      return b(n-1, sos, c) + b(n-1, sos+n*n, c+1)
    a = lambda n: b(n, 0, 0)
    print([a(n) for n in range(1, 44)]) # Michael S. Branicky, Dec 10 2020

Extensions

a(24)-a(43) from Michael S. Branicky, Dec 09 2020
Showing 1-6 of 6 results.