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-10 of 185 results. Next

A257639 a(n) is the minimal position at which the maximal value of row n appears in row n of triangle A008289.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 1

Views

Author

Gheorghe Coserea, Nov 04 2015

Keywords

Comments

Except rows 3, 4, 10, 11, 21 of triangle A008289, all the other rows up to row number 10^6 contain a single maximal value.
Conjecture: for n >= 22 there is a unique maximal value in row n of triangle A008289.

Examples

			For n=9, a(9)=2 because A003056(9)=3 and max{Q(9,p), p=1..3}=4 and Q(9,2)=4.
		

Crossrefs

Programs

  • PARI
    Q(N) = {
      my(q = vector(N)); q[1] = [1, 0, 0, 0];
      for (n = 2, N,
        my(m = (sqrtint(8*n+1) - 1)\2);
        q[n] = vector((1 + (m>>2)) << 2); q[n][1] = 1;
        for (k = 2, m, q[n][k] = q[n-k][k] + q[n-k][k-1]));
      return(q);
    };
    seq(N) = {
      my(a = vector(N), q = Q(N), vmx = apply(vecmax, q));
      for (n = 1, N, a[n] = vecmin(select(v->v==vmx[n], q[n], 1)));
      a;
    };
    seq(86) \\ updated by Gheorghe Coserea, Jun 02 2018

Formula

a(n) = min argmax(k->Q(n,k), k=1..m), that is a(n) = min{k, Q(n,k) = max{Q(n,p), p=1..m}}, where m = A003056(n) and Q(n,k) is defined by A008289.
a(n) ~ K*sqrt(n) + O(1), where K = 2*sqrt(3)*log(2)/Pi = 0.76430413884... (A131266).

A118399 Eigenvector of the triangle of distinct partitions (A008289), so that: a(n) = Sum_{k=1..tri(n)} A008289(n,k)*a(k) for n>=1 with a(1)=1, where tri(n) = floor((sqrt(8*n+1)-1)/2).

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 6, 8, 11, 15, 18, 24, 29, 37, 47, 57, 69, 86, 103, 125, 154, 183, 220, 264, 316, 375, 450, 533, 631, 747, 882, 1035, 1222, 1428, 1674, 1959, 2282, 2653, 3088, 3578, 4142, 4790, 5525, 6363, 7330, 8410, 9644, 11050, 12633, 14424, 16459, 18743
Offset: 1

Views

Author

Paul D. Hanna, May 07 2006

Keywords

Crossrefs

Cf. A008289.

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
          -> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
        end:
    a:= proc(n) option remember; local l; l:= b(n, n);
          `if`(n=1, 1, add(l[i+1]*a(i), i=1..nops(l)-1))
        end:
    seq (a(n), n=1..60);  # Alois P. Heinz, Nov 18 2012
  • Mathematica
    zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i < 1, {}, zip[b[n, i-1], If[i>n, {}, Join[{0}, b[n-i, i-1]]]]]]; a[n_] := a[n] = ( l = b[n, n]; If[n == 1, 1, Sum[l[[i+1]]*a[i], {i, 1, Length[l]-1}]]);  Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Feb 12 2017, after Alois P. Heinz *)
  • PARI
    {a(n)=if(n<0,0,if(n==1,1,sum(k=1,floor((sqrt(8*n+1)-1)/2), a(k)*polcoeff(polcoeff(prod(i=1,n, 1+y*x^i,1+x*O(x^n)),n,x),k,y))))}

A238517 Square row sums of the table A008289 (A060016).

Original entry on oeis.org

1, 1, 1, 2, 2, 5, 6, 11, 14, 26, 34, 52, 79, 110, 162, 231, 328, 446, 660, 872, 1236, 1660, 2327, 3060, 4238, 5586, 7595, 9988, 13376, 17470, 23318, 30286, 39744, 51676, 67276, 86929, 112390, 144472, 185428, 237826, 303171, 386468, 490838, 622882, 786068, 995118, 1249838, 1573522, 1970542
Offset: 0

Views

Author

Emanuele Munarini, Feb 28 2014

Keywords

Crossrefs

Programs

  • Mathematica
    qq[n_] := CoefficientList[Series[Sum[x^Binomial[k+1,2]y^k/Product[1-x^i,{i,1,k}],{k,0,n}],{x,0,n},{y,0,n}],{x,y}]
    Total[Transpose[Map[#^2 &, qq[100]]]]

Formula

a(n) = sum(q(n,k)^k,k=0..n), where q(n,k) is the number of partitions of n into k distinct parts (A008289, A060016).

A032020 Number of compositions (ordered partitions) of n into distinct parts.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 11, 13, 19, 27, 57, 65, 101, 133, 193, 351, 435, 617, 851, 1177, 1555, 2751, 3297, 4757, 6293, 8761, 11305, 15603, 24315, 30461, 41867, 55741, 74875, 98043, 130809, 168425, 257405, 315973, 431065, 558327, 751491, 958265, 1277867, 1621273
Offset: 0

Views

Author

Christian G. Bower, Apr 01 1998

Keywords

Comments

Compositions into distinct parts are equivalent to (1,1)-avoiding compositions. - Gus Wiseman, Jun 25 2020
All terms are odd. - Alois P. Heinz, Apr 09 2021

Examples

			a(6) = 11 because 6 = 5+1 = 4+2 = 3+2+1 = 3+1+2 = 2+4 = 2+3+1 = 2+1+3 = 1+5 = 1+3+2 = 1+2+3.
From _Gus Wiseman_, Jun 25 2020: (Start)
The a(0) = 1 through a(7) = 13 strict compositions:
  ()  (1)  (2)  (3)    (4)    (5)    (6)      (7)
                (1,2)  (1,3)  (1,4)  (1,5)    (1,6)
                (2,1)  (3,1)  (2,3)  (2,4)    (2,5)
                              (3,2)  (4,2)    (3,4)
                              (4,1)  (5,1)    (4,3)
                                     (1,2,3)  (5,2)
                                     (1,3,2)  (6,1)
                                     (2,1,3)  (1,2,4)
                                     (2,3,1)  (1,4,2)
                                     (3,1,2)  (2,1,4)
                                     (3,2,1)  (2,4,1)
                                              (4,1,2)
                                              (4,2,1)
(End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17.

Crossrefs

Row sums of A241719.
Main diagonal of A261960.
Dominated by A003242 (anti-run compositions).
These compositions are ranked by A233564.
(1,1)-avoiding patterns are counted by A000142.
Numbers with strict prime signature are A130091.
(1,1,1)-avoiding compositions are counted by A232432.
(1,1)-matching compositions are counted by A261982.
Inseparable partitions are counted by A325535.
Patterns matched by compositions are counted by A335456.
Strict permutations of prime indices are counted by A335489.

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
          -> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0))) end:
    a:= proc(n) local l; l:=b(n, n): add((i-1)! *l[i], i=1..nops(l)) end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 12 2012
    # second Maple program:
    T:= proc(n, k) option remember; `if`(k<0 or n<0, 0,
          `if`(k=0, `if`(n=0, 1, 0), T(n-k, k) +k*T(n-k, k-1)))
        end:
    a:= n-> add(T(n, k), k=0..floor((sqrt(8*n+1)-1)/2)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 04 2015
  • Mathematica
    f[list_]:=Length[list]!; Table[Total[Map[f, Select[IntegerPartitions[n], Sort[#] == Union[#] &]]], {n, 0,30}]
    T[n_, k_] := T[n, k] = If[k<0 || n<0, 0, If[k==0, If[n==0, 1, 0], T[n-k, k] + k*T[n-k, k-1]]]; a[n_] := Sum[T[n, k], {k, 0, Floor[(Sqrt[8*n + 1] - 1) / 2]}]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Sep 22 2015, after Alois P. Heinz *)
  • PARI
    N=66;  q='q+O('q^N);
    gf=sum(n=0,N, n!*q^(n*(n+1)/2) / prod(k=1,n, 1-q^k ) );
    Vec(gf)
    /* Joerg Arndt, Oct 20 2012 */
    
  • PARI
    Q(N) = { \\ A008289
      my(q = vector(N)); q[1] = [1, 0, 0, 0];
      for (n = 2, N,
        my(m = (sqrtint(8*n+1) - 1)\2);
        q[n] = vector((1 + (m>>2)) << 2); q[n][1] = 1;
        for (k = 2, m, q[n][k] = q[n-k][k] + q[n-k][k-1]));
      return(q);
    };
    seq(N) = concat(1, apply(q -> sum(k = 1, #q, q[k] * k!), Q(N)));
    seq(43) \\ Gheorghe Coserea, Sep 09 2018

Formula

"AGK" (ordered, elements, unlabeled) transform of 1, 1, 1, 1, ...
G.f.: Sum_{k>=0} k! * x^((k^2+k)/2) / Product_{j=1..k} (1-x^j). - David W. Wilson May 04 2000
a(n) = Sum_{m=1..n} A008289(n,m)*m!. - Geoffrey Critzer, Sep 07 2012

A007304 Sphenic numbers: products of 3 distinct primes.

Original entry on oeis.org

30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 222, 230, 231, 238, 246, 255, 258, 266, 273, 282, 285, 286, 290, 310, 318, 322, 345, 354, 357, 366, 370, 374, 385, 399, 402, 406, 410, 418, 426, 429, 430, 434, 435, 438
Offset: 1

Views

Author

Keywords

Comments

Note the distinctions between this and "n has exactly three prime factors" (A014612) or "n has exactly three distinct prime factors." (A033992). The word "sphenic" also means "shaped like a wedge" [American Heritage Dictionary] as in dentation with "sphenic molars." - Jonathan Vos Post, Sep 11 2005
Also the volume of a sphenic brick. A sphenic brick is a rectangular parallelepiped whose sides are components of a sphenic number, namely whose sides are three distinct primes. Example: The distinct prime triple (3,5,7) produces a 3x5x7 unit brick which has volume 105 cubic units. 3-D analog of 2-D A037074 Product of twin primes, per Cino Hilliard's comment. Compare with 3-D A107768 Golden 3-almost primes = Volumes of bricks (rectangular parallelepipeds) each of whose faces has golden semiprime area. - Jonathan Vos Post, Jan 08 2007
Sum(n>=1, 1/a(n)^s) = (1/6)*(P(s)^3 - P(3*s) - 3*(P(s)*P(2*s)-P(3*s))), where P is prime zeta function. - Enrique Pérez Herrero, Jun 28 2012
Also numbers n with A001222(n)=3 and A001221(n)=3. - Enrique Pérez Herrero, Jun 28 2012
n = 265550 is the smallest n with a(n) (=1279789) < A006881(n) (=1279793). - Peter Dolland, Apr 11 2020

Examples

			From _Gus Wiseman_, Nov 05 2020: (Start)
Also Heinz numbers of strict integer partitions into three parts, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). These partitions are counted by A001399(n-6) = A069905(n-3), with ordered version A001399(n-6)*6. The sequence of terms together with their prime indices begins:
     30: {1,2,3}     182: {1,4,6}     286: {1,5,6}
     42: {1,2,4}     186: {1,2,11}    290: {1,3,10}
     66: {1,2,5}     190: {1,3,8}     310: {1,3,11}
     70: {1,3,4}     195: {2,3,6}     318: {1,2,16}
     78: {1,2,6}     222: {1,2,12}    322: {1,4,9}
    102: {1,2,7}     230: {1,3,9}     345: {2,3,9}
    105: {2,3,4}     231: {2,4,5}     354: {1,2,17}
    110: {1,3,5}     238: {1,4,7}     357: {2,4,7}
    114: {1,2,8}     246: {1,2,13}    366: {1,2,18}
    130: {1,3,6}     255: {2,3,7}     370: {1,3,12}
    138: {1,2,9}     258: {1,2,14}    374: {1,5,7}
    154: {1,4,5}     266: {1,4,8}     385: {3,4,5}
    165: {2,3,5}     273: {2,4,6}     399: {2,4,8}
    170: {1,3,7}     282: {1,2,15}    402: {1,2,19}
    174: {1,2,10}    285: {2,3,8}     406: {1,4,10}
(End)
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • "Sphenic", The American Heritage Dictionary of the English Language, Fourth Edition, Houghton Mifflin Company, 2000.

Crossrefs

Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A162143 (a(n)^2).
For the following, NNS means "not necessarily strict".
A014612 is the NNS version.
A046389 is the restriction to odds (NNS: A046316).
A075819 is the restriction to evens (NNS: A075818).
A239656 gives first differences.
A285508 lists terms of A014612 that are not squarefree.
A307534 is the case where all prime indices are odd (NNS: A338471).
A337453 is a different ranking of ordered triples (NNS: A014311).
A338557 is the case where all prime indices are even (NNS: A338556).
A001399(n-6) counts strict 3-part partitions (NNS: A001399(n-3)).
A005117 lists squarefree numbers.
A008289 counts strict partitions by sum and length.
A220377 counts 3-part pairwise coprime strict partitions (NNS: A307719).

Programs

  • Haskell
    a007304 n = a007304_list !! (n-1)
    a007304_list = filter f [1..] where
    f u = p < q && q < w && a010051 w == 1 where
    p = a020639 u; v = div u p; q = a020639 v; w = div v q
    -- Reinhard Zumkeller, Mar 23 2014
    
  • Maple
    with(numtheory): a:=proc(n) if bigomega(n)=3 and nops(factorset(n))=3 then n else fi end: seq(a(n),n=1..450); # Emeric Deutsch
    A007304 := proc(n)
        option remember;
        local a;
        if n =1 then
            30;
        else
            for a from procname(n-1)+1 do
                if bigomega(a)=3 and nops(factorset(a))=3 then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Dec 06 2016
    is_a := proc(n) local P; P := NumberTheory:-PrimeFactors(n); nops(P) = 3 and n = mul(P) end:
    A007304List := upto -> select(is_a, [seq(1..upto)]):  # Peter Luschny, Apr 14 2025
  • Mathematica
    Union[Flatten[Table[Prime[n]*Prime[m]*Prime[k], {k, 20}, {n, k+1, 20}, {m, n+1, 20}]]]
    Take[ Sort@ Flatten@ Table[ Prime@i Prime@j Prime@k, {i, 3, 21}, {j, 2, i - 1}, {k, j - 1}], 53] (* Robert G. Wilson v *)
    With[{upto=500},Sort[Select[Times@@@Subsets[Prime[Range[Ceiling[upto/6]]],{3}],#<=upto&]]] (* Harvey P. Dale, Jan 08 2015 *)
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==3&] (* Gus Wiseman, Nov 05 2020 *)
  • PARI
    for(n=1,1e4,if(bigomega(n)==3 && omega(n)==3,print1(n", "))) \\ Charles R Greathouse IV, Jun 10 2011
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,(lim)^(1/3),forprime(q=p+1,sqrt(lim\p),t=p*q;forprime(r=q+1,lim\t,listput(v,t*r))));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrtnint(lim\=1,3), forprime(q=p+1, sqrtint(lim\p), t=p*q; forprime(r=q+1, lim\t, listput(v, t*r)))); Set(v) \\ Charles R Greathouse IV, Jan 21 2025
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A007304(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
        kmin, kmax = 0,1
        while f(kmax) > kmax:
            kmax <<= 1
        while kmax-kmin > 1:
            kmid = kmax+kmin>>1
            if f(kmid) <= kmid:
                kmax = kmid
            else:
                kmin = kmid
        return kmax # Chai Wah Wu, Aug 29 2024
    
  • SageMath
    def is_a(n):
        P = prime_divisors(n)
        return len(P) == 3 and prod(P) == n
    print([n for n in range(1, 439) if is_a(n)]) # Peter Luschny, Apr 14 2025

Formula

A008683(a(n)) = -1.
A000005(a(n)) = 8. - R. J. Mathar, Aug 14 2009
A002033(a(n)-1) = 13. - Juri-Stepan Gerasimov, Oct 07 2009, R. J. Mathar, Oct 14 2009
A178254(a(n)) = 36. - Reinhard Zumkeller, May 24 2010
A050326(a(n)) = 5, subsequence of A225228. - Reinhard Zumkeller, May 03 2013
a(n) ~ 2n log n/(log log n)^2. - Charles R Greathouse IV, Sep 14 2015

Extensions

More terms from Robert G. Wilson v, Jan 04 2006
Comment concerning number of divisors corrected by R. J. Mathar, Aug 14 2009

A116861 Triangle read by rows: T(n,k) is the number of partitions of n such that the sum of the parts, counted without multiplicities, is equal to k (n>=1, k>=1).

Original entry on oeis.org

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

Views

Author

Emeric Deutsch, Feb 27 2006

Keywords

Comments

Conjecture: Reverse the rows of the table to get an infinite lower-triangular matrix b with 1's on the main diagonal. The third diagonal of the inverse of b is minus A137719. - George Beck, Oct 26 2019
Proof: The reversed rows yield the matrix I+N where N is strictly lower triangular, N[i,j] = 0 for j >= i, having its 2nd diagonal equal to the 2nd column (1, 0, 1, 0, 1, ...): N[i+1,i] = A000035(i), i >= 1, and 3rd diagonal equal to the 3rd column of this triangle, (2, 1, 2, 3, 3, 3, ...): N[i+2,i] = A137719(i), i >= 1. It is known that (I+N)^-1 = 1 - N + N^2 - N^3 +- .... Here N^2 has not only the second but also the 3rd diagonal zero, because N^2[i+2,i] = N[i+2,i+1]*N[i+1,i] = A000035(i+1)*A000035(i) = 0. Therefore the 3rd diagonal of (I+N)^-1 is equal to -A137719 without leading 0. - M. F. Hasler, Oct 27 2019
From Gus Wiseman, Aug 27 2023: (Start)
Also the number of ways to write n-k as a nonnegative linear combination of a strict integer partition of k. Also the number of ways to write n as a (strictly) positive linear combination of a strict integer partition of k. Row n=7 counts the following:
7*1 . 1*2+5*1 1*3+4*1 1*3+2*2 1*5+2*1 1*7
2*2+3*1 2*3+1*1 1*4+3*1 1*3+1*2+2*1 1*4+1*3
3*2+1*1 1*5+1*2
1*6+1*1
1*4+1*2+1*1
(End)

Examples

			T(10,7) = 4 because we have [6,1,1,1,1], [4,3,3], [4,2,2,1,1] and [4,2,1,1,1,1] (6+1=4+3=4+2+1=7).
Triangle starts:
  1;
  1, 1;
  1, 0, 2;
  1, 1, 1, 2;
  1, 0, 2, 1, 3;
  1, 1, 3, 1, 1,  4;
  1, 0, 3, 2, 2,  2, 5;
  1, 1, 3, 3, 2,  4, 2, 6;
  1, 0, 5, 2, 3,  4, 4, 3, 8;
  1, 1, 4, 3, 4,  7, 4, 5, 3, 10;
  1, 0, 5, 3, 4,  7, 7, 6, 6,  5, 12;
  1, 1, 6, 4, 3, 12, 6, 8, 7,  9,  5, 15;
  ...
		

Crossrefs

Cf. A000041 (row sums), A000009 (diagonal), A014153.
Cf. A114638 (count partitions with #parts = sum(distinct parts)).
Column 1: A000012, column 2: A000035(1..), column 3: A137719(1..).
For subsets instead of partitions we have A026820.
This statistic is ranked by A066328.
The central diagonal is T(2n,n) = A364910(n), non-strict A364907.
Partial sums of columns are columns of A364911.
Same as A364916 (offset 0) with rows reversed.
A008284 counts partitions by length, strict A008289.
A364912 counts linear combinations of partitions.
A364913 counts combination-full partitions, strict A364839.

Programs

  • Maple
    g:= -1+product(1+t^j*x^j/(1-x^j), j=1..40): gser:= simplify(series(g,x=0,18)): for n from 1 to 14 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 14 do seq(coeff(P[n],t^j),j=1..n) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; local f, g, j;
          if n=0 then [1] elif i<1 then [ ] else f:= b(n, i-1);
             for j to n/i do
               f:= zip((x, y)->x+y, f, [0$i, b(n-i*j, i-1)[]], 0)
             od; f
          fi
        end:
    T:= n-> subsop(1=NULL, b(n, n))[]:
    seq(T(n), n=1..20);  # Alois P. Heinz, Feb 27 2013
  • Mathematica
    max = 14; s = Series[-1+Product[1+t^j*x^j/(1-x^j), {j, 1, max}], {x, 0, max}, {t, 0, max}] // Normal; t[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {t, 0, k}]; Table[t[n, k], {n, 1, max}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 17 2014 *)
    Table[Length[Select[IntegerPartitions[n],Total[Union[#]]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Aug 29 2023 *)
  • PARI
    A116861(n,k,s=0)={forpart(X=n,vecsum(Set(X))==k&&s++,k);s} \\ M. F. Hasler, Oct 27 2019

Formula

G.f.: -1 + Product_{j>=1} (1 + t^j*x^j/(1-x^j)).
Sum_{k=1..n} T(n,k) = A000041(n).
T(n,n) = A000009(n).
Sum_{k=1..n} k*T(n,k) = A014153(n-1).
T(n,1) = 1. T(n,2) = A000035(n+1). T(n,3) = A137719(n-2). - R. J. Mathar, Oct 27 2019
T(n,4) = A002264(n-1) + A121262(n). - R. J. Mathar, Oct 28 2019

A072233 Square array T(n,k) read by antidiagonals giving number of ways to distribute n indistinguishable objects in k indistinguishable containers; containers may be left empty.

Original entry on oeis.org

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

Views

Author

Martin Wohlgemuth (mail(AT)matroid.com), Jul 05 2002

Keywords

Comments

Regarded as a triangular table, this is another version of the number of partitions of n into k parts, A008284. - Franklin T. Adams-Watters, Dec 18 2006
From Gus Wiseman, Feb 10 2021: (Start)
T(n,k) is also the number of partitions of n with greatest part k, if we assume the greatest part of an empty partition to be 0. Row n = 9 counts the following partitions:
111111111 22221 333 432 54 63 72 81 9
222111 3222 441 522 621 711
2211111 3321 4221 531 6111
21111111 32211 4311 5211
33111 42111 51111
321111 411111
3111111
(End)

Examples

			Table begins (upper left corner = T(0,0)):
1 1 1  1  1  1  1  1  1 ...
0 1 1  1  1  1  1  1  1 ...
0 1 2  2  2  2  2  2  2 ...
0 1 2  3  3  3  3  3  3 ...
0 1 3  4  5  5  5  5  5 ...
0 1 3  5  6  7  7  7  7 ...
0 1 4  7  9 10 11 11 11 ...
0 1 4  8 11 13 14 15 15 ...
0 1 5 10 15 18 20 21 22 ...
There is 1 way to distribute 0 objects into k containers: T(0, k) = 1. The different ways for n=4, k=3 are: (oooo)()(), (ooo)(o)(), (oo)(oo)(), (oo)(o)(o), so T(4, 3) = 4.
From _Wolfdieter Lang_, Dec 03 2012 (Start)
The triangle a(n,k) = T(n-k,k) begins:
n\k  0  1  2  3  4  5  6  7  8  9 10 ...
00   1
01   0  1
02   0  1  1
03   0  1  1  1
04   0  1  2  1  1
05   0  1  2  2  1  1
06   0  1  3  3  2  1  1
07   0  1  3  4  3  2  1  1
08   0  1  4  5  5  3  2  1  1
09   0  1  4  7  6  5  3  2  1  1
10   0  1  5  8  9  7  5  3  2  1  1
...
Row n=5 is, for k=1..5, [1,2,2,1,1] which gives the number of partitions of n=5 with k parts. See A008284 and the Franklin T. Adams-Watters comment above. (End)
From _Gus Wiseman_, Feb 10 2021: (Start)
Row n = 9 counts the following partitions:
  9  54  333  3222  22221  222111  2211111  21111111  111111111
     63  432  3321  32211  321111  3111111
     72  441  4221  33111  411111
     81  522  4311  42111
         531  5211  51111
         621  6111
         711
(End)
		

Crossrefs

Sum of antidiagonal entries T(n, k) with n+k=m equals A000041(m).
Alternating row sums are A081362.
Cf. A008284.
The version for factorizations is A316439.
The version for set partitions is A048993/A080510.
The version for strict partitions is A008289/A059607.
A047993 counts balanced partitions, ranked by A106529.
A063995/A105806 count partitions by Dyson rank.

Programs

  • Mathematica
    Flatten[Table[Length[IntegerPartitions[n, {k}]], {n, 0, 20}, {k, 0, n}]] (* Emanuele Munarini, Feb 24 2014 *)
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    [[number_of_partitions_length(n, k) for k in (0..n)] for n in (0..10)] # Peter Luschny, Aug 01 2015

Formula

T(0, k) = 1, T(n, 0) = 0 (n>0), T(1, k) = 1 (k>0), T(n, 1) = 1 (n>0), T(n, k) = 0 for n < 0, T(n, k) = Sum[ T(n-k+i, k-i), i=0...k-1] Or, T(n, 1) = T(n, n) = 1, T(n, k) = 0 (k>n), T(n, k) = T(n-1, k-1) + T(n-k, k).
G.f. Product_{j=0..infinity} 1/(1-xy^j). Regarded as a triangular array, g.f. Product_{j=1..infinity} 1/(1-xy^j). - Franklin T. Adams-Watters, Dec 18 2006
O.g.f. of column No. k of the triangle a(n,k) is x^k/product(1-x^j,j=1..k), k>=0 (the undefined product for k=0 is put to 1). - Wolfdieter Lang, Dec 03 2012

Extensions

Corrected by Franklin T. Adams-Watters, Dec 18 2006

A359901 Triangle read by rows where T(n,k) is the number of integer partitions of n with median k = 1..n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 2, 2, 0, 1, 3, 1, 0, 0, 1, 4, 2, 3, 0, 0, 1, 6, 3, 1, 0, 0, 0, 1, 8, 6, 2, 4, 0, 0, 0, 1, 11, 7, 3, 1, 0, 0, 0, 0, 1, 15, 10, 4, 2, 5, 0, 0, 0, 0, 1, 20, 13, 7, 3, 1, 0, 0, 0, 0, 0, 1, 26, 19, 11, 4, 2, 6, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			Triangle begins:
   1
   1  1
   1  0  1
   2  2  0  1
   3  1  0  0  1
   4  2  3  0  0  1
   6  3  1  0  0  0  1
   8  6  2  4  0  0  0  1
  11  7  3  1  0  0  0  0  1
  15 10  4  2  5  0  0  0  0  1
  20 13  7  3  1  0  0  0  0  0  1
  26 19 11  4  2  6  0  0  0  0  0  1
  35 24 14  5  3  1  0  0  0  0  0  0  1
  45 34 17  8  4  2  7  0  0  0  0  0  0  1
  58 42 23 12  5  3  1  0  0  0  0  0  0  0  1
For example, row n = 9 counts the following partitions:
  (7,1,1)              (5,2,2)      (3,3,3)  (4,4,1)  .  .  .  .  (9)
  (6,1,1,1)            (6,2,1)      (4,3,2)
  (3,3,1,1,1)          (3,2,2,2)    (5,3,1)
  (4,2,1,1,1)          (4,2,2,1)
  (5,1,1,1,1)          (4,3,1,1)
  (3,2,1,1,1,1)        (2,2,2,2,1)
  (4,1,1,1,1,1)        (3,2,2,1,1)
  (2,2,1,1,1,1,1)
  (3,1,1,1,1,1,1)
  (2,1,1,1,1,1,1,1)
  (1,1,1,1,1,1,1,1,1)
		

Crossrefs

Column k=1 is A027336(n+1).
For mean instead of median we have A058398, see also A008284, A327482.
Row sums are A325347.
The mean statistic is ranked by A326567/A326568.
Including half-steps gives A359893.
The odd-length case is A359902.
The median statistic is ranked by A360005(n)/2.
First appearances of medians are ranked by A360006, A360007.
A000041 counts partitions, strict A000009.
A027193 counts odd-length partitions, strict A067659, ranked by A026424.
A067538 counts partitions w/ integer mean, strict A102627, ranks A316413.
A240219 counts partitions w/ the same mean as median, complement A359894.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Median[#]==k&]],{n,15},{k,n}]

A067659 Number of partitions of n into distinct parts such that number of parts is odd.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 9, 11, 14, 16, 19, 23, 27, 32, 38, 44, 52, 61, 71, 82, 96, 111, 128, 148, 170, 195, 224, 256, 293, 334, 380, 432, 491, 557, 630, 713, 805, 908, 1024, 1152, 1295, 1455, 1632, 1829, 2048, 2291, 2560, 2859, 3189, 3554, 3958, 4404
Offset: 0

Views

Author

Naohiro Nomoto, Feb 23 2002

Keywords

Comments

Ramanujan theta functions: phi(q) := Sum_{k=-oo..oo} q^(k^2) (A000122), chi(q) := Prod_{k>=0} (1+q^(2k+1)) (A000700).

Examples

			From _Gus Wiseman_, Jan 09 2021: (Start)
The a(5) = 1 through a(15) = 14 partitions (A-F = 10..15):
  5   6     7     8     9     A     B     C     D     E     F
      321   421   431   432   532   542   543   643   653   654
                  521   531   541   632   642   652   743   753
                        621   631   641   651   742   752   762
                              721   731   732   751   761   843
                                    821   741   832   842   852
                                          831   841   851   861
                                          921   931   932   942
                                                A21   941   951
                                                      A31   A32
                                                      B21   A41
                                                            B31
                                                            C21
                                                            54321
(End)
		

Crossrefs

Dominates A000009.
Numbers with these strict partitions as binary indices are A000069.
The non-strict version is A027193.
The Heinz numbers of these partitions are A030059.
The even version is A067661.
The version for rank is A117193, with non-strict version A101707.
The ordered version is A332304, with non-strict version A166444.
Other cases of odd length:
- A024429 counts set partitions of odd length.
- A089677 counts ordered set partitions of odd length.
- A174726 counts ordered factorizations of odd length.
- A339890 counts factorizations of odd length.
A008289 counts strict partitions by sum and length.
A026804 counts partitions whose least part is odd, with strict case A026832.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
          `if`(n=0, t, add(b(n-i*j, i-1, abs(t-j)), j=0..min(n/i, 1))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 01 2014
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n > i*(i + 1)/2, 0, If[n == 0, t, Sum[b[n - i*j, i - 1, Abs[t - j]], {j, 0, Min[n/i, 1]}]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jan 16 2015, after Alois P. Heinz *)
    CoefficientList[Normal[Series[(QPochhammer[-x, x]-QPochhammer[x])/2, {x, 0, 100}]], x] (* Andrey Zabolotskiy, Apr 12 2017 *)
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&OddQ[Length[#]]&]],{n,0,30}] (* Gus Wiseman, Jan 09 2021 *)
  • PARI
    {a(n)=local(A); if(n<0, 0, A=x*O(x^n); polcoeff( (eta(x^2+A)/eta(x+A) - eta(x+A))/2, n))} /* Michael Somos, Feb 14 2006 */
    
  • PARI
    N=66;  q='q+O('q^N);  S=1+2*sqrtint(N);
    gf=sum(n=1,S, (n%2!=0) * q^(n*(n+1)/2) / prod(k=1,n, 1-q^k ) );
    concat( [0], Vec(gf) )  /* Joerg Arndt, Oct 20 2012 */
    
  • PARI
    N=66;  q='q+O('q^N);  S=1+sqrtint(N);
    gf=sum(n=1, S, q^(2*n^2-n) / prod(k=1, 2*n-1, 1-q^k ) );
    concat( [0], Vec(gf) )  \\ Joerg Arndt, Apr 01 2014

Formula

For g.f. see under A067661.
a(n) = (A000009(n)-A010815(n))/2. - Vladeta Jovovic, Feb 24 2002
Expansion of (1-phi(-q))/(2*chi(-q)) in powers of q where phi(),chi() are Ramanujan theta functions. - Michael Somos, Feb 14 2006
G.f.: sum(n>=1, q^(2*n^2-n) / prod(k=1..2*n-1, 1-q^k ) ). [Joerg Arndt, Apr 01 2014]
a(n) = A067661(n) - A010815(n). - Andrey Zabolotskiy, Apr 12 2017
A000009(n) = a(n) + A067661(n). - Gus Wiseman, Jan 09 2021

A364350 Number of strict integer partitions of n such that no part can be written as a nonnegative linear combination of the others.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 2, 3, 3, 5, 3, 6, 5, 7, 6, 9, 7, 11, 10, 14, 12, 16, 15, 20, 17, 24, 22, 27, 29, 32, 30, 41, 36, 49, 45, 50, 52, 65, 63, 70, 77, 80, 83, 104, 98, 107, 116, 126, 134, 152, 148, 162, 180, 196, 195, 227, 227, 238, 272, 271, 293, 333, 325
Offset: 0

Views

Author

Gus Wiseman, Aug 15 2023

Keywords

Comments

A way of writing n as a (presumed nonnegative) linear combination of a finite sequence y is any sequence of pairs (k_i,y_i) such that k_i >= 0 and Sum k_i*y_i = n. For example, the pairs ((3,1),(1,1),(1,1),(0,2)) are a way of writing 5 as a linear combination of (1,1,1,2), namely 5 = 3*1 + 1*1 + 1*1 + 0*2. Of course, there are A000041(n) ways to write n as a linear combination of (1..n).

Examples

			The a(16) = 6 through a(22) = 12 strict partitions:
  (16)     (17)     (18)     (19)     (20)      (21)      (22)
  (9,7)    (9,8)    (10,8)   (10,9)   (11,9)    (12,9)    (13,9)
  (10,6)   (10,7)   (11,7)   (11,8)   (12,8)    (13,8)    (14,8)
  (11,5)   (11,6)   (13,5)   (12,7)   (13,7)    (15,6)    (15,7)
  (13,3)   (12,5)   (14,4)   (13,6)   (14,6)    (16,5)    (16,6)
  (7,5,4)  (13,4)   (7,6,5)  (14,5)   (17,3)    (17,4)    (17,5)
           (14,3)   (8,7,3)  (15,4)   (8,7,5)   (19,2)    (18,4)
           (15,2)            (16,3)   (9,6,5)   (11,10)   (19,3)
           (7,6,4)           (17,2)   (9,7,4)   (8,7,6)   (12,10)
                             (8,6,5)  (11,5,4)  (9,7,5)   (9,7,6)
                             (9,6,4)            (10,7,4)  (9,8,5)
                                                (10,8,3)  (7,6,5,4)
                                                (11,6,4)
                                                (11,7,3)
		

Crossrefs

For sums of subsets instead of combinations of partitions we have A151897.
For sums instead of combinations we have A237667, binary A236912.
For subsets instead of partitions we have A326083, complement A364914.
The complement in strict partitions is A364839, non-strict A364913.
A more strict variation is A364915.
The case of all positive coefficients is A365006.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A108917 counts knapsack partitions, ranks A299702.
A116861 and A364916 count linear combinations of strict partitions.
A323092 (ranks A320340) and A120641 count double-free partitions.
A364912 counts linear combinations of partitions of k.

Programs

  • Mathematica
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&And@@Table[combs[#[[k]],Delete[#,k]]=={},{k,Length[#]}]&]],{n,0,15}]
  • Python
    from sympy.utilities.iterables import partitions
    def A364350(n):
        if n <= 1: return 1
        alist, c = [set(tuple(sorted(set(p))) for p in partitions(i)) for i in range(n)], 1
        for p in partitions(n,k=n-1):
            if max(p.values(),default=0)==1:
                s = set(p)
                if not any(set(t).issubset(s-{q}) for q in s for t in alist[q]):
                    c += 1
        return c # Chai Wah Wu, Sep 23 2023

Extensions

More terms and offset corrected by Martin Fuller, Sep 11 2023
Showing 1-10 of 185 results. Next