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

A181843 Triangle read by rows: Partial row sums of A181842.

Original entry on oeis.org

1, 1, 3, 1, 3, 6, 1, 3, 8, 12, 1, 3, 8, 18, 23, 1, 3, 8, 20, 32, 38, 1, 3, 8, 20, 38, 66, 73, 1, 3, 8, 20, 40, 78, 110, 118, 1, 3, 8, 20, 40, 84, 141, 189, 198, 1, 3, 8, 20, 40, 86, 153, 253, 308, 318, 1, 3, 8, 20, 40, 86, 159, 287, 409, 519, 530, 1, 3, 8, 20, 40, 86, 161, 299, 476, 728, 807, 819
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Examples

			[1]   1
[2]   1   3
[3]   1   3   6
[4]   1   3   8   12
[5]   1   3   8   18   23
[6]   1   3   8   20   32   38
[7]   1   3   8   20   38   66   73
		

Crossrefs

Programs

  • Maple
    with(combstruct):
    a181843_row := proc(n) local k,L,l,R,part;
    R := NULL; L := 0;
    for k from 1 to n do
       part := iterstructs(Partition(n),size=n-k+1):
       while not finished(part) do
          l := nextstruct(part);
          L := L + ilcm(op(l));
       od;
       R := R,L;
    od;
    R end:
  • Mathematica
    t[n_, k_] := LCM @@@ IntegerPartitions[n, {n - k + 1}] // Total; row[n_] := Table[t[n, k], {k, 1, n}] // Accumulate; Table[row[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jul 26 2013 *)

Extensions

Terms from an erroneous copy and paste transfer corrected.
More terms from Jean-François Alcover, Jul 26 2013

A181844 Sum over all partitions of n of the LCM of the parts.

Original entry on oeis.org

1, 1, 3, 6, 12, 23, 38, 73, 118, 198, 318, 530, 819, 1298, 1974, 2975, 4516, 6698, 9980, 14550, 21186, 30304, 43503, 62030, 87908, 123292, 172543, 239720, 331688, 458198, 629376, 860332, 1168172, 1583176, 2138438, 2876283, 3859770, 5159886, 6863702, 9112356
Offset: 0

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

Old name was: Row sums of A181842.

Crossrefs

Cf. A078392 (the same for GCD), A181843, A181842, A256067, A256553, A256554, A306956.

Programs

  • Maple
    with(combstruct):
    a181844 := proc(n) local k,L,l,R,part;
    R := NULL; L := 0;
    for k from 1 to n do
       part := iterstructs(Partition(n),size=k):
       while not finished(part) do
          l := nextstruct(part);
          L := L + ilcm(op(l));
       od;
    od;
    L end:
    # second Maple program:
    b:= proc(n, i, r) option remember; `if`(n=0, r, `if`(i<1, 0,
           b(n, i-1, r)+b(n-i, min(i, n-i), ilcm(i, r))))
        end:
    a:= n-> b(n$2, 1):
    seq(a(n), n=0..42);  # Alois P. Heinz, Mar 18 2019
  • Mathematica
    t[n_, k_] := LCM @@@ IntegerPartitions[n, {n - k + 1}] // Total; a[n_] := Sum[t[n, k], {k, 1, n}]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Jul 26 2013 *)

Formula

a(n) = Sum_{k>=0} k * A256067(n,k) = Sum_{k>=0} A256553(n,k)*A256554(n,k). - Alois P. Heinz, Apr 02 2015

Extensions

a(0)=1 prepended by Alois P. Heinz, Mar 29 2015
New name from Alois P. Heinz, Mar 18 2019

A181853 Triangle read by rows: T(n,k) = Sum_{c in C(n,k)} lcm(c) where C(n,k) is the set of all k-subsets of {1,2,...,n}.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 6, 11, 6, 1, 10, 31, 34, 12, 1, 15, 81, 189, 182, 60, 1, 21, 141, 393, 494, 282, 60, 1, 28, 288, 1380, 3245, 3740, 2034, 420, 1, 36, 456, 2716, 8293, 13268, 11338, 4908, 840, 1, 45, 726, 5578, 22207, 47351, 57598, 40602, 15564, 2520
Offset: 0

Views

Author

Peter Luschny, Dec 06 2010

Keywords

Comments

The C(n,k) are also called combinations of n with size k (see A181842).
Main diagonal gives: A003418. Lower diagonal gives: A094308. Column k=1 gives: A000217. - Alois P. Heinz, Jul 29 2013

Examples

			[0]   1
[1]   1    1
[2]   1    3     2
[3]   1    6    11     6
[4]   1   10    31    34    12
[5]   1   15    81   189   182    60
[6]   1   21   141   393   494   282   60
		

Crossrefs

Row sums give A226037.

Programs

  • Maple
    with(combstruct):
    a181853_row := proc(n) local k,L,l,R,comb;
    R := NULL;
    for k from 0 to n do
       L := 0;
       comb := iterstructs(Combination(n),size=k):
       while not finished(comb) do
          l := nextstruct(comb);
          L := L + ilcm(op(l));
       od;
       R := R,L;
    od;
    R end:
    # second Maple program:
    b:= proc(n, k) option remember; `if`(k=0, [1],
         [`if`(k add(c, c=b(n, k)):
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Jul 29 2013
    # third Maple program:
    b:= proc(n, m) option remember; expand(`if`(n=0, m,
          b(n-1, ilcm(m, n))*x+b(n-1, m)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Sep 05 2023
  • Mathematica
    t[, 0] = 1; t[n, k_] := Sum[LCM @@ c, {c, Subsets[Range[n], {k}]}]; Table[t[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 29 2013 *)
  • Sage
    # (After Alois P. Heinz)
    @CachedFunction
    def b(n, k):
        if k == 0: return [1]
        w = b(n-1, k) if kPeter Luschny, Jul 29 2013

A181851 Triangle read by rows: T(n,k) = Sum_{c in composition(n,k)} lcm(c).

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 8, 6, 1, 5, 20, 15, 8, 1, 6, 21, 50, 24, 10, 1, 7, 56, 66, 96, 35, 12, 1, 8, 60, 180, 160, 160, 48, 14, 1, 9, 96, 264, 432, 325, 244, 63, 16, 1, 10, 105, 510, 776, 892, 585, 350, 80, 18, 1, 11, 220, 567, 1704, 1835, 1668, 966, 480, 99, 20, 1
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

Composition(n,k) is the set of the k-tuples of positive integers which sum to n (see A181842). Taking the example in A181842, T(6,2) = lcm(5,1) + lcm(4,2) + lcm(3,3) + lcm(2,4) + lcm(1,5) = 5+4+3+4+5 = 21.

Examples

			[1]   1
[2]   2    1
[3]   3    4    1
[4]   4    8    6    1
[5]   5   20   15    8    1
[6]   6   21   50   24   10    1
[7]   7   56   66   96   35   12   1
		

Crossrefs

T(2n,n) gives A373865.

Programs

  • Maple
    with(combstruct):
    a181851_row := proc(n) local k,L,l,R,comp;
    R := NULL;
    for k from 1 to n do
       L := 0;
       comp := iterstructs(Composition(n),size=k):
       while not finished(comp) do
          l := nextstruct(comp);
          L := L + ilcm(op(l));
       od;
       R := R,L;
    od;
    R end:
  • Mathematica
    c[n_, k_] := Permutations /@ IntegerPartitions[n, {k}] // Flatten[#, 1]&; t[n_, k_] := Total[LCM @@@ c[n, k]]; Table[t[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 05 2014 *)

A181847 Triangle read by rows: T(n,k)= Sum_{c in C(n,k)}gcd(c) where C(n,k) is the set of all k-tuples of positive integers whose elements sum to n.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 4, 3, 1, 5, 4, 6, 4, 1, 6, 9, 11, 10, 5, 1, 7, 6, 15, 20, 15, 6, 1, 8, 12, 24, 36, 35, 21, 7, 1, 9, 12, 30, 56, 70, 56, 28, 8, 1, 10, 17, 42, 88, 127, 126, 84, 36, 9, 1
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

C(n,k) counted by A007318(n-1,k-1) are also called compositions of n of size k (see A181842).

Examples

			[1]   1
[2]   2   1
[3]   3   2    1
[4]   4   4    3    1
[5]   5   4    6    4    1
[6]   6   9   11   10    5   1
[7]   7   6   15   20   15   6   1
		

Crossrefs

Programs

  • Maple
    with(combstruct): # By generating the objects, very inefficient.
    a181847_row := proc(n) local k,L,l,R,comp; R := NULL;
    for k from 1 to n do
       L := 0;
       comp := iterstructs(Composition(n),size=k):
       while not finished(comp) do
          l := nextstruct(comp);
          L := L + igcd(op(l));
       od;
       R := R,L;
    od;
    R end:
    # second Maple program:
    with(numtheory):
    T := (n, k) -> add(phi(d)*binomial(n/d-1, k-1), d = divisors(n)):
    seq(seq(T(n, k), k=1..n), n=1..10); # Peter Luschny, Aug 27 2019
  • Sage
    # uses[DivisorTriangle from A327029]
    # DivisorTriangle Computes the (0,0)-based version.
    DivisorTriangle(euler_phi, lambda n,k: binomial(n-1, k-1), 10) # Peter Luschny, Aug 27 2019

A181845 Triangle read by rows: T(n,k) = max_{c in P(n,n-k+1)} lcm(c) where P(n,m) = A008284(n,m) is the number of partitions of n into m parts.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 6, 5, 1, 2, 3, 6, 5, 6, 1, 2, 3, 6, 6, 12, 7, 1, 2, 3, 6, 6, 12, 15, 8, 1, 2, 3, 6, 6, 12, 15, 20, 9, 1, 2, 3, 6, 6, 12, 15, 30, 21, 10, 1, 2, 3, 6, 6, 12, 15, 30, 21, 30, 11, 1, 2, 3, 6, 6, 12, 15, 30, 30, 60, 35, 12
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

See A181842 for the definition of 'partition'. T(n,k) is also the triangle read by rows: T(n,k) = max_{c in C(n,n-k+1)} lcm(c) where C(n,m) is the set of all m-tuples of positive integers whose elements sum to n where the C(n,k) = A007318(n-1,k-1) are called compositions of n of size k.

Examples

			[1]   1
[2]   1   2
[3]   1   2   3
[4]   1   2   3   4
[5]   1   2   3   6   5
[6]   1   2   3   6   5   6
[7]   1   2   3   6   6   12   7
[8]   1   2   3   6   6   12   15   8
[9]   1   2   3   6   6   12   15   20   9
		

Crossrefs

Programs

  • Maple
    with(combstruct):
    a181845_row := proc(n) local k,L,l,R,part;
    R := NULL;
    for k from 1 to n do
       L := 0;
       part := iterstructs(Partition(n),size=n-k+1):
    # alternatively (but slower)
    # part := iterstructs(Composition(n), size=n-k+1):
       while not finished(part) do
          l := nextstruct(part);
          L := max(L,ilcm(op(l)));
       od;
       R := R,L;
    od;
    R end:
  • PARI
    Row(n)={my(v=vector(n)); forpart(p=n, my(i=#p); v[i]=max(v[i], lcm(Vec(p)))); Vecrev(v)}
    { for(n=1, 10, print(Row(n))) } \\ Andrew Howroyd, Apr 20 2021

Extensions

Terms a(56) and beyond from Andrew Howroyd, Apr 20 2021

A181846 Triangle read by rows: T(n,k) = Sum_{c in P(n,n-k+1)} gcd(c) where P(n,m) = A008284(n,m) is the number of partitions of n into m parts.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 1, 3, 4, 1, 1, 2, 2, 5, 1, 1, 2, 4, 6, 6, 1, 1, 2, 3, 4, 3, 7, 1, 1, 2, 3, 6, 6, 8, 8, 1, 1, 2, 3, 5, 6, 9, 6, 9, 1, 1, 2, 3, 5, 8, 10, 10, 11, 10, 1, 1, 2, 3, 5, 7, 10, 11, 10, 5, 11, 1, 1, 2, 3, 5, 7, 12, 14, 19, 19, 17, 12, 1, 1, 2, 3, 5, 7, 11, 14, 18, 18, 14, 6, 13
Offset: 1

Views

Author

Peter Luschny, Dec 07 2010

Keywords

Comments

See A181842 for the definition of 'partition'.

Examples

			[1]   1
[2]   1   2
[3]   1   1   3
[4]   1   1   3   4
[5]   1   1   2   2   5
[6]   1   1   2   4   6   6
[7]   1   1   2   3   4   3   7
		

Crossrefs

Cf. A078392.

Programs

  • Maple
    with(combstruct):
    a181846_row := proc(n) local k,L,l,R,part;
    R := NULL;
    for k from 1 to n do
       L := 0;
       part := iterstructs(Partition(n),size=n-k+1):
       while not finished(part) do
          l := nextstruct(part);
          L := L + igcd(op(l));
       od;
       R := R,L;
    od;
    R end:
  • Mathematica
    T[n_, k_] := GCD @@@ IntegerPartitions[n, {n-k+1}] // Total;
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] (* Jean-François Alcover, Jun 22 2019 *)

Extensions

Extended to 13 rows by Jean-François Alcover, Jun 22 2019
Showing 1-7 of 7 results.