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.

A118096 Number of partitions of n such that the largest part is twice the smallest part.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 3, 4, 6, 6, 6, 10, 9, 11, 13, 14, 15, 20, 18, 23, 25, 27, 27, 37, 35, 39, 43, 48, 49, 61, 57, 68, 72, 78, 81, 97, 95, 107, 114, 127, 128, 150, 148, 168, 179, 191, 198, 229, 230, 254, 266, 291, 300, 338, 344, 379, 398, 427, 444, 498, 505, 550, 580, 625
Offset: 1

Views

Author

Emeric Deutsch, Apr 12 2006

Keywords

Comments

Also number of partitions of n such that if the largest part occurs k times, then the number of parts is 2k. Example: a(8)=4 because we have [7,1], [6,2], [5,3] and [3,3,1,1].

Examples

			a(8)=4 because we have [4,2,2], [2,2,2,1,1], [2,2,1,1,1,1] and [2,1,1,1,1,1,1].
		

Crossrefs

Programs

  • Maple
    g:=sum(x^(3*k)/product(1-x^j,j=k..2*k),k=1..30): gser:=series(g,x=0,75): seq(coeff(gser,x,n),n=1..70);
    # second Maple program:
    b:= proc(n, i, t) option remember: `if`(n=0, 1, `if`(in, 0, b(n-i, i, t))))
        end:
    a:= n-> add(b(n-3*j, 2*j, j), j=1..n/3):
    seq(a(n), n=1..64);  # Alois P. Heinz, Sep 04 2017
  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; 2 Min[p] = = Max[p]], {n, 40}] (* Clark Kimberling, Feb 16 2014 *)
    (* Second program: *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < t, 0,
         b[n, i - 1, t] + If[i > n, 0, b[n - i, i, t]]]];
    a[n_] := Sum[b[n - 3j, 2j, j], {j, 1, n/3}];
    Array[a, 64] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
    (* Third program: *)
    nmax = 100; p = 1; s = 0; Do[p = Simplify[p*(1 - x^(2*k - 1))*(1 - x^(2*k))/(1 - x^k)]; p = Normal[p + O[x]^(nmax+1)]; s += x^(3*k)/(1 - x^k)/p;, {k, 1, nmax}]; Rest[CoefficientList[Series[s, {x, 0, nmax}], x]] (* Vaclav Kotesovec, Jun 16 2025 *)
  • PARI
    my(N=70, x='x+O('x^N)); concat([0, 0], Vec(sum(k=1, N, x^(3*k)/prod(j=k, 2*k, 1-x^j)))) \\ Seiichi Manyama, May 14 2023

Formula

G.f.: Sum_{k>=1} x^(3*k)/Product_{j=k..2*k} (1-x^j).
a(n) ~ exp(Pi*sqrt(2*n/15)) / (5^(1/4)*sqrt(2*phi*n)), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jun 13 2025

A237753 Number of partitions of n such that 2*(greatest part) = (number of parts).

Original entry on oeis.org

0, 1, 0, 0, 1, 1, 1, 2, 1, 2, 3, 4, 5, 7, 7, 9, 12, 15, 17, 23, 27, 34, 42, 50, 60, 75, 87, 106, 128, 154, 182, 222, 260, 311, 369, 437, 515, 613, 716, 845, 993, 1166, 1361, 1599, 1861, 2176, 2534, 2950, 3422, 3983, 4605, 5339, 6174, 7136, 8227, 9500, 10928
Offset: 1

Views

Author

Clark Kimberling, Feb 13 2014

Keywords

Comments

Also, the number of partitions of n such that (greatest part) = 2*(number of parts); hence, the number of partitions of n such that (rank + greatest part) = 0.

Examples

			a(8) = 2 counts these partitions:  311111, 2222.
		

Crossrefs

Programs

  • Mathematica
    z = 50; Table[Count[IntegerPartitions[n], p_ /; 2 Max[p] = = Length[p]], {n, z}]
    (* or *)
    nmax = 100; Rest[CoefficientList[Series[Sum[x^(3*k-1) * Product[(1 - x^(2*k+j-1)) / (1 - x^j), {j, 1, k-1}], {k, 1, nmax/3 + 1}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Oct 15 2024 *)
    nmax = 100; p = x; s = x; Do[p = Normal[Series[p*x^3*(1 - x^(3*k - 1))*(1 - x^(3*k))*(1 - x^(3*k + 1))/((1 - x^(2*k + 1))*(1 - x^(2*k))*(1 - x^k)), {x, 0, nmax}]]; s += p;, {k, 1, nmax/3 + 1}]; Take[CoefficientList[s, x], nmax] (* Vaclav Kotesovec, Oct 16 2024 *)
  • PARI
    my(N=66, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, x^(3*k-1)*prod(j=1, k-1, (1-x^(2*k+j-1))/(1-x^j))))) \\ Seiichi Manyama, Jan 24 2022

Formula

G.f.: Sum_{k>=1} x^(3*k-1) * Product_{j=1..k-1} (1-x^(2*k+j-1))/(1-x^j). - Seiichi Manyama, Jan 24 2022
a(n) ~ Pi^2 * exp(Pi*sqrt(2*n/3)) / (4 * 3^(3/2) * n^2). - Vaclav Kotesovec, Oct 17 2024

A350890 Triangle T(n,k), n >= 1, 1 <= k <= n, read by rows, where T(n,k) is the number of partitions of n such that (smallest part) = k*(number of parts).

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jan 21 2022

Keywords

Comments

Column k is asymptotic to (1 - alfa) * exp(2*sqrt(n*(k*log(alfa)^2 + polylog(2, 1 - alfa)))) * (k*log(alfa)^2 + polylog(2, 1 - alfa))^(1/4) / (2*sqrt(Pi) * sqrt(alfa + 2*k - 2*alfa*k) * n^(3/4)), where alfa is positive real root of the equation alfa^(2*k) + alfa - 1 = 0. - Vaclav Kotesovec, Jan 21 2022

Examples

			Triangle begins:
  1;
  0, 1;
  0, 0, 1;
  1, 0, 0, 1;
  1, 0, 0, 0, 1;
  1, 0, 0, 0, 0, 1;
  1, 0, 0, 0, 0, 0, 1;
  1, 1, 0, 0, 0, 0, 0, 1;
  2, 1, 0, 0, 0, 0, 0, 0, 1;
  2, 1, 0, 0, 0, 0, 0, 0, 0, 1;
  3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1;
		

Crossrefs

Row sums give A168656.
Column k=1..5 give A006141, A350893, A350894, A350898, A350899.

Programs

  • PARI
    T(n, k) = polcoef(sum(i=1, sqrtint(n\k), x^(k*i^2)/prod(j=1, i-1, 1-x^j+x*O(x^n))), n);
    
  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
    end
    def A(n)
      a = Array.new(n, 0)
      partition(n, 1, n).each{|ary|
        (1..n).each{|i|
          a[i - 1] += 1 if ary[-1] == i * ary.size
        }
      }
      a
    end
    def A350890(n)
      (1..n).map{|i| A(i)}.flatten
    end
    p A350890(14)

Formula

G.f. of column k: Sum_{i>=1} x^(k*i^2)/Product_{j=1..i-1} (1-x^j).

A373067 Number of partitions of n such that (smallest part) >= 2*(number of parts).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 10, 11, 13, 14, 17, 18, 21, 23, 26, 28, 32, 34, 39, 42, 47, 51, 58, 62, 70, 76, 85, 92, 103, 111, 124, 134, 148, 160, 177, 190, 210, 226, 248, 267, 293, 315, 345, 371, 405, 436, 476, 511, 557, 599, 651, 700, 760, 816
Offset: 0

Views

Author

Seiichi Manyama, May 22 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=70, x='x+O('x^N)); Vec(sum(k=0, N, x^(2*k^2)/prod(j=1, k, 1-x^j)))

Formula

G.f.: Sum_{k>=0} x^(2*k^2)/Product_{j=1..k} (1-x^j).

A373073 Number of partitions of n such that (smallest part) > 2*(number of parts).

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 10, 12, 13, 15, 17, 19, 21, 24, 26, 29, 32, 35, 38, 43, 46, 51, 56, 62, 67, 75, 81, 90, 98, 108, 117, 130, 140, 154, 167, 183, 197, 216, 233, 254, 274, 298, 321, 350, 376, 408, 440, 477, 513, 556, 598, 647
Offset: 0

Views

Author

Seiichi Manyama, May 22 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=70, x='x+O('x^N)); Vec(sum(k=0, N, x^(2*k^2+k)/prod(j=1, k, 1-x^j)))

Formula

G.f.: Sum_{k>=0} x^(2*k^2+k)/Product_{j=1..k} (1-x^j).

A377080 G.f.: Sum_{k>=1} x^(2*k^2) * Product_{j=1..k} (1 + x^j).

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Oct 15 2024

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 150; CoefficientList[Series[Sum[x^(2*k^2)*Product[1+x^j, {j, 1, k}], {k, 1, Sqrt[nmax/2]}], {x, 0, nmax}], x]

Formula

a(n) ~ (1+r) * exp(sqrt((40*log(r)^2 + 4*polylog(2, 1/(1+r)) - Pi^2/3)*n)) / (2*sqrt((4 + 5*r)*n)), where r = A230152 = 0.856674883854502874852324... is the real root of the equation r^4*(1+r) = 1.
Showing 1-6 of 6 results.