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

A365630 Number of partitions of n with exactly four part sizes.

Original entry on oeis.org

1, 2, 5, 10, 20, 30, 52, 77, 117, 162, 227, 309, 414, 535, 692, 873, 1100, 1369, 1661, 2030, 2438, 2925, 3450, 4108, 4759, 5570, 6440, 7457, 8491, 9798, 11020, 12593, 14125, 15995, 17820, 20074, 22182, 24833, 27379, 30422, 33351, 36996, 40346, 44445, 48336, 53048, 57494
Offset: 10

Views

Author

Seiichi Manyama, Sep 13 2023

Keywords

Examples

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

Crossrefs

A diagonal of A060177.
Column k=4 of A116608.

Programs

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

Formula

G.f.: Sum_{0

A365665 Expansion of Sum_{0

Original entry on oeis.org

1, 3, 9, 22, 51, 108, 208, 390, 693, 1193, 1977, 3195, 4995, 7722, 11583, 17164, 24882, 35685, 50205, 70083, 96300, 131101, 176358, 235377, 310651, 407352, 529074, 682750, 874038, 1112085, 1405521, 1766259, 2206413, 2741431, 3389052, 4168089, 5103450, 6218469
Offset: 15

Author

Seiichi Manyama, Sep 15 2023

Keywords

Comments

Number of partitions of n with five designated summands (when part i has multiplicity j > 0 exactly one part i is "designated"). For example: a(16) = 3 because there are three partitions of 16 with five designated summands: [6'+ 4'+ 3'+ 2'+ 1'], [5'+ 4'+ 3'+ 2'+ 1'+ 1], [5'+ 4'+ 3'+ 2'+ 1 + 1']. - Omar E. Pol, Jul 29 2025

Crossrefs

A diagonal of A060043.
Column k=5 of A385001.
Cf. A384926.

Programs

  • Mathematica
    nmax = 60; Drop[CoefficientList[Series[-1/11 * Sum[(-1)^k*(2*k + 1)*Binomial[k + 5, 10]*x^(k*(k + 1)/2), {k, 5, nmax}]/Sum[(-1)^k*(2*k + 1)*x^(k*(k + 1)/2), {k, 0, nmax}], {x, 0, nmax}], x], 15] (* Vaclav Kotesovec, Jul 29 2025 *)
    (* or *)
    Table[(10679/17203200 - 1571*n/774144 + 133*n^2/92160 - n^3/3072 + n^4/46080) * DivisorSigma[1, n] + (1571/1548288 - 133*n/122880 + 3*n^2/10240 - n^3/46080) * DivisorSigma[3, n] + (133/1228800 - n/20480 + n^2/215040) * DivisorSigma[5, n] + (1/516096 - n/3096576) * DivisorSigma[7, n] + DivisorSigma[9, n]/154828800, {n, 15, 60}] (* Vaclav Kotesovec, Jul 29 2025 *)

Formula

G.f.: -(1/11) * ( Sum_{k>=5} (-1)^k * (2*k+1) * binomial(k+5,10) * q^(k*(k+1)/2) ) / ( Sum_{k>=0} (-1)^k * (2*k+1) * q^(k*(k+1)/2) ).
From Vaclav Kotesovec, Jul 29 2025: (Start)
a(n) = (10679/17203200 - 1571*n/774144 + 133*n^2/92160 - n^3/3072 + n^4/46080)*sigma(n) + (1571/1548288 - 133*n/122880 + 3*n^2/10240 - n^3/46080)*sigma_3(n) + (133/1228800 - n/20480 + n^2/215040)*sigma_5(n) + (1/516096 - n/3096576)*sigma_7(n) + sigma_9(n)/154828800.
Sum_{k=1..n} a(k) ~ Pi^10 * n^10 / 144850083840000.
(End)

A364809 Number of partitions of n with at most five part sizes.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 231, 297, 385, 490, 627, 791, 1000, 1250, 1565, 1938, 2400, 2945, 3615, 4395, 5342, 6439, 7755, 9268, 11069, 13127, 15537, 18286, 21484, 25095, 29275, 33968, 39344, 45362, 52193, 59836, 68441, 78014, 88724, 100622, 113828
Offset: 0

Author

Seiichi Manyama, Sep 14 2023

Keywords

Crossrefs

Programs

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

Formula

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