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 20 results. Next

A004526 Nonnegative integers repeated, floor(n/2).

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36
Offset: 0

Views

Author

Keywords

Comments

Number of elements in the set {k: 1 <= 2k <= n}.
Dimension of the space of weight 2n+4 cusp forms for Gamma_0(2).
Dimension of the space of weight 1 modular forms for Gamma_1(n+1).
Number of ways 2^n is expressible as r^2 - s^2 with s > 0. Proof: (r+s) and (r-s) both should be powers of 2, even and distinct hence a(2k) = a(2k-1) = (k-1) etc. - Amarnath Murthy, Sep 20 2002
Lengths of sides of Ulam square spiral; i.e., lengths of runs of equal terms in A063826. - Donald S. McDonald, Jan 09 2003
Number of partitions of n into two parts. A008619 gives partitions of n into at most two parts, so A008619(n) = a(n) + 1 for all n >= 0. Partial sums are A002620 (Quarter-squares). - Rick L. Shepherd, Feb 27 2004
a(n+1) is the number of 1's in the binary expansion of the Jacobsthal number A001045(n). - Paul Barry, Jan 13 2005
Number of partitions of n+1 into two distinct (nonzero) parts. Example: a(8) = 4 because we have [8,1],[7,2],[6,3] and [5,4]. - Emeric Deutsch, Apr 14 2006
Complement of A000035, since A000035(n)+2*a(n) = n. Also equal to the partial sums of A000035. - Hieronymus Fischer, Jun 01 2007
Number of binary bracelets of n beads, two of them 0. For n >= 2, a(n-2) is the number of binary bracelets of n beads, two of them 0, with 00 prohibited. - Washington Bomfim, Aug 27 2008
Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i]:=1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = (-1)^n det(A). - Milan Janjic, Jan 24 2010
From Clark Kimberling, Mar 10 2011: (Start)
Let RT abbreviate rank transform (A187224). Then
RT(this sequence) = A187484;
RT(this sequence without 1st term) = A026371;
RT(this sequence without 1st 2 terms) = A026367;
RT(this sequence without 1st 3 terms) = A026363. (End)
The diameter (longest path) of the n-cycle. - Cade Herron, Apr 14 2011
For n >= 3, a(n-1) is the number of two-color bracelets of n beads, three of them are black, having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
Pelesko (2004) refers erroneously to this sequence instead of A008619. - M. F. Hasler, Jul 19 2012
Number of degree 2 irreducible characters of the dihedral group of order 2(n+1). - Eric M. Schmidt, Feb 12 2013
For n >= 3 the sequence a(n-1) is the number of non-congruent regions with infinite area in the exterior of a regular n-gon with all diagonals drawn. See A217748. - Martin Renner, Mar 23 2013
a(n) is the number of partitions of 2n into exactly 2 even parts. a(n+1) is the number of partitions of 2n into exactly 2 odd parts. This just rephrases the comment of E. Deutsch above. - Wesley Ivan Hurt, Jun 08 2013
Number of the distinct rectangles and square in a regular n-gon is a(n/2) for even n and n >= 4. For odd n, such number is zero, see illustration in link. - Kival Ngaokrajang, Jun 25 2013
x-coordinate from the image of the point (0,-1) after n reflections across the lines y = n and y = x respectively (alternating so that one reflection is applied on each step): (0,-1) -> (0,1) -> (1,0) -> (1,2) -> (2,1) -> (2,3) -> ... . - Wesley Ivan Hurt, Jul 12 2013
a(n) is the number of partitions of 2n into exactly two distinct odd parts. a(n-1) is the number of partitions of 2n into exactly two distinct even parts, n > 0. - Wesley Ivan Hurt, Jul 21 2013
a(n) is the number of permutations of length n avoiding 213, 231 and 312, or avoiding 213, 312 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Also a(n) is the number of different patterns of 2-color, 2-partition of n. - Ctibor O. Zizka, Nov 19 2014
Minimum in- and out-degree for a directed K_n (see link). - Jon Perry, Nov 22 2014
a(n) is also the independence number of the triangular graph T(n). - Luis Manuel Rivera Martínez, Mar 12 2015
For n >= 3, a(n+4) is the least positive integer m such that every m-element subset of {1,2,...,n} contains distinct i, j, k with i + j = k (equivalently, with i - j = k). - Rick L. Shepherd, Jan 24 2016
More generally, the ordinary generating function for the integers repeated k times is x^k/((1 - x)(1 - x^k)). - Ilya Gutkovskiy, Mar 21 2016
a(n) is the number of numbers of the form F(i)*F(j) between F(n+3) and F(n+4), where 2 < i < j and F = A000045 (Fibonacci numbers). - Clark Kimberling, May 02 2016
The arithmetic function v_2(n,2) as defined in A289187. - Robert Price, Aug 22 2017
a(n) is also the total domination number of the (n-3)-gear graph. - Eric W. Weisstein, Apr 07 2018
Consider the numbers 1, 2, ..., n; a(n) is the largest integer t such that these numbers can be arranged in a row so that all consecutive terms differ by at least t. Example: a(6) = a(7) = 3, because of respectively (4, 1, 5, 2, 6, 3) and (1, 5, 2, 6, 3, 7, 4) (see link BMO - Problem 2). - Bernard Schott, Mar 07 2020
a(n-1) is also the number of integer-sided triangles whose sides a < b < c are in arithmetic progression with a middle side b = n (see A307136). Example, for b = 4, there exists a(3) = 1 such triangle corresponding to Pythagorean triple (3, 4, 5). For the triples, miscellaneous properties and references, see A336750. - Bernard Schott, Oct 15 2020
For n >= 1, a(n-1) is the greatest remainder on division of n by any k in 1..n. - David James Sycamore, Sep 05 2021
Number of incongruent right triangles that can be formed from the vertices of a regular n-gon is given by a(n/2) for n even. For n odd such number is zero. For a regular n-gon, the number of incongruent triangles formed from its vertices is given by A069905(n). The number of incongruent acute triangles is given by A005044(n). The number of incongruent obtuse triangles is given by A008642(n-4) for n > 3 otherwise 0, with offset 0. - Frank M Jackson, Nov 26 2022
The inverse binomial transform is 0, 0, 1, -2, 4, -8, 16, -32, ... (see A122803). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 4*x^8 + 4*x^9 + 5*x^10 + ...
		

References

  • G. L. Alexanderson et al., The William Powell Putnam Mathematical Competition - Problems and Solutions: 1965-1984, M.A.A., 1985; see Problem A-1 of 27th Competition.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 120, P(n,2).
  • Graham, Knuth and Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1989, page 77 (partitions of n into at most 2 parts).

Crossrefs

a(n+2) = A008619(n). See A008619 for more references.
A001477(n) = a(n+1)+a(n). A000035(n) = a(n+1)-A002456(n).
a(n) = A008284(n, 2), n >= 1.
Zero followed by the partial sums of A000035.
Column 2 of triangle A094953. Second row of A180969.
Partial sums: A002620. Other related sequences: A010872, A010873, A010874.
Cf. similar sequences of the integers repeated k times: A001477 (k = 1), this sequence (k = 2), A002264 (k = 3), A002265 (k = 4), A002266 (k = 5), A152467 (k = 6), A132270 (k = 7), A132292 (k = 8), A059995 (k = 10).
Cf. A289187, A139756 (binomial transf).

Programs

  • Haskell
    a004526 = (`div` 2)
    a004526_list = concatMap (\x -> [x, x]) [0..]
    -- Reinhard Zumkeller, Jul 27 2012
    
  • Magma
    [Floor(n/2): n in [0..100]]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    A004526 := n->floor(n/2); seq(floor(i/2),i=0..50);
  • Mathematica
    Table[(2n - 1)/4 + (-1)^n/4, {n, 0, 70}] (* Stefan Steinerberger, Apr 02 2006 *)
    f[n_] := If[OddQ[n], (n - 1)/2, n/2]; Array[f, 74, 0] (* Robert G. Wilson v, Apr 20 2012 *)
    With[{c=Range[0,40]},Riffle[c,c]] (* Harvey P. Dale, Aug 26 2013 *)
    CoefficientList[Series[x^2/(1 - x - x^2 + x^3), {x, 0, 75}], x] (* Robert G. Wilson v, Feb 05 2015 *)
    LinearRecurrence[{1, 1, -1}, {0, 0, 1}, 75] (* Robert G. Wilson v, Feb 05 2015 *)
    Floor[Range[0, 40]/2] (* Eric W. Weisstein, Apr 07 2018 *)
  • Maxima
    makelist(floor(n/2),n,0,50); /* Martin Ettl, Oct 17 2012 */
    
  • PARI
    a(n)=n\2 /* Jaume Oliver Lafont, Mar 25 2009 */
    
  • PARI
    x='x+O('x^100); concat([0, 0], Vec(x^2/((1+x)*(x-1)^2))) \\ Altug Alkan, Mar 21 2016
    
  • Python
    def a(n): return n//2
    print([a(n) for n in range(74)]) # Michael S. Branicky, Apr 30 2022
  • Sage
    def a(n) : return( dimension_cusp_forms( Gamma0(2), 2*n+4) ); # Michael Somos, Jul 03 2014
    
  • Sage
    def a(n) : return( dimension_modular_forms( Gamma1(n+1), 1) ); # Michael Somos, Jul 03 2014
    

Formula

G.f.: x^2/((1+x)*(x-1)^2).
a(n) = floor(n/2).
a(n) = ceiling((n+1)/2). - Eric W. Weisstein, Jan 11 2024
a(n) = 1 + a(n-2).
a(n) = a(n-1) + a(n-2) - a(n-3).
a(2*n) = a(2*n+1) = n.
a(n+1) = n - a(n). - Henry Bottomley, Jul 25 2001
For n > 0, a(n) = Sum_{i=1..n} (1/2)/cos(Pi*(2*i-(1-(-1)^n)/2)/(2*n+1)). - Benoit Cloitre, Oct 11 2002
a(n) = (2*n-1)/4 + (-1)^n/4; a(n+1) = Sum_{k=0..n} k*(-1)^(n+k). - Paul Barry, May 20 2003
E.g.f.: ((2*x-1)*exp(x) + exp(-x))/4. - Paul Barry, Sep 03 2003
G.f.: (1/(1-x)) * Sum_{k >= 0} t^2/(1-t^4) where t = x^2^k. - Ralf Stephan, Feb 24 2004
a(n+1) = A000120(A001045(n)). - Paul Barry, Jan 13 2005
a(n) = (n-(1-(-1)^n)/2)/2 = (1/2)*(n-|sin(n*Pi/2)|). Likewise: a(n) = (n-A000035(n))/2. Also: a(n) = Sum_{k=0..n} A000035(k). - Hieronymus Fischer, Jun 01 2007
The expression floor((x^2-1)/(2*x)) (x >= 1) produces this sequence. - Mohammad K. Azarian, Nov 08 2007; corrected by M. F. Hasler, Nov 17 2008
a(n+1) = A002378(n) - A035608(n). - Reinhard Zumkeller, Jan 27 2010
a(n+1) = A002620(n+1) - A002620(n) = floor((n+1)/2)*ceiling((n+1)/2) - floor(n^2/4). - Jonathan Vos Post, May 20 2010
For n >= 2, a(n) = floor(log_2(2^a(n-1) + 2^a(n-2))). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 24 2010
A001057(n-1) = (-1)^n*a(n), n > 0. - M. F. Hasler, Jul 19 2012
a(n) = A008615(n) + A002264(n). - Reinhard Zumkeller, Apr 28 2014
Euler transform of length 2 sequence [1, 1]. - Michael Somos, Jul 03 2014

Extensions

Partially edited by Joerg Arndt, Mar 11 2010, and M. F. Hasler, Jul 19 2012

A211422 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w^2 + x*y = 0.

Original entry on oeis.org

1, 9, 17, 25, 41, 49, 57, 65, 81, 105, 113, 121, 137, 145, 153, 161, 193, 201, 225, 233, 249, 257, 265, 273, 289, 329, 337, 361, 377, 385, 393, 401, 433, 441, 449, 457, 505, 513, 521, 529, 545, 553, 561, 569, 585, 609, 617, 625, 657, 713, 753, 761
Offset: 0

Views

Author

Clark Kimberling, Apr 10 2012

Keywords

Comments

Suppose that S={-n,...,0,...,n} and that f(w,x,y,n) is a function, where w,x,y are in S. The number of ordered triples (w,x,y) satisfying f(w,x,y,n)=0, regarded as a function of n, is a sequence t of nonnegative integers. Sequences such as t/4 may also be integer sequences for all except certain initial values of n. In the following guide, such sequences are indicated in the related sequences column and may be included in the corresponding Mathematica programs.
...
sequence... f(w,x,y,n) ..... related sequences
A211415 ... w^2+x*y-1 ...... t+2, t/4, (t/4-1)/4
A211422 ... w^2+x*y ........ (t-1)/8, A120486
A211423 ... w^2+2x*y ....... (t-1)/4
A211424 ... w^2+3x*y ....... (t-1)/4
A211425 ... w^2+4x*y ....... (t-1)/4
A211426 ... 2w^2+x*y ....... (t-1)/4
A211427 ... 3w^2+x*y ....... (t-1)/4
A211428 ... 2w^2+3x*y ...... (t-1)/4
A211429 ... w^3+x*y ........ (t-1)/4
A211430 ... w^2+x+y ........ (t-1)/2
A211431 ... w^3+(x+y)^2 .... (t-1)/2
A211432 ... w^2-x^2-y^2 .... (t-1)/8
A003215 ... w+x+y .......... (t-1)/2, A045943
A202253 ... w+2x+3y ........ (t-1)/2, A143978
A211433 ... w+2x+4y ........ (t-1)/2
A211434 ... w+2x+5y ........ (t-1)/4
A211435 ... w+4x+5y ........ (t-1)/2
A211436 ... 2w+3x+4y ....... (t-1)/2
A211435 ... 2w+3x+5y ....... (t-1)/2
A211438 ... w+2x+2y ....... (t-1)/2, A118277
A001844 ... w+x+2y ......... (t-1)/4, A000217
A211439 ... w+3x+3y ........ (t-1)/2
A211440 ... 2w+3x+3y ....... (t-1)/2
A028896 ... w+x+y-1 ........ t/6, A000217
A211441 ... w+x+y-2 ........ t/3, A028387
A182074 ... w^2+x*y-n ...... t/4, A028387
A000384 ... w+x+y-n
A000217 ... w+x+y-2n
A211437 ... w*x*y-n ........ t/4, A007425
A211480 ... w+2x+3y-1
A211481 ... w+2x+3y-n
A211482 ... w*x+w*y+x*y-w*x*y
A211483 ... (n+w)^2-x-y
A182112 ... (n+w)^2-x-y-w
...
For the following sequences, S={1,...,n}, rather than
{-n,...,0,...n}. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A132188 ... w^2-x*y
A211506 ... w^2-x*y-n
A211507 ... w^2-x*y+n
A211508 ... w^2+x*y-n
A211509 ... w^2+x*y-2n
A211510 ... w^2-x*y+2n
A211511 ... w^2-2x*y ....... t/2
A211512 ... w^2-3x*y ....... t/2
A211513 ... 2w^2-x*y ....... t/2
A211514 ... 3w^2-x*y ....... t/2
A211515 ... w^3-x*y
A211516 ... w^2-x-y
A211517 ... w^3-(x+y)^2
A063468 ... w^2-x^2-y^2 .... t/2
A000217 ... w+x-y
A001399 ... w-2x-3y
A211519 ... w-2x+3y
A008810 ... w+2x-3y
A001399 ... w-2x-3y
A008642 ... w-2x-4y
A211520 ... w-2x+4y
A211521 ... w+2x-4y
A000115 ... w-2x-5y
A211522 ... w-2x+5y
A211523 ... w+2x-5y
A211524 ... w-3x-5y
A211533 ... w-3x+5y
A211523 ... w+3x-5y
A211535 ... w-4x-5y
A211536 ... w-4x+5y
A008812 ... w+4x-5y
A055998 ... w+x+y-2n
A074148 ... 2w+x+y-2n
A211538 ... 2w+2x+y-2n
A211539 ... 2w+2x-y-2n
A211540 ... 2w-3x-4y
A211541 ... 2w-3x+4y
A211542 ... 2w+3x-4y
A211543 ... 2w-3x-5y
A211544 ... 2w-3x+5y
A008812 ... 2w+3x-5y
A008805 ... w-2x-2y (repeated triangular numbers)
A001318 ... w-2x+2y
A000982 ... w+x-2y
A211534 ... w-3x-3y
A211546 ... w-3x+3y (triply repeated triangular numbers)
A211547 ... 2w-3x-3y (triply repeated squares)
A082667 ... 2w-3x+3y
A055998 ... w-x-y+2
A001399 ... w-2x-3y+1
A108579 ... w-2x-3y+n
...
Next, S={-n,...-1,1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated inequality. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A211545 ... w+x+y>0; recurrence degree: 4
A211612 ... w+x+y>=0
A211613 ... w+x+y>1
A211614 ... w+x+y>2
A211615 ... |w+x+y|<=1
A211616 ... |w+x+y|<=2
A211617 ... 2w+x+y>0; recurrence degree: 5
A211618 ... 2w+x+y>1
A211619 ... 2w+x+y>2
A211620 ... |2w+x+y|<=1
A211621 ... w+2x+3y>0
A211622 ... w+2x+3y>1
A211623 ... |w+2x+3y|<=1
A211624 ... w+2x+2y>0; recurrence degree: 6
A211625 ... w+3x+3y>0; recurrence degree: 8
A211626 ... w+4x+4y>0; recurrence degree: 10
A211627 ... w+5x+5y>0; recurrence degree: 12
A211628 ... 3w+x+y>0; recurrence degree: 6
A211629 ... 4w+x+y>0; recurrence degree: 7
A211630 ... 5w+x+y>0; recurrence degree: 8
A211631 ... w^2>x^2+y^2; all terms divisible by 8
A211632 ... 2w^2>x^2+y^2; all terms divisible by 8
A211633 ... w^2>2x^2+2y^2; all terms divisible by 8
...
Next, S={1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated relation.
A211634 ... w^2<=x^2+y^2
A211635 ... w^2A211790
A211636 ... w^2>=x^2+y^2
A211637 ... w^2>x^2+y^2
A211638 ... w^2+x^2+y^2
A211639 ... w^2+x^2+y^2<=n
A211640 ... w^2+x^2+y^2>n
A211641 ... w^2+x^2+y^2>=n
A211642 ... w^2+x^2+y^2<2n
A211643 ... w^2+x^2+y^2<=2n
A211644 ... w^2+x^2+y^2>2n
A211645 ... w^2+x^2+y^2>=2n
A211646 ... w^2+x^2+y^2<3n
A211647 ... w^2+x^2+y^2<=3n
A063691 ... w^2+x^2+y^2=n
A211649 ... w^2+x^2+y^2=2n
A211648 ... w^2+x^2+y^2=3n
A211650 ... w^3A211790
A211651 ... w^3>x^3+y^3; see Comments at A211790
A211652 ... w^4A211790
A211653 ... w^4>x^4+y^4; see Comments at A211790

Examples

			a(1) counts these 9 triples: (-1,-1,1), (-1, 1,-1), (0, -1, 0), (0, 0, -1), (0,0,0), (0,0,1), (0,1,0), (1,-1,1), (1,1,-1).
		

Crossrefs

Cf. A120486.

Programs

  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 + x*y, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}] (* A211422 *)
    (t - 1)/8                   (* A120486 *)

A001400 Number of partitions of n into at most 4 parts.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 11, 15, 18, 23, 27, 34, 39, 47, 54, 64, 72, 84, 94, 108, 120, 136, 150, 169, 185, 206, 225, 249, 270, 297, 321, 351, 378, 411, 441, 478, 511, 551, 588, 632, 672, 720, 764, 816, 864, 920, 972, 1033, 1089, 1154, 1215, 1285, 1350, 1425, 1495
Offset: 0

Keywords

Comments

Molien series for 4-dimensional representation of S_4 [Nebe, Rains, Sloane, Chap. 7].
Also number of pure 2-complexes on 4 nodes with n multiple 2-simplexes. - Vladeta Jovovic, Dec 27 1999
Also number of different integer triangles with perimeter <= n+3. Also number of different scalene integer triangles with perimeter <= n+9. - Reinhard Zumkeller, May 12 2002
a(n) is the coefficient of q^n in the expansion of (m choose 4)_q as m goes to infinity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
Also number of partitions of n into parts <= 4. a(n) = A026820(n,4), for n > 3. - Reinhard Zumkeller, Jan 21 2010
Number of different distributions of n+10 identical balls in 4 boxes as x,y,z,p where 0 < x < y < z < p. - Ece Uslu and Esin Becenen, Jan 11 2016
Number of partitions of 5n+8 or 5n+12 into 4 parts (+-) 3 mod 5. a(4) = 5 partitions of 28: [7,7,7,7], [12,7,7,2], [12,12,2,2], [17,7,2,2], [22,2,2,2]. a(3) = 3 partitions of 27: [8,8,8,3], [13,8,3,3], [18,3,3,3]. - Richard Turk, Feb 24 2016
a(n) is the total number of non-isomorphic geodetic graphs of diameter n homeomorphic to a complete graph K4. - Carlos Enrique Frasser, May 24 2018

Examples

			(4 choose 4)_q = 1, (5 choose 4)_q = q^4 + q^3 + q^2 + q + 1, (6 choose 4)_q = q^8 + q^7 + 2*q^6 + 2*q^5 + 3*q^4 + 2*q^3 + 2*q^2 + q + 1, (7 choose 4) = q^12 + q^11 + 2*q^10 + 3*q^9 + 4*q^8 + 4*q^7 + 5*q^6 + 4*q^5 + 4*q^4 + 3*q^3 + 2*q^2 + q + 1 so the coefficient of q^0 converges to 1, q^1 to 1, q^2 to 2 and so on.
G.f. = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 6*x^5 + 9*x^6 + 11*x^7 + ...
a(4) = 5, i.e., {1,2,3,8}, {1,2,4,7}, {1,2,5,6}, {2,3,4,5}, {1,3,4,6}. Number of different distributions of 14 identical balls in 4 boxes as x,y,z,p where 0 < x < y < z < p. - _Ece Uslu_, Esin Becenen, Jan 11 2016
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 115, row m=4 of Q(m,n) table; p. 120, P(n,4).
  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 2.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 275.
  • D. E. Knuth, The Art of Computer Programming, vol. 4, Fascicle 3, Generating All Combinations and Partitions, Addison-Wesley, 2005, Section 7.2.1.4., p. 56, exercise 31.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Essentially same as A026810. Partial sums of A005044.
a(n) = A008284(n+4, 4), n >= 0.
First differences of A002621.

Programs

  • Haskell
    a001400 n = a001400_list !! n
    a001400_list = scanl1 (+) a005044_list -- Reinhard Zumkeller, Feb 28 2013
  • Magma
    K:=Rationals(); M:=MatrixAlgebra(K,4); q1:=DiagonalMatrix(M,[1,-1,1,-1]); p1:=DiagonalMatrix(M,[1,1,-1,-1]); q2:=DiagonalMatrix(M,[1,1,1,-1]); h:=M![1,1,1,1, 1,1,-1,-1, 1,-1,1,-1, 1,-1,-1,1]/2; G:=MatrixGroup<4,K|q1,q2,h>; MolienSeries(G);
    
  • Maple
    A001400 := n->if n mod 2 = 0 then round(n^2*(n+3)/144); else round((n-1)^2*(n+5)/144); fi;
    with(combstruct):ZL5:=[S,{S=Set(Cycle(Z,card<5))}, unlabeled]:seq(count(ZL5,size=n),n=0..55); # Zerinvary Lajos, Sep 24 2007
    A001400:=-(-z**8+z**9+2*z**4-z**7-1-z)/(z**2+1)/(z**2+z+1)/(z+1)**2/(z-1)**4; # [conjectured by Simon Plouffe in his 1992 dissertation; gives sequence except for an initial 1]
    B:=[S,{S = Set(Sequence(Z,1 <= card),card <=4)},unlabelled]: seq(combstruct[count](B, size=n), n=0..55); # Zerinvary Lajos, Mar 21 2009
  • Mathematica
    CoefficientList[ Series[ 1/((1 - x)*(1 - x^2)*(1 - x^3)*(1 - x^4)), {x, 0, 65} ], x ]
    LinearRecurrence[{1, 1, 0, 0, -2, 0, 0, 1, 1, -1}, {1, 1, 2, 3, 5, 6, 9, 11, 15, 18}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 17 2012 *)
    a[n_] := Sum[Floor[(n - j - 3*k + 2)/2], {j, 0, Floor[n/4]}, {k, j, Floor[(n - j)/3]}]; Table[a[n], {n, 0, 55}] (* L. Edson Jeffery, Jul 31 2014 *)
    a[ n_] := With[{m = n + 5}, Round[ (2 m^3 - 3 m (5 + 3 (-1)^m)) / 288]]; (* Michael Somos, Dec 29 2014 *)
    a[ n_] := With[{m = Abs[n + 5] - 5}, Sign[n + 5] Length[ IntegerPartitions[ m, 4]]]; (* Michael Somos, Dec 29 2014 *)
    a[ n_] := With[{m = Abs[n + 5] - 5}, Sign[n + 5] SeriesCoefficient[ 1 / ((1 - x) (1 - x^2) (1 - x^3) (1 - x^4)), {x, 0, m}]]; (* Michael Somos, Dec 29 2014 *)
    Table[Length@IntegerPartitions[n, 4], {n, 0, 55}] (* Robert Price, Aug 18 2020 *)
  • PARI
    a(n) = round(((n+4)^3 + 3*(n+4)^2 -9*(n+4)*((n+4)% 2))/144) \\ Washington Bomfim, Jul 03 2012
    
  • PARI
    {a(n) = n+=5; round( (2*n^3 - 3*n*(5 + 3*(-1)^n)) / 288)}; \\ Michael Somos, Dec 29 2014
    
  • PARI
    a(n) = #partitions(n,,4); \\ Ruud H.G. van Tol, Jun 02 2024
    

Formula

G.f.: 1/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)).
a(n) = 1 + (a(n-2) + a(n-3) + a(n-4)) - (a(n-5) + a(n-6) + a(n-7)) + a(n-9). - Norman J. Meluch (norm(AT)iss.gm.com), Mar 09 2000
P(n, 4) = (1/288)*(2*n^3 + 6*n^2 - 9*n - 13 + (9*n+9)*pcr{1, -1}(2, n) - 32*pcr{1, -1, 0}(3, n) - 36*pcr{1, 0, -1, 0}(4, n)) (see Comtet).
Let c(n) = Sum_{i=0..floor(n/3)} (1 + ceiling((n-3*i-1)/2)), then a(n) = Sum_{i=0..floor(n/4)} (1 + ceiling((n-4*i-1)/2) + c(n-4*i-3)). - Jon Perry, Jun 27 2003
Euler transform of finite sequence [1, 1, 1, 1].
(n choose 4)_q = (q^n-1)*(q^(n-1)-1)*(q^(n-2)-1)*(q^(n-3)-1)/((q^4-1)*(q^3-1)*(q^2-1)*(q-1)).
a(n) = round(((n+4)^3 + 3*(n+4)^2 - 9*(n+4)*((n+4) mod 2))/144). - Washington Bomfim, Jul 03 2012
a(n) = a(n-1) + a(n-2) - 2*a(n-5) + a(n-8) + a(n-9) - a(n-10). - David Neil McGrath, Sep 12 2014
a(n) = -a(-10-n) for all n in Z. - Michael Somos, Dec 29 2014
a(n) - a(n+1) - a(n+3) + a(n+4) = 0 if n is odd, else floor(n/4) + 2 for all n in Z. - Michael Somos, Dec 29 2014
a(n) = n^3/144 + n^2/24 - 7*n/144 + 1 + floor(n/4)/4 + floor(n/3)/3 + (n+5)*floor(n/2)/8 + floor((n+1)/4)/4. - Vaclav Kotesovec, Aug 18 2015
a(n) = a(n-4) + A001399(n). - Ece Uslu, Esin Becenen, Jan 11 2016, corrected Sep 25 2020
a(6*n) - a(6*n+1) - a(6*n+4) + a(6*n+5) = n+1. - Richard Turk, Apr 19 2016
a(n) = a(n-1) + A005044(n+3) for n>0, i.e., first differences is A005044. - Yuchun Ji, Oct 12 2020
From Vladimír Modrák and Zuzana Soltysova, Dec 09 2020: (Start)
a(n) = round((n + 3)^2/12) + Sum_{i=0..floor(n/4)} round((n - 4*i - 1)^2/12).
a(n) = floor(((n + 3)^2 + 4)/12) + Sum_{i=0..floor(n/4)} floor(((n - 4*i - 1)^2 + 4)/12). (End)
a(n) - a(n-3) = A008642(n). - R. J. Mathar, Jun 23 2021
a(n) - a(n-2) = A025767(n). - R. J. Mathar, Jun 23 2021
a(n) = round((2*n^3 + 30*n^2 + 135*n + 175)/288 + (-1)^n*(n+5)/32). - Dave Neary, Oct 28 2021
From Vladimír Modrák, Jul 13 2022: (Start)
a(n) = Sum_{j=0..floor(n/4)} Sum_{i=0..floor(n/3)} ceiling((max(0,n + 1 - 3*i - 4*j))/2).
a(n) = Sum_{i=0..floor(n/4)} floor(((n + 3 - 4*i)^2 + 4)/12). (End)
a(n) = floor(((n+4)^2*(n+7) - 9*(n+4)*(n mod 2) + 32)/144). - Vladimír Modrák, Mar 23 2025

A266755 Expansion of 1/((1-x^2)*(1-x^3)*(1-x^4)).

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 3, 2, 4, 3, 5, 4, 7, 5, 8, 7, 10, 8, 12, 10, 14, 12, 16, 14, 19, 16, 21, 19, 24, 21, 27, 24, 30, 27, 33, 30, 37, 33, 40, 37, 44, 40, 48, 44, 52, 48, 56, 52, 61, 56, 65, 61, 70, 65, 75, 70, 80, 75, 85, 80, 91, 85, 96, 91, 102, 96, 108, 102, 114, 108, 120, 114, 127, 120, 133, 127, 140, 133, 147, 140, 154, 147, 161, 154, 169
Offset: 0

Author

N. J. A. Sloane, Jan 10 2016

Keywords

Comments

This is the same as A005044 but without the three leading zeros. There are so many situations where one wants this sequence rather than A005044 that it seems appropriate for it to have its own entry.
But see A005044 (still the main entry) for numerous applications and references.
Also, Molien series for invariants of finite Coxeter group D_3.
The Molien series for the finite Coxeter group of type D_k (k >= 3) has g.f. = 1/Product_i (1-x^(1+m_i)) where the m_i are [1,3,5,...,2k-3,k-1]. If k is even only even powers of x appear, and we bisect the sequence.
Also, Molien series for invariants of finite Coxeter group A_3. The Molien series for the finite Coxeter group of type A_k (k >= 1) has g.f. = 1/Product_{i=2..k+1} (1-x^i). Note that this is the root system A_k not the alternating group Alt_k.
a(n) is the number of partitions of n into parts 2, 3, and 4. - Joerg Arndt, Apr 16 2017
From Gus Wiseman, May 23 2021: (Start)
Also the number of integer partitions of n into at most n/2 parts, none greater than 3. The case of any maximum is A110618. The case of any length is A001399. The Heinz numbers of these partitions are given by A344293.
For example, the a(2) = 1 through a(13) = 5 partitions are:
2 3 22 32 33 322 332 333 3322 3332 3333 33322
31 222 331 2222 3222 3331 32222 33222 33331
321 3221 3321 22222 33221 33321 322222
3311 32221 33311 222222 332221
33211 322221 333211
332211
333111
(End)

Examples

			G.f. = 1 + x^2 + x^3 + 2*x^4 + x^5 + 3*x^6 + 2*x^7 + 4*x^8 + ... - _Michael Somos_, Jan 29 2022
		

References

  • J. E. Humphreys, Reflection Groups and Coxeter Groups, Cambridge, 1990. See Table 3.1, page 59.

Crossrefs

Molien series for finite Coxeter groups A_1 through A_12 are A059841, A103221, A266755, A008667, A037145, A001996, and A266776-A266781.
Molien series for finite Coxeter groups D_3 through D_12 are A266755, A266769, A266768, A003402, and A266770-A266775.
A variant of A005044.
Cf. A001400 (partial sums).
Cf. A308065.
Number of partitions of n whose Heinz number is in A344293.
A001399 counts partitions with all parts <= 3, ranked by A051037.
A025065 counts partitions of n with >= n/2 parts, ranked by A344296.
A035363 counts partitions of n with n/2 parts, ranked by A340387.
A110618 counts partitions of n into at most n/2 parts, ranked by A344291.

Programs

  • Magma
    I:=[1,0,1,1,2,1,3,2,4]; [n le 9 select I[n] else Self(n-2)+ Self(n-3)+Self(n-4)-Self(n-5)-Self(n-6)-Self(n-7)+Self(n-9): n in [1..100]]; // Vincenzo Librandi, Jan 11 2016
    
  • Mathematica
    CoefficientList[Series[1/((1-x^2)(1-x^3)(1-x^4)), {x, 0, 100}], x] (* JungHwan Min, Jan 10 2016 *)
    LinearRecurrence[{0,1,1,1,-1,-1,-1,0,1}, {1,0,1,1,2,1,3,2,4}, 100] (* Vincenzo Librandi, Jan 11 2016 *)
    Table[Length[Select[IntegerPartitions[n],Length[#]<=n/2&&Max@@#<=3&]],{n,0,30}] (* Gus Wiseman, May 23 2021 *)
    a[ n_] := Round[(n + 3*(2 - Mod[n,2]))^2/48]; (* Michael Somos, Jan 29 2022 *)
  • PARI
    Vec(1/((1-x^2)*(1-x^3)*(1-x^4)) + O(x^100)) \\ Michel Marcus, Jan 11 2016
    
  • PARI
    {a(n) = round((n + 3*(2-n%2))^2/48)}; /* Michael Somos, Jan 29 2022 */
    
  • Sage
    (1/((1-x^2)*(1-x^3)*(1-x^4))).series(x, 100).coefficients(x, sparse=False) # G. C. Greubel, Jun 13 2019

Formula

a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>8. - Vincenzo Librandi, Jan 11 2016
a(n) = a(-9-n) for all n in Z. a(n) = a(n+3) for all n in 2Z. - Michael Somos, Jan 29 2022
E.g.f.: exp(-x)*(81 - 18*x + exp(2*x)*(107 + 60*x + 6*x^2) + 64*exp(x/2)*cos(sqrt(3)*x/2) + 36*exp(x)*(cos(x) - sin(x)))/288. - Stefano Spezia, Mar 05 2023
For n >= 3, if n is even, a(n) = a(n-3) + floor(n/4) + 1, otherwise a(n) = a(n-3). - Robert FERREOL, Feb 05 2024
a(n) = floor((n^2+9*n+(3*n+9)*(-1)^n+39)/48). - Hoang Xuan Thanh, Jun 03 2025

A325691 Number of length-3 integer partitions of n whose largest part is not greater than the sum of the other two.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 5, 7, 7, 9, 8, 11, 10, 13, 12, 15, 14, 18, 16, 20, 19, 23, 21, 26, 24, 29, 27, 32, 30, 36, 33, 39, 37, 43, 40, 47, 44, 51, 48, 55, 52, 60, 56, 64, 61, 69, 65, 74, 70, 79, 75, 84, 80, 90, 85, 95, 91, 101, 96, 107, 102, 113
Offset: 0

Author

Gus Wiseman, May 15 2019

Keywords

Comments

Also the number of possible triples of edge-lengths of a triangle with perimeter n, where degenerate (self-intersecting) triangles are allowed.
The number of triples (a,b,c) for 1 <= a <= b <= c <= a+b and a+b+c = n. - Yuchun Ji, Oct 15 2020

Examples

			The a(3) = 1 through a(12) = 6 partitions:
  (111)  (211)  (221)  (222)  (322)  (332)  (333)  (433)  (443)  (444)
                       (321)  (331)  (422)  (432)  (442)  (533)  (543)
                                     (431)  (441)  (532)  (542)  (552)
                                                   (541)  (551)  (633)
                                                                 (642)
                                                                 (651)
		

Crossrefs

Cf. A001399, A005044 (nondegenerate triangles), A008642, A069905, A124278.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],#[[1]]<=#[[2]]+#[[3]]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: x^3*(1 + x - x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>8. (End)
a(n) = A005044(n+3) - A000035(n+3). i.e., remove the only one triple (a=0,b,b) if n is even from the A005044 which is the number of triples (a,b,c) for 0 <= a <= b <= c <= a+b and a+b+c = n. - Yuchun Ji, Oct 15 2020
The above conjectured formulas are true. - Stefano Spezia, May 19 2023

A256067 Irregular table T(n,k): the number of partitions of n where the least common multiple of all parts equals k.

Original entry on oeis.org

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

Author

R. J. Mathar, Mar 18 2015

Keywords

Examples

			The 5 partitions of n=4 are 1+1+1+1 (lcm=1), 1+1+2 (lcm=2), 2+2 (lcm=2), 1+3 (lcm=3) and 4 (lcm=4). So k=1, 3 and 4 appear once, k=2 appears twice.
The triangle starts:
  1 ;
  1 ;
  1  1;
  1  1  1;
  1  2  1  1;
  1  2  1  1  1  1;
  1  3  2  2  1  2;
  1  3  2  2  1  3  1  0  0  1  0  1;
  ...
		

Crossrefs

Cf. A000041 (row sums), A000793 (row lengths), A213952, A074761 (diagonal), A074752 (6th column), A008642 (4th column), A002266 (5th column), A002264 (3rd column), A132270 (7th column), A008643 (8th column), A008649 (9th column), A258470 (10th column).
Cf. A009490 (number of nonzero terms of rows), A074064 (last elements of rows), A168532 (the same for gcd), A181844 (Sum k*T(n,k)).

Programs

  • Maple
    A256067 := proc(n,k)
            local a,p ;
            a := 0 ;
            for p in combinat[partition](n) do
                    ilcm(op(p)) ;
                    if % = k then
                            a := a+1 ;
                    end if;
            end do:
            a;
    end proc:
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, x,
          b(n, i-1)+(p-> add(coeff(p, x, t)*x^ilcm(t, i),
          t=1..degree(p)))(add(b(n-i*j, i-1), j=1..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Mar 27 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, x, b[n, i-1] + Function[{p}, Sum[ Coefficient[p, x, t]*x^LCM[t, i], {t, 1, Exponent[p, x]}]][Sum[b[n-i*j, i-1], {j, 1, n/i}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, n]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jun 22 2015, after Alois P. Heinz *)

Extensions

T(0,1)=1 prepended by Alois P. Heinz, Mar 27 2015

A325688 Number of length-3 compositions of n such that every distinct consecutive subsequence has a different sum.

Original entry on oeis.org

0, 0, 0, 1, 0, 4, 5, 12, 12, 25, 24, 40, 41, 60, 60, 85, 84, 112, 113, 144, 144, 181, 180, 220, 221, 264, 264, 313, 312, 364, 365, 420, 420, 481, 480, 544, 545, 612, 612, 685, 684, 760, 761, 840, 840, 925, 924, 1012, 1013, 1104, 1104, 1201, 1200, 1300, 1301, 1404
Offset: 0

Author

Gus Wiseman, May 15 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Confirmed recurrence relation from Colin Barker for n <= 5000. - Fausto A. C. Cariboni, Feb 13 2022

Examples

			The a(3) = 1 through a(8) = 12 compositions:
  (111)  (113)  (114)  (115)  (116)
         (122)  (132)  (124)  (125)
         (221)  (222)  (133)  (143)
         (311)  (231)  (142)  (152)
                (411)  (214)  (215)
                       (223)  (233)
                       (241)  (251)
                       (322)  (332)
                       (331)  (341)
                       (412)  (512)
                       (421)  (521)
                       (511)  (611)
		

Crossrefs

Column k = 3 of A325687.
Cf. A000217 (all length-3).

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],UnsameQ@@Total/@Union[ReplaceList[#,{_,s__,_}:>{s}]]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: x^3*(1 + 2*x^2 + 4*x^3 + 5*x^4) / ((1 - x)^3*(1 + x)^2*(1 + x + x^2)).
a(n) = 2*a(n-2) + a(n-3) - a(n-4) - 2*a(n-5) + a(n-7) for n>7.
(End)

A325690 Number of length-3 integer partitions of n whose largest part is not the sum of the other two.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 2, 4, 3, 7, 6, 10, 9, 14, 13, 19, 17, 24, 23, 30, 28, 37, 35, 44, 42, 52, 50, 61, 58, 70, 68, 80, 77, 91, 88, 102, 99, 114, 111, 127, 123, 140, 137, 154, 150, 169, 165, 184, 180, 200, 196, 217, 212, 234, 230, 252, 247, 271, 266, 290, 285, 310
Offset: 0

Author

Gus Wiseman, May 15 2019

Keywords

Comments

Confirmed recurrence relation from Colin Barker for n <= 10000. - Fausto A. C. Cariboni, Feb 19 2022

Examples

			The a(3) = 1 through a(13) = 14 partitions (A = 10, B = 11):
  (111)  (221)  (222)  (322)  (332)  (333)  (433)  (443)  (444)   (544)
         (311)  (411)  (331)  (521)  (432)  (442)  (533)  (543)   (553)
                       (421)  (611)  (441)  (622)  (542)  (552)   (643)
                       (511)         (522)  (631)  (551)  (732)   (652)
                                     (531)  (721)  (632)  (741)   (661)
                                     (621)  (811)  (641)  (822)   (733)
                                     (711)         (722)  (831)   (742)
                                                   (731)  (921)   (751)
                                                   (821)  (A11)   (832)
                                                   (911)          (841)
                                                                  (922)
                                                                  (931)
                                                                  (A21)
                                                                  (B11)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],#[[1]]!=#[[2]]+#[[3]]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 15 2019: (Start)
G.f.: x^3*(1 + x^2 + x^3 + x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>8.
(End)

A256554 Number T(n,k) of cycle types of degree-n permutations having the k-th smallest possible order; triangle T(n,k), n>=0, 1<=k<=A009490(n), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 1, 1, 1, 4, 2, 4, 1, 5, 1, 1, 1, 1, 1, 1, 4, 3, 4, 1, 7, 1, 1, 1, 2, 2, 1, 1, 1, 1, 5, 3, 6, 2, 9, 1, 2, 1, 3, 4, 1, 1, 1, 1, 1, 1, 5, 3, 6, 2, 12, 1, 2, 1, 4, 1, 6, 2, 2, 1, 2, 1, 1, 1, 2
Offset: 0

Author

Alois P. Heinz, Apr 01 2015

Keywords

Comments

Sum_{k>=0} A256553(n,k)*T(n,k) = A181844(n).

Examples

			Triangle T(n,k) begins:
  1;
  1;
  1, 1;
  1, 1, 1;
  1, 2, 1, 1;
  1, 2, 1, 1, 1, 1;
  1, 3, 2, 2, 1, 2;
  1, 3, 2, 2, 1, 3, 1, 1, 1;
  1, 4, 2, 4, 1, 5, 1, 1, 1, 1, 1;
  1, 4, 3, 4, 1, 7, 1, 1, 1, 2, 2, 1, 1, 1;
  1, 5, 3, 6, 2, 9, 1, 2, 1, 3, 4, 1, 1, 1, 1, 1;
		

Crossrefs

Row sums give A000041.
Row lengths give A009490.
Columns k=1-9 give: A000012, A004526, A002264, A008642(n-4), A002266, A074752, A132270, A008643(n-8) for n>7, A008649(n-9) for n>8.
Last elements of rows give A074064.
Main diagonal gives A074761.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=1, x,
          b(n, i-1)+(p-> add(coeff(p, x, t)*x^ilcm(t, i),
          t=1..degree(p)))(add(b(n-i*j, i-1), j=1..n/i)))
        end:
    T:= n->(p->seq((h->`if`(h=0, [][], h))(coeff(p, x, i))
         , i=1..degree(p)))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, x, b[n, i - 1] + Function[p, Sum[Coefficient[p, x, t]*x^LCM[t, i], {t, 1, Exponent[p, x]}]][Sum[b[n - i*j, i - 1], {j, 1, n/i}]]]; T[n_] := Function[p, Table[Function[h, If[h == 0, {{}, {}}, h]][Coefficient[p, x, i]], {i, 1, Exponent[p, x]}]][b[n, n]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 23 2017, translated from Maple *)

A325689 Number of length-3 compositions of n such that no part is the sum of the other two.

Original entry on oeis.org

0, 0, 0, 1, 0, 6, 4, 15, 12, 28, 24, 45, 40, 66, 60, 91, 84, 120, 112, 153, 144, 190, 180, 231, 220, 276, 264, 325, 312, 378, 364, 435, 420, 496, 480, 561, 544, 630, 612, 703, 684, 780, 760, 861, 840, 946, 924, 1035, 1012, 1128, 1104, 1225, 1200, 1326, 1300, 1431
Offset: 0

Author

Gus Wiseman, May 15 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Confirmed recurrence relation from Colin Barker for n <= 5000. - Fausto A. C. Cariboni, Feb 15 2022

Examples

			The a(3) = 1 through a(8) = 12 compositions (empty columns not shown):
  (111)  (113)  (114)  (115)  (116)
         (122)  (141)  (124)  (125)
         (131)  (222)  (133)  (152)
         (212)  (411)  (142)  (161)
         (221)         (151)  (215)
         (311)         (214)  (233)
                       (223)  (251)
                       (232)  (323)
                       (241)  (332)
                       (313)  (512)
                       (322)  (521)
                       (331)  (611)
                       (412)
                       (421)
                       (511)
		

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],And@@Table[#[[i]]!=Total[Delete[#,i]],{i,3}]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: x^3*(1 - x + 4*x^2) / ((1 - x)^3*(1 + x)^2) for n>5.
a(n) = -(5 + 3*(-1)^n - 2*n) * (n-2) / 4 for n>0.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
(End)
Showing 1-10 of 20 results. Next