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.

A035294 Number of ways to partition 2n into distinct positive integers.

Original entry on oeis.org

1, 1, 2, 4, 6, 10, 15, 22, 32, 46, 64, 89, 122, 165, 222, 296, 390, 512, 668, 864, 1113, 1426, 1816, 2304, 2910, 3658, 4582, 5718, 7108, 8808, 10880, 13394, 16444, 20132, 24576, 29927, 36352, 44046, 53250, 64234, 77312, 92864, 111322, 133184, 159046
Offset: 0

Views

Author

Keywords

Comments

Also, number of partitions of 2n into odd numbers. - Vladeta Jovovic, Aug 17 2004
This sequence was originally defined as the expansion of sum ( q^n / product( 1-q^k, k=1..2*n), n=0..inf ). The present definition is due to Reinhard Zumkeller. Michael Somos points out that the equivalence of the two definitions follows from Andrews, page 19.
Also, number of partitions of 2n with max descent 1 and last part 1. - Wouter Meeussen, Mar 31 2013

Examples

			a(4)=6 [8=7+1=6+2=5+3=5+2+1=4+3+1=2*4].
G.f. = 1 + x + 2*x^2 + 4*x^3 + 6*x^4 + 10*x^5 + 15*x^6 + 22*x^7 + 46*x^9 + ...
G.f. = q + q^49 + 2*q^97 + 4*q^145 + 6*q^193 + 10*q^241 + 15*q^289 + ...
		

References

  • G. E. Andrews, The Theory of Partitions, Cambridge University Press, 1998, p. 19.

Crossrefs

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a035294 n = a035294_list !! n
    a035294_list = f 1 where
       f x = (p' 1 (x - 1)) : f (x + 2)
       p' = memo2 integral integral p
       p _ 0 = 1
       p k m = if m < k then 0 else p' k (m - k) + p' (k + 2) m
    -- Reinhard Zumkeller, Nov 27 2015
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
         `if`(i<1, 0, b(n, i-2)+`if`(i>n, 0, b(n-i, i))))
        end:
    a:= n-> b(2*n, 2*n-1):
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 11 2015
  • Mathematica
    Table[Count[IntegerPartitions[2 n], q_ /; Union[q] == Sort[q]], {n, 16}];
    Table[Count[IntegerPartitions[2 n], q_ /; Count[q, _?EvenQ] == 0], {n, 16}];
    Table[Count[IntegerPartitions[2 n], q_ /; Last[q] == 1 && Max[q - PadRight[Rest[q], Length[q]]] <= 1 ], {n, 16}];
    (* Wouter Meeussen, Mar 31 2013 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x^2] /QPochhammer[ x], {x, 0, 2 n}]; (* Michael Somos, May 06 2015 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^3, x^8] QPochhammer[ -x^5, x^8] QPochhammer[ x^8] / QPochhammer[ x], {x, 0, n}]; (* Michael Somos, May 06 2015 *)
    nmax=60; CoefficientList[Series[Product[(1+x^(8*k+1)) * (1+x^(8*k+2))^2 * (1+x^(8*k+3))^2 * (1+x^(8*k+4))^3 * (1+x^(8*k+5))^2 * (1+x^(8*k+6))^2 * (1+x^(8*k+7)) * (1+x^(8*k+8))^3, {k,0,nmax}],{x,0,nmax}],x] (* Vaclav Kotesovec, Oct 06 2015 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-2] + If[i>n, 0, b[n-i, i]]]]; a[n_] := b[2n, 2n-1]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Aug 30 2016, after Alois P. Heinz *)
  • PARI
    {a(n) = my(A); if( n<0, 0, n*=2; A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};/* Michael Somos, Nov 01 2005 */
    

Formula

a(n) = A000009(2*n). - Michael Somos, Mar 03 2003
Expansion of Sum_{n >= 0} q^n / Product_{k = 1..2*n} (1 - q^k).
a(n) = T(2*n, 0), T as defined in A026835.
G.f.: Product_{i >= 0} ((1 + x^(8*i + 1)) * (1 + x^(8*i + 2))^2 * (1 + x^(8*i + 3))^2 * (1 + x^(8*i + 4))^3 * (1 + x^(8*i + 5))^2 * (1 + x^(8*i + 6))^2 * (1 + x^(8*i + 7)) * (1 + x^(8*i + 8))^3). - Vladeta Jovovic, Oct 10 2004
G.f.: (Sum_{k>=0} x^A074378(k)) / (Product_{k>0} (1 - x^k)) = f( x^3, x^5) / f(-x, -x^2) where f(, ) is Ramanujan's general theta function. - Michael Somos, Nov 01 2005
Euler transform of period 16 sequence [1, 1, 2, 1, 2, 0, 1, 0, 1, 0, 2, 1, 2, 1, 1, 0, ...]. - Michael Somos, Dec 17 2002
a(n) ~ exp(sqrt(2*n/3)*Pi) / (2^(11/4) * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Oct 06 2015
a(n) = A000041(n) + A282893(n). - Michael Somos, Feb 24 2017
Convolution with A000041 is A058696. - Michael Somos, Feb 24 2017
Convolution with A097451 is A262987. - Michael Somos, Feb 24 2017
G.f.: 1/(1 - x)*Sum_{n>=0} x^floor((3*n+1)/2)/Product_{k = 1..n} (1 - x^k). - Peter Bala, Feb 04 2021
G.f.: Product_{n >= 1} (1 - q^(8*n))*(1 + q^(8*n-3))*(1 + q^(8*n-5))/(1 - q^n). - Peter Bala, Dec 30 2024

A079122 Number of ways to partition 2*n into distinct positive integers not greater than n.

Original entry on oeis.org

1, 0, 0, 1, 1, 3, 5, 8, 13, 21, 31, 46, 67, 95, 134, 186, 253, 343, 461, 611, 806, 1055, 1369, 1768, 2270, 2896, 3678, 4649, 5847, 7325, 9141, 11359, 14069, 17367, 21363, 26202, 32042, 39068, 47512, 57632, 69728, 84167, 101365, 121801, 146053, 174777
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 27 2002

Keywords

Examples

			a(4)=1 [1+3+4=2*4]; a(5)=3 [1+2+3+4=1+4+5=2+3+5=2*5].
		

Crossrefs

Programs

  • Haskell
    a079122 n = p [1..n] (2 * n) where
       p _  0     = 1
       p [] _     = 0
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Mar 16 2012
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
           b(n, i-1) + `if`(i>n, 0, b(n-i, i-1))))
        end:
    a:= n-> b(2*n, n):
    seq(a(n), n=0..80);  # Alois P. Heinz, Jan 18 2013
  • Mathematica
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@ #] == 1 &]; Table[d[n], {n, 1, 12}]
    TableForm[%]
    f[n_] := Length[Select[d[2 n], First[#] <= n &]]
    Table[f[n], {n, 1, 20}]  (* A079122 *)
    (* Clark Kimberling, Mar 13 2012 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i-1]]]]; a[n_] := b[2*n, n]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Oct 22 2015, after Alois P. Heinz *)
    Table[SeriesCoefficient[Product[1 + x^(k/2), {k, 1, n}], {x, 0, n}], {n, 0, 50}] (* Vaclav Kotesovec, Jan 16 2024 *)

Formula

a(n) = b(0, n), b(m, n) = 1 + sum(b(i, j): m
Coefficient of x^(2*n) in Product_{k=1..n} (1+x^k). - Vladeta Jovovic, Aug 07 2003
a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(11/4) * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, Oct 22 2015

A036998 The number of decompositions of n into different parts relatively prime to n.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 4, 2, 3, 2, 11, 2, 17, 3, 5, 5, 37, 3, 53, 5, 12, 7, 103, 5, 70, 10, 42, 11, 255, 4, 339, 23, 59, 22, 130, 11, 759, 32, 115, 22, 1259, 10, 1609, 44, 94, 64, 2589, 22, 1674, 40, 385, 84, 5119, 30, 1309, 79, 665, 162, 9791, 18, 12075, 217, 556, 276
Offset: 1

Keywords

Crossrefs

Programs

  • Haskell
    a036998 n = p (a038566_row n) n where
       p _      0 = 1
       p []     _ = 0
       p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
    -- Reinhard Zumkeller, Jul 05 2013
  • Mathematica
    Table[ Coefficient[ Series[ Times@@((1+z^#)&/@Select[ Range[ q ], GCD[ #, q ]===1& ]), { z, 0, q} ], z^q ], {q, 128} ]

Extensions

Offset corrected by Amiram Eldar, Apr 24 2020

A079126 Triangle T(n,k) of numbers of partitions of n into distinct positive integers <= k, 0<=k<=n.

Original entry on oeis.org

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

Author

Reinhard Zumkeller, Dec 27 2002

Keywords

Comments

T(n,n) = A000009(n), right side of the triangle;
T(n,k)=0 for n>0 and k < A002024(n); T(prime(n),n) = A067953(n) for n>0.

Examples

			The seven partitions of n=5 are {5}, {4,1}, {3,2}, {3,1,1}, {2,2,1}, {2,1,1,1} and {1,1,1,1,1}. Only two of them ({4,1} and {3,2}) have distinct parts <= 4, so T(5,4) = 2.
Triangle T(n,k) begins:
1;
0, 1;
0, 0, 1;
0, 0, 1, 2;
0, 0, 0, 1 ,2;
0, 0, 0, 1, 2, 3;
0, 0, 0, 1, 2, 3, 4;
0, 0, 0, 0, 2, 3, 4, 5;
0, 0, 0, 0, 1, 3, 4, 5,  6;
0, 0, 0, 0, 1, 3, 5, 6,  7,  8;
0, 0, 0, 0, 1, 3, 5, 7,  8,  9, 10;
0, 0, 0, 0, 0, 2, 5, 7,  9, 10, 11, 12;
0, 0, 0, 0, 0, 2, 5, 8, 10, 12, 13, 14, 15; ...
		

Crossrefs

Differs from A026840 in having extra zeros at the ends of the rows.

Programs

  • Maple
    T:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i<1, 0, T(n, i-1)+`if`(i>n, 0, T(n-i, i-1))))
        end:
    seq(seq(T(n,k), k=0..n), n=0..20);  # Alois P. Heinz, May 11 2015
  • Mathematica
    T[n_, i_] := T[n, i] = If[n==0, 1, If[i<1, 0, T[n, i-1] + If[i>n, 0, T[n-i, i-1]]]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Jun 30 2015, after Alois P. Heinz *)

Formula

T(n,k) = b(0,n,k), where b(m,n,k) = 1+sum(b(i,j,k): m
T(n,k) = coefficient of x^n in product_{i=1..k} (1+x^i). - Vladeta Jovovic, Aug 07 2003

A079125 Number of ways to partition the sum of all divisors of n (sigma(n), A000203) into distinct positive integers not greater than n.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 5, 13, 13, 27, 14, 89, 21, 89, 97, 230, 45, 613, 63, 980, 347, 580, 121, 6663, 330, 1289, 1043, 5847, 295, 26488, 389, 12813, 2800, 5411, 2840, 156304, 863, 10433, 6939, 161711, 1425, 272499, 1815, 103738, 61469, 35448, 2909, 2475011
Offset: 1

Author

Reinhard Zumkeller, Dec 27 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{sum = DivisorSigma[1, n], x}, CoefficientList[Product[1 + x^i, {i, 1, n}], x][[1 + sum]]]; Array[a, 50] (* Amiram Eldar, Apr 15 2025 *)
  • PARI
    a(n)=my(v=partitions(sigma(n),n));sum(i=1,#v,#vecsort(v[i],,8)==#v[i]) \\ Charles R Greathouse IV, Feb 14 2013

Formula

a(n) = b(0, n), b(m, n) = 1 + Sum_{m < i < j < n & i+j = sigma(n)} b(i, j).

A227296 Number of partitions of n into parts <= phi(n), where phi is Euler's totient function (cf. A000010).

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 4, 14, 15, 26, 23, 55, 34, 100, 90, 146, 186, 296, 199, 489, 434, 725, 807, 1254, 919, 1946, 2063, 2943, 3036, 4564, 2462, 6841, 7665, 9871, 11098, 14744, 12384, 21636, 23928, 30677, 31603, 44582, 31570, 63260, 69414, 86420, 99795, 124753
Offset: 0

Author

Reinhard Zumkeller, Jul 05 2013

Keywords

Crossrefs

Programs

  • Haskell
    a227296 n = p [1 .. a000010 n] n where
       p _          0 = 1
       p []         _ = 0
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
  • Maple
    with(numtheory):
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
           b(n, i-1) +`if`(i>n, 0, b(n-i, i)))
        end:
    a:= n-> b(n, phi(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, May 11 2015
  • Mathematica
    (* Requires version 6.0+ *) Table[Length[IntegerPartitions[n, n, Range[EulerPhi[n]]]], {n, 0, 47}] (* Ivan Neretin, May 11 2015 *)
    intPartLen[n_, i_] := intPartLen[n, i] = If[n == 0 || i == 1, 1, intPartLen[n, i - 1] + If[i > n, 0, intPartLen[n - i, i]]]; intPartLenPhi[n_] := intPartLen[n, EulerPhi[n]]; Table[intPartLenPhi[n], {n, 0, 99}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)

Formula

a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n). - Vaclav Kotesovec, May 24 2018
Showing 1-6 of 6 results.