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

A060177 Triangle of generalized sum of divisors function, read by rows.

Original entry on oeis.org

1, 2, 1, 2, 2, 3, 5, 2, 1, 6, 4, 2, 11, 2, 5, 13, 4, 10, 17, 3, 1, 15, 22, 4, 2, 25, 27, 2, 5, 37, 29, 6, 10, 52, 37, 2, 20, 67, 44, 4, 1, 30, 97, 44, 4, 2, 52, 117, 55, 5, 5, 77, 154, 59, 2, 10, 117, 184, 68, 6, 20, 162, 235, 71, 2, 36, 227, 277, 81, 6, 1, 58, 309, 338
Offset: 1

Views

Author

N. J. A. Sloane, Mar 20 2001

Keywords

Comments

Lengths of rows are 1 1 2 2 2 3 3 3 3 4 4 4 4 4 ... (A003056).

Examples

			Triangle turned on its side begins:
  1  2  2  3  2  4  2  4  3  4  2  6 ...
        1  2  5  6 11 13 17 22 27 29 ...
                 1  2  5 10 15 25 37 ...
                             1  2  5 ...
		

Crossrefs

Cf. A116608 (reflected rows). - Alois P. Heinz, Jan 29 2014

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          expand(b(n, i-1) +x*add(b(n-i*j, i-1), j=1..n/i))))
        end:
    T:= n->(p->seq(coeff(p, x, degree(p)-k), k=0..degree(p)-1))(b(n$2)):
    seq(T(n), n=1..25);  # Alois P. Heinz, Jan 29 2014
  • Mathematica
    Reverse /@ Table[Length /@ Split[ Sort[Map[Length, Split /@ IntegerPartitions[n], {1}]]], {n, 24}] (* Wouter Meeussen, Apr 21 2012, updated by Jean-François Alcover, Jan 29 2014 *)
  • Python
    from math import isqrt
    from itertools import count, islice
    from sympy.utilities.iterables import partitions
    def A060177_gen(): # generator of terms
        return (sum(1 for p in partitions(n) if len(p)==k) for n in count(1) for k in range(isqrt((n<<3)+1)-1>>1,0,-1))
    A060177_list = list(islice(A060177_gen(),30)) # Chai Wah Wu, Sep 15 2023

Formula

T(n,k) = Partitions of n using only k types of piles. Also, Sum_{k=1..A003056(n)} T(n,k)*k = A000070(n). Also, Sum_{k=1..A003056(n)} T(n,k)*(k-1) = A058884(n). - Naohiro Nomoto, Jan 24 2002
G.f. for k-th diagonal (the k-th row of the sideways triangle shown in the example): Sum_{ m_1 < m_2 < ... < m_k} q^(m_1+m_2+...+m_k)/((1-q^m_1)*(1-q^m_2)*...*(1-q^m_k)) = Sum_n T(n, k)*q^n.

Extensions

More terms from Naohiro Nomoto, Jan 24 2002

A365676 Triangle read by rows: T(n, k) is the number of partitions of n having exactly k distinct part sizes, for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 0, 2, 1, 0, 0, 3, 2, 0, 0, 0, 2, 5, 0, 0, 0, 0, 4, 6, 1, 0, 0, 0, 0, 2, 11, 2, 0, 0, 0, 0, 0, 4, 13, 5, 0, 0, 0, 0, 0, 0, 3, 17, 10, 0, 0, 0, 0, 0, 0, 0, 4, 22, 15, 1, 0, 0, 0, 0, 0, 0, 0, 2, 27, 25, 2, 0, 0, 0, 0, 0, 0, 0, 0, 6, 29, 37, 5, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Peter Luschny, Sep 15 2023

Keywords

Examples

			Triangle T(n, k) starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 2,  0;
  [3] 0, 2,  1,  0;
  [4] 0, 3,  2,  0, 0;
  [5] 0, 2,  5,  0, 0, 0;
  [6] 0, 4,  6,  1, 0, 0, 0;
  [7] 0, 2, 11,  2, 0, 0, 0, 0;
  [8] 0, 4, 13,  5, 0, 0, 0, 0, 0;
  [9] 0, 3, 17, 10, 0, 0, 0, 0, 0, 0;
		

Crossrefs

Variants: A116608 (nonzero terms), A060177.
Cf. A000041 (row sums), A000005 (T(n,1)), A002133 (T(n,2)), A002134 (T(n,3)), A365630 (T(n,4)), A365631 (T(n,5)).

Programs

  • Maple
    P := proc(n, k, r) option remember; local j;  # after Amir Livne Bar-on
      if n = 0 then return ifelse(k = 0, 1, 0) fi;
      if k = 0 or r = 0 then return 0 fi;
      add(P(n - r * j, k - 1, r - 1), j = 1..iquo(n, r)) + P(n, k, r - 1) end:
    A365676row := n -> local k; seq(P(n, k, n), k = 0..n):
    seq(print(A365676row(n)), n = 0..9);
    # Using the generating function:
    p := product(1 + t*x^j/(1 - x^j), j = 1..20):
    ser := series(p, x, 20):
    seq(seq(coeff(coeff(ser, x, n), t, k), k = 0..n), n = 0..9);
  • Mathematica
    P[n_, k_, r_] := P[n, k, r] = Which[n == 0, If[k == 0, 1, 0], k == 0 || r == 0, 0, True, Sum[P[n-r*j, k-1, r-1], {j, 1, Quotient[n, r]}]+P[n, k, r-1]]; A365676row[n_] := Table[P[n, k, n], {k, 0, n}]; Table[A365676row[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Oct 21 2023, from 1st Maple program *)
  • PARI
    T(n,k) = my(nb=0); forpart(p=n, if (#Set(p) == k, nb++)); nb; \\ Michel Marcus, Sep 17 2023
  • Python
    # after Amir Livne Bar-on
    from functools import cache
    @cache
    def P(n: int, k: int, r: int) -> int:
        if n == 0: return 1 if k == 0 else 0
        if k == 0 or r == 0: return 0
        return sum(P(n - r * j, k - 1, r - 1)
                   for j in range(1, n // r + 1)) + P(n, k, r - 1)
    def A365676Row(n) -> list[int]:
        return [P(n, k, n) for k in range(n + 1)]
    for n in range(10): print(A365676Row(n))
    

Formula

T(n, k) = [t^k][x^n] Product_{j>=1} (1 + t*x^j / (1 - x^j)).
T(n, k) = 0 for n>0 and k=0. T(n,k) = 0 for k > floor([sqrt(1+8n)-1]/2). - Chai Wah Wu, Sep 15 2023

A365631 Number of partitions of n with exactly five part sizes.

Original entry on oeis.org

1, 2, 5, 10, 20, 36, 58, 95, 147, 222, 323, 462, 636, 889, 1184, 1584, 2060, 2686, 3403, 4353, 5433, 6768, 8319, 10230, 12363, 15011, 17943, 21467, 25403, 30044, 35231, 41294, 48002, 55718, 64328, 74086, 84880, 97071, 110607, 125692, 142313, 160728, 181112, 203438, 228124
Offset: 15

Views

Author

Seiichi Manyama, Sep 13 2023

Keywords

Examples

			a(16) = 2 because we have 6+4+3+2+1, 5+4+3+2+1+1.
		

Crossrefs

A diagonal of A060177.
Column k=5 of A116608.
Cf. A364809.

Programs

  • Maple
    # Using function P from A365676:
    A365631 := n -> P(n, 5, n): seq(A365631(n), n = 15..59); # Peter Luschny, Sep 15 2023
  • Python
    from sympy.utilities.iterables import partitions
    def A365631(n): return sum(1 for p in partitions(n) if len(p)==5) # Chai Wah Wu, Sep 14 2023

Formula

G.f.: Sum_{0

A365664 Expansion of Sum_{0

Original entry on oeis.org

1, 3, 9, 22, 51, 97, 188, 330, 568, 918, 1452, 2233, 3344, 4884, 7004, 9856, 13653, 18699, 25080, 33462, 43918, 57304, 73668, 94482, 119262, 150285, 187231, 232560, 285660, 350746, 425627, 516477, 620731, 745503, 887796, 1056669, 1247521, 1472460, 1726054, 2021327
Offset: 10

Author

Seiichi Manyama, Sep 15 2023

Keywords

Comments

Number of partitions of n with four designated summands. For example: a(11) = 3 because there are three partitions of 11 with four designated summands: [5'+ 3'+ 2'+ 1'], [4'+ 3'+ 2'+ 1'+ 1], [4'+ 3'+ 2'+ 1 + 1']. - Omar E. Pol, Jul 26 2025

Crossrefs

A diagonal of A060043.
Column k=4 of A385001.

Programs

  • Mathematica
    a[n_] := Module[{d = DivisorSigma[{1, 3, 5, 7}, n]}, (5*d[[4]] - (126*n-441)*d[[3]] + (756*n^2-4410*n+4935)*d[[2]] - (840*n^3-5880*n^2+9870*n-3229)*d[[1]])/967680]; Array[a, 40, 10] (* Amiram Eldar, Jan 07 2025 *)
  • PARI
    a(n) = (5*sigma(n, 7)-(126*n-441)*sigma(n, 5)+(756*n^2-4410*n+4935)*sigma(n, 3)-(840*n^3-5880*n^2+9870*n-3229)*sigma(n))/967680; \\ Seiichi Manyama, Jul 24 2024

Formula

G.f.: (1/9) * ( Sum_{k>=4} (-1)^k * (2*k+1) * binomial(k+4,8) * q^(k*(k+1)/2) ) / ( Sum_{k>=0} (-1)^k * (2*k+1) * q^(k*(k+1)/2) ).
a(n) = (5*sigma_7(n) - (126*n-441)*sigma_5(n) + (756*n^2-4410*n+4935)*sigma_3(n) - (840*n^3-5880*n^2+9870*n-3229)*sigma(n))/967680. - Seiichi Manyama, Jul 24 2024
Sum_{k=1..n} a(k) ~ Pi^8 * n^8 / (8!*9!). - Vaclav Kotesovec, Aug 01 2025

A364793 Number of partitions of n with at most four part sizes.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 175, 229, 292, 375, 470, 591, 733, 905, 1103, 1343, 1615, 1938, 2309, 2726, 3211, 3758, 4379, 5069, 5865, 6716, 7694, 8769, 9967, 11254, 12732, 14264, 16025, 17877, 19959, 22149, 24605, 27147, 30012, 33006, 36294, 39742, 43573, 47524
Offset: 0

Author

Seiichi Manyama, Sep 14 2023

Keywords

Crossrefs

Programs

  • Python
    from sympy.utilities.iterables import partitions
    def A364793(n): return sum(1 for p in partitions(n) if len(p)<=4) # Chai Wah Wu, Sep 14 2023

Formula

a(n) = Sum_{k=1..4} A116608(n,k).
Showing 1-5 of 5 results.