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

A100506 Bisection of A001523.

Original entry on oeis.org

1, 4, 15, 47, 130, 330, 784, 1765, 3804, 7898, 15880, 31048, 59220, 110484, 202070, 362974, 641368, 1116325, 1916184, 3247088, 5436972, 9002752, 14752316, 23938188, 38487496, 61344055, 96974176, 152110204, 236837795, 366177506, 562373990, 858193804, 1301654610
Offset: 0

Views

Author

N. J. A. Sloane, Nov 24 2004

Keywords

Crossrefs

Cf. A001523.

Programs

  • Magma
    m:=200;
    R:=PowerSeriesRing(Integers(), m);
    b:= Coefficients(R!( 1 + (&+[ x^n*(1-x^n)/(&*[(1-x^j)^2: j in [1..n]]): n in [1..m+2]]) ));
    A100506:= func< n | b[2*n+2] >;
    [A100506(n): n in [0..80]]; // G. C. Greubel, Apr 03 2023
    
  • Maple
    seq(coeff(convert(series(add(-(-1)^k*x^(k*(k+1)/2),k=1..100)/(mul(1-x^k,k=1..100))^2,x,100),polynom),x,2*n+1),n=0..45); # (C. Ronaldo)
    # second Maple program:
    b:= proc(n, i) option remember;
          `if`(i>n, 0, `if`(irem(n, i)=0, 1, 0)+
          add(b(n-i*j, i+1)*(j+1), j=0..n/i))
        end:
    a:= n-> `if`(n=0, 1, b(2*n+1, 1)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 26 2014
  • Mathematica
    b[n_, i_]:= b[n, i]= If[i>n, 0, If[Mod[n, i]==0, 1, 0] + Sum[b[n-i*j, i + 1]*(j+1), {j, 0, n/i}]];
    a[n_]:= If[n==0, 1, b[2*n+1, 1]];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jun 18 2018, after Alois P. Heinz *)
  • SageMath
    @CachedFunction
    def b(n, k): # Indranil Ghosh's code of A001523
        if k>n: return 0
        if n%k==0: x=1
        else: x=0
        return x + sum(b(n-k*j, k+1)*(j+1) for j in range(n//k + 1))
    def A100506(n): return 1 if n==0 else b(2*n+1, 1)
    [A100506(n) for n in range(41)] # G. C. Greubel, Apr 03 2023

Extensions

More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 19 2005

A100505 Bisection of A001523.

Original entry on oeis.org

1, 2, 8, 27, 79, 209, 512, 1183, 2604, 5504, 11240, 22277, 43003, 81098, 149769, 271404, 483439, 847681, 1464999, 2498258, 4207764, 7005688, 11538936, 18814423, 30387207, 48641220, 77205488, 121567834, 189974638, 294742961, 454164484, 695254782, 1057704607
Offset: 0

Views

Author

N. J. A. Sloane, Nov 24 2004

Keywords

Crossrefs

Programs

  • Magma
    m:=200;
    R:=PowerSeriesRing(Integers(), m);
    b:=Coefficients(R!( 1 + (&+[ x^n*(1-x^n)/(&*[(1-x^j)^2: j in [1..n]]): n in [1..m+2]]) ));
    A100505:= func< n | b[2*n+1] >;
    [A100505(n): n in [0..80]]; // G. C. Greubel, Apr 03 2023
    
  • Maple
    seq(coeff(convert(series(1+add(-(-1)^k*x^(k*(k+1)/2),k=1..100)/(mul(1-x^k,k=1..100))^2,x,100),polynom),x,2*n),n=0..45); # (C. Ronaldo)
    # second Maple program:
    b:= proc(n, i) option remember;
          `if`(i>n, 0, `if`(irem(n, i)=0, 1, 0)+
          add(b(n-i*j, i+1)*(j+1), j=0..n/i))
        end:
    a:= n-> `if`(n=0, 1, b(2*n, 1)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Mar 26 2014
  • Mathematica
    max = 70; s = 1 + Sum[(-1)^(k+1)*q^(k*(k+1)/2), {k, 1, Sqrt[2 max] // Ceiling}]/QPochhammer[q]^2 + O[q]^max // Normal; Partition[(List @@ s) /. q -> 1, 2][[All, 1]] (* Jean-François Alcover, Apr 04 2017 *)
  • SageMath
    @CachedFunction
    def b(n, k): # Indranil Ghosh's code of A001523
        if k>n: return 0
        if n%k==0: x=1
        else: x=0
        return x + sum(b(n-k*j, k+1)*(j+1) for j in range(n//k + 1))
    def A100505(n): return 1 if n==0 else b(2*n, 1)
    [A100505(n) for n in range(81)] # G. C. Greubel, Apr 03 2023

Extensions

More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 19 2005

A174439 Partial sums of A001523.

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 58, 105, 184, 314, 523, 853, 1365, 2149, 3332, 5097, 7701, 11505, 17009, 24907, 36147, 52027, 74304, 105352, 148355, 207575, 288673, 399157, 548926, 750996, 1022400, 1385374, 1868813, 2510181, 3357862, 4474187, 5939186
Offset: 0

Views

Author

Jonathan Vos Post, Mar 19 2010

Keywords

Comments

The subsequence of primes begins: 2, 31, 523, 853, 24907, 52027, 1868813, ...

Crossrefs

Programs

  • Mathematica
    nmax = 41; A001523 = CoefficientList[Series[1 + Sum[(-1)^(k + 1)*x^(k*(k + 1)/2), {k, 1, nmax}] / QPochhammer[x]^2, {x, 0, nmax}], x]; s = 0; Table[s = s + A001523[[k]], {k, 1, nmax}] (* Vaclav Kotesovec, Dec 13 2015 *)

Formula

a(n) = Sum_{i=0..n} A001523(i).
a(n) ~ exp(2*Pi*sqrt(n/3))/(8*Pi*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Dec 13 2015

A328087 Erroneous version of A001523.

Original entry on oeis.org

1, 2, 4, 8, 15, 27, 47, 79, 130, 209, 329
Offset: 1

Views

Author

Keywords

A000712 Generating function = Product_{m>=1} 1/(1 - x^m)^2; a(n) = number of partitions of n into parts of 2 kinds.

Original entry on oeis.org

1, 2, 5, 10, 20, 36, 65, 110, 185, 300, 481, 752, 1165, 1770, 2665, 3956, 5822, 8470, 12230, 17490, 24842, 35002, 49010, 68150, 94235, 129512, 177087, 240840, 326015, 439190, 589128, 786814, 1046705, 1386930, 1831065, 2408658, 3157789, 4126070, 5374390
Offset: 0

Views

Author

Keywords

Comments

For n >= 1, a(n) is also the number of conjugacy classes in the automorphism group of the n-dimensional hypercube. This automorphism group is the wreath product of the cyclic group C_2 and the symmetric group S_n, its order is in sequence A000165. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Nov 04 2001
Also, number of noncongruent matrices in GL_n(Z): each Jordan block can only have +1 or -1 on the diagonal. - Michele Dondi (blazar(AT)lcm.mi.infn.it), Jun 15 2004
a(n) = Sum (k(1)+1)*(k(2)+1)*...*(k(n)+1), where the sum is taken over all (k(1),k(2),...,k(n)) such that k(1)+2*k(2)+...+n*k(n) = n, k(i)>=0, i=1..n, cf. A104510, A077285. - Vladeta Jovovic, Apr 21 2005
Convolution of partition numbers (A000041) with itself. - Graeme McRae, Jun 07 2006
Number of one-to-one partial endofunctions on n unlabeled points. Connected components are either cycles or "lines", hence two for each size. - Franklin T. Adams-Watters, Dec 28 2006
Equals A000716: (1, 3, 9, 22, 561, 108, ...) convolved with A010815. A000716 = the number of partitions of n into parts of 3 kinds = the Euler transform of [3,3,3,...]. - Gary W. Adamson, Oct 26 2008
Paraphrasing the g.f.: 1 + 2x + 5x^2 + ... = s(x) * s(x^2) * s(x^3) * s(x^4) * ...; where s(x) = 1 + 2x + 3x^2 + 4x^3 + ... is (up to a factor x) the g.f. of A000027. - Gary W. Adamson, Apr 01 2010
Also equals number of partitions of 2n in which the odd parts appear as many times in even as in odd positions. - Wouter Meeussen, Apr 17 2013
Also number of ordered pairs (R,S) with R a partition of r, S a partition of s, and r+s=n; see example. This corresponds to the formula a(n) = sum(r+s==n, p(r)*p(s) ) = Sum_{k=0..n} p(k)*p(n-k). - Joerg Arndt, Apr 29 2013
Also the number of all multi-graphs with exactly n-edges and with vertex degrees 1 or 2. - Ebrahim Ghorbani, Dec 02 2013
If one decomposes k-permutations into cycles and so-called paths, the number of different type of decompositions equals to a(k); see the paper by Chen, Ghorbani, and Wong. - Ebrahim Ghorbani, Dec 02 2013
Let T(n,k) be the number of partitions of n having parts 1 through k of two kinds, with T(n,0) = A000041(n), the number of partitions of n. Then a(n) = T(n,0) + T(n-1,1) + T(n-2,2) + T(n-3,3) + ... - Gregory L. Simay, May 18 2019
Also the number of orbits of projections in the partition monoid P_n under conjugation by permutations. - James East, Jul 21 2020

Examples

			Assume there are integers of two kinds: k and k'; then a(3) = 10 since 3 has the following partitions into parts of two kinds: 111, 111', 11'1', 1'1'1', 12, 1'2, 12', 1'2', 3, and 3'. - _W. Edwin Clark_, Jun 24 2011
There are a(4)=20 partitions of 4 into 2 sorts of parts. Here p:s stands for "part p of sort s":
01:  [ 1:0  1:0  1:0  1:0  ]
02:  [ 1:0  1:0  1:0  1:1  ]
03:  [ 1:0  1:0  1:1  1:1  ]
04:  [ 1:0  1:1  1:1  1:1  ]
05:  [ 1:1  1:1  1:1  1:1  ]
06:  [ 2:0  1:0  1:0  ]
07:  [ 2:0  1:0  1:1  ]
08:  [ 2:0  1:1  1:1  ]
09:  [ 2:0  2:0  ]
10:  [ 2:0  2:1  ]
11:  [ 2:1  1:0  1:0  ]
12:  [ 2:1  1:0  1:1  ]
13:  [ 2:1  1:1  1:1  ]
14:  [ 2:1  2:1  ]
15:  [ 3:0  1:0  ]
16:  [ 3:0  1:1  ]
17:  [ 3:1  1:0  ]
18:  [ 3:1  1:1  ]
19:  [ 4:0  ]
20:  [ 4:1  ]
- _Joerg Arndt_, Apr 28 2013
The a(4)=20 ordered pairs (R,S) of partitions for n=4 are
  ([4], [])
  ([3, 1], [])
  ([2, 2], [])
  ([2, 1, 1], [])
  ([1, 1, 1, 1], [])
  ([3], [1])
  ([2, 1], [1])
  ([1, 1, 1], [1])
  ([2], [2])
  ([2], [1, 1])
  ([1, 1], [2])
  ([1, 1], [1, 1])
  ([1], [3])
  ([1], [2, 1])
  ([1], [1, 1, 1])
  ([], [4])
  ([], [3, 1])
  ([], [2, 2])
  ([], [2, 1, 1])
  ([], [1, 1, 1, 1])
This list was created with the Sage command
   for P in PartitionTuples(2,4) : print P;
- _Joerg Arndt_, Apr 29 2013
G.f. = 1 + 2*x + 5*x^2 + 10*x^3 + 20*x^4 + 36*x^5 + 65*x^6 + 110*x^7 + 185*x^8 + ...
		

References

  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 90.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 199.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see Proposition 2.5.2 on page 78.

Crossrefs

Cf. A000165, A000041, A002107 (reciprocal of g.f.).
Cf. A002720.
Cf. A000716, A010815. - Gary W. Adamson, Oct 26 2008
Row sums of A175012. - Gary W. Adamson, Apr 03 2010
Column k=2 of A144064.

Programs

  • Haskell
    a000712 = p a008619_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Nov 06 2012
    
  • Julia
    # DedekindEta is defined in A000594.
    A000712List(len) = DedekindEta(len, -2)
    A000712List(39) |> println # Peter Luschny, Mar 09 2018
    
  • Maple
    with(combinat): A000712:= n-> add(numbpart(k)*numbpart(n-k), k=0..n): seq(A000712(n), n=0..40); # Emeric Deutsch
  • Mathematica
    CoefficientList[ Series[ Product[1/(1 - x^n)^2, {n, 40}], {x, 0, 37}], x]; (* Robert G. Wilson v, Feb 03 2005 *)
    Table[Count[Partitions[2*n], q_ /; Tr[(-1)^Mod[Flatten[Position[q, ?OddQ]], 2]] === 0], {n, 12}] (* _Wouter Meeussen, Apr 17 2013 *)
    a[ n_] := SeriesCoefficient[ QPochhammer[ x]^-2, {x, 0, n}]; (* Michael Somos, Oct 12 2015 *)
    Table[Length@IntegerPartitions[n, All, Range@n~Join~Range@n], {n, 0, 15}] (* Robert Price, Jun 15 2020 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( 1 / eta(x + A)^2, n))}; /* Michael Somos, Nov 14 2002 */
    
  • PARI
    Vec(1/eta('x+O('x^66))^2) /* Joerg Arndt, Jun 25 2011 */
    
  • Python
    from sympy import npartitions
    def A000712(n): return (sum(npartitions(k)*npartitions(n-k) for k in range(n+1>>1))<<1) + (0 if n&1 else npartitions(n>>1)**2) # Chai Wah Wu, Sep 25 2023
  • SageMath
    # uses[EulerTransform from A166861]
    a = BinaryRecurrenceSequence(0, 1, 2, 2)
    b = EulerTransform(a)
    print([b(n) for n in range(40)]) # Peter Luschny, Nov 11 2020
    

Formula

a(n) = Sum_{k=0..n} p(k)*p(n-k), where p(n) = A000041(n).
Euler transform of period 1 sequence [ 2, 2, 2, ...]. - Michael Somos, Jul 22 2003
a(n) = A006330(n) + A001523(n). - Michael Somos, Jul 22 2003
a(0) = 1, a(n) = (1/n)*Sum_{k=0..n-1} 2*a(k)*sigma_1(n-k). - Joerg Arndt, Feb 05 2011
a(n) ~ (1/12)*3^(1/4)*n^(-5/4)*exp((2/3)*sqrt(3)*Pi*sqrt(n)). - Joe Keane (jgk(AT)jgk.org), Sep 13 2002
G.f.: Product_{i>=1} (1 + x^i)^(2*A001511(i)) (see A000041). - Jon Perry, Jun 06 2004
More precise asymptotics: a(n) ~ exp(2*Pi*sqrt(n/3)) / (4*3^(3/4)*n^(5/4)) * (1 - (Pi/(12*sqrt(3)) + 15*sqrt(3)/(16*Pi)) / sqrt(n) + (Pi^2/864 + 315/(512*Pi^2) + 35/192)/n). - Vaclav Kotesovec, Jan 22 2017
From Peter Bala, Jan 26 2016: (Start)
a(n) is odd iff n = 2*m and p(m) is odd.
a(n) = (2/n)*Sum_{k = 0..n} k*p(k)*p(n-k) for n >= 1.
Conjecture: : a(n) is divisible by 5 when n is congruent to 2, 3 or 4 modulo 5. (End)
Conjecture is proved in Hammond and Lewis. - Yen-chi R. Lin, Jun 24 2024
G.f.: exp(2*Sum_{k>=1} x^k/(k*(1 - x^k))). - Ilya Gutkovskiy, Feb 06 2018
With the convention that a(n) = 0 for n < 0 we have the recurrence a(n) = g(n) + Sum_{k >= 1} (-1)^(k+1)*(2*k + 1)*a(n - k*(k + 1)/2), where g(n) = (-1)^m if n = m*(3*m - 1)/2 is a generalized pentagonal number (A001318) else g(n) = 0. For example, n = 7 = -2*(3*(-2) - 1)/2 is a pentagonal number, g(7) = 1, and so a(7) = 1 + 3*a(6) - 5*a(4) + 7*a(1) = 1 + 195 - 100 + 14 = 110. - Peter Bala, Apr 06 2022
a(n) = p(n/2) + Sum_{k \in Z, k != 0} (-1)^{k-1} a(n-k^2), here p(n) = A000041(n) and p(x) = 0 when x is not an integer. - Yen-chi R. Lin, Jun 24 2024
Conjecture: a(25*n + 23) is divisible by 25 (checked for n < 400). - Peter Bala, Jan 13 2025

Extensions

More terms from Joe Keane (jgk(AT)jgk.org), Nov 17 2001
More terms from Michele Dondi (blazar(AT)lcm.mi.infn.it), Jun 15 2004
Definition rewritten by N. J. A. Sloane, Apr 02 2022

A115981 The number of compositions of n which cannot be viewed as stacks.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 5, 17, 49, 126, 303, 694, 1536, 3312, 7009, 14619, 30164, 61732, 125568, 254246, 513048, 1032696, 2074875, 4163256, 8345605, 16717996, 33473334, 66998380, 134067959, 268233386, 536599508, 1073378850, 2147000209
Offset: 0

Views

Author

Alford Arnold, Feb 12 2006

Keywords

Comments

A sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. A composition of n is a finite sequence of positive integers summing to n. - Gus Wiseman, Mar 05 2020

Examples

			a(5) = 1 counting {212}.
a(6) = 5 counting {1212, 2112,2121,213,312}.
a(7) = 17 counting {11212, 12112,12121, 21211, 21121, 21112, 2122, 2212, 2113, 3112, 2131, 3121, 1213, 1312, 412, 214, 313}.
a(8) = 49 = 128 - 79.
a(9) = 126 = 256 - 130.
		

Crossrefs

The complement is counted by A001523.
The strict case is A072707.
The case covering an initial interval is A332743.
The version whose negation is not unimodal either is A332870.
Non-unimodal permutations are A059204.
Non-unimodal normal sequences are A328509.
Partitions with non-unimodal run-lengths are A332281.
Numbers whose prime signature is not unimodal are A332282.
Partitions whose 0-appended first differences are not unimodal are A332284.
Non-unimodal permutations of the prime indices of n are A332671.

Programs

  • Mathematica
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!unimodQ[#]&]],{n,0,10}] (* Gus Wiseman, Mar 05 2020 *)

Formula

a(n) = A011782(n) - A001523(n).

Extensions

More terms from Brian Kuehn (brk158(AT)psu.edu), Apr 20 2006
a(25) corrected by Georg Fischer, Jun 29 2021

A007052 Number of order-consecutive partitions of n.

Original entry on oeis.org

1, 3, 10, 34, 116, 396, 1352, 4616, 15760, 53808, 183712, 627232, 2141504, 7311552, 24963200, 85229696, 290992384, 993510144, 3392055808, 11581202944, 39540700160, 135000394752, 460920178688, 1573679925248, 5372879343616, 18344157523968, 62630871408640, 213835170586624
Offset: 0

Views

Author

Colin Mallows, N. J. A. Sloane, and Simon Plouffe

Keywords

Comments

After initial terms, first differs from A291292 at a(6) = 1352, A291292(8) = 1353.
Joe Keane (jgk(AT)jgk.org) observes that this sequence (beginning at 3) is "size of raises in pot-limit poker, one blind, maximum raising".
It appears that this sequence is the BinomialMean transform of A001653 (see A075271). - John W. Layman, Oct 03 2002
Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 8 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = 3, s(2n+1) = 4. - Herbert Kociemba, Jun 12 2004
Equals the INVERT transform of (1, 2, 5, 13, 34, 89, ...). - Gary W. Adamson, May 01 2009
a(n) is the number of compositions of n when there are 3 types of ones. - Milan Janjic, Aug 13 2010
a(n)/a(n-1) tends to (4 + sqrt(8))/2 = 3.414213.... Gary W. Adamson, Jul 30 2013
a(n) is the first subdiagonal of array A228405. - Richard R. Forberg, Sep 02 2013
Number of words of length n over {0,1,2,3,4} in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
From Gus Wiseman, Mar 05 2020: (Start)
Also the number of unimodal sequences of length n + 1 covering an initial interval of positive integers, where a sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. For example, the a(0) = 1 through a(2) = 10 sequences are:
(1) (1,1) (1,1,1)
(1,2) (1,1,2)
(2,1) (1,2,1)
(1,2,2)
(1,2,3)
(1,3,2)
(2,1,1)
(2,2,1)
(2,3,1)
(3,2,1)
Missing are: (2,1,2), (2,1,3), (3,1,2).
Conjecture: Also the number of ordered set partitions of {1..n + 1} where no element of any block is greater than any element of a non-adjacent consecutive block. For example, the a(0) = 1 through a(2) = 10 ordered set partitions are:
{{1}} {{1,2}} {{1,2,3}}
{{1},{2}} {{1},{2,3}}
{{2},{1}} {{1,2},{3}}
{{1,3},{2}}
{{2},{1,3}}
{{2,3},{1}}
{{3},{1,2}}
{{1},{2},{3}}
{{1},{3},{2}}
{{2},{1},{3}}
a(n-1) is the number of hexagonal directed-column convex polyominoes having area n (see Baril et al. at page 4). - Stefano Spezia, Oct 14 2023

Examples

			G.f. = 1 + 3*x + 10*x^2 + 34*x^3 + 116*x^4 + 396*x^5 + 1352*x^6 + 4616*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Floor((2+Sqrt(2))^n*(1/2+Sqrt(2)/4)+(2-Sqrt(2))^n*(1/2-Sqrt(2)/4)): n in [0..30] ] ; // Vincenzo Librandi, Aug 20 2011
  • Mathematica
    a[n_]:=(MatrixPower[{{3,1},{1,1}},n].{{2},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    a[ n_] := ((2 + Sqrt[2])^(n + 1) + (2 - Sqrt[2])^(n + 1)) / 4 // Simplify; (* Michael Somos, Jan 25 2017 *)
    LinearRecurrence[{4, -2}, {1, 3}, 24] (* Jean-François Alcover, Jan 07 2019 *)
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Union@@Permutations/@allnorm[n],unimodQ]],{n,6}] (* Gus Wiseman, Mar 06 2020 *)
  • PARI
    {a(n) = real((2 + quadgen(8))^(n+1)) / 2}; /* Michael Somos, Mar 06 2003 */
    

Formula

a(n+1) = 4*a(n) - 2*a(n-1).
G.f.: (1-x)/(1-4*x+2*x^2).
Binomial transform of Pell numbers 1, 2, 5, 12, ... (A000129).
a(n) = A006012(n+1)/2 = A056236(n+1)/4. - Michael Somos, Mar 06 2003
a(n) = (A035344(n)+1)/2; a(n) = (2+sqrt(2))^n(1/2+sqrt(2)/4)+(2-sqrt(2))^n(1/2-sqrt(2)/4). - Paul Barry, Jul 16 2003
Second binomial transform of (1, 1, 2, 2, 4, 4, ...). a(n) = Sum_{k=1..floor(n/2)}, C(n, 2k)*2^(n-k-1). - Paul Barry, Nov 22 2003
a(n) = ( (2-sqrt(2))^(n+1) + (2+sqrt(2))^(n+1) )/4. - Herbert Kociemba, Jun 12 2004
a(n) = both left and right terms in M^n * [1 1 1], where M = the 3 X 3 matrix [1 1 1 / 1 2 1 / 1 1 1]. M^n * [1 1 1] = [a(n) A007070(n) a(n)]. E.g., a(3) = 34. M^3 * [1 1 1] = [34 48 34] (center term is A007070(3)). - Gary W. Adamson, Dec 18 2004
The i-th term of the sequence is the entry (2, 2) in the i-th power of the 2 X 2 matrix M = ((1, 1), (1, 3)). - Simone Severini, Oct 15 2005
E.g.f.: exp(2*x)*(cosh(sqrt(2)*x)+sinh(sqrt(2)*x)/sqrt(2)). - Paul Barry, Nov 20 2003
a(n) = A007068(2*n), n>0. - R. J. Mathar, Aug 17 2009
If p[i]=Fibonacci(2i-1) and if A is the Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)= det A. - Milan Janjic, May 08 2010
a(n-1) = Sum_{k=-floor(n/4)..floor(n/4)} (-1)^k*binomial(2*n,n+4*k)/2. - Mircea Merca, Jan 28 2012
G.f.: G(0)*(1-x)/(2*x) + 1 - 1/x, where G(k) = 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) - (1-x)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
a(n) = 3*a(n-1) + a(n-2) + a(n-3) + a(n-4) + ... + a(0). - Gary W. Adamson, Aug 12 2013
a(n) = a(-2-n) * 2^(n+1) for all n in Z. - Michael Somos, Jan 25 2017

A000212 a(n) = floor(n^2/3).

Original entry on oeis.org

0, 0, 1, 3, 5, 8, 12, 16, 21, 27, 33, 40, 48, 56, 65, 75, 85, 96, 108, 120, 133, 147, 161, 176, 192, 208, 225, 243, 261, 280, 300, 320, 341, 363, 385, 408, 432, 456, 481, 507, 533, 560, 588, 616, 645, 675, 705, 736, 768, 800, 833, 867, 901, 936
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the n X n matrix of the following form: [3 2 1 0 0 0 0 0 0 0 / 2 3 2 1 0 0 0 0 0 0 / 1 2 3 2 1 0 0 0 0 0 / 0 1 2 3 2 1 0 0 0 0 / 0 0 1 2 3 2 1 0 0 0 / 0 0 0 1 2 3 2 1 0 0 / 0 0 0 0 1 2 3 2 1 0 / 0 0 0 0 0 1 2 3 2 1 / 0 0 0 0 0 0 1 2 3 2 / 0 0 0 0 0 0 0 1 2 3]. Then for n > 2 a(n) = det M_(n-2). - Benoit Cloitre, Jun 20 2002
Largest possible size for the directed Cayley graph on two generators having diameter n - 2. - Ralf Stephan, Apr 27 2003
It seems that for n >= 2, a(n) is the maximum number of non-overlapping 1 X 3 rectangles that can be packed into an n X n square. Rectangles can only be placed parallel to the sides of the square. Verified with Lobato's tool, see links. - Dmitry Kamenetsky, Aug 03 2009
Maximum number of edges in a K4-free graph with n vertices. - Yi Yang, May 23 2012
3a(n) + 1 = y^2 if n is not 0 mod 3 and 3a(n) = y^2 otherwise. - Jon Perry, Sep 10 2012
Apart from the initial term this is the elliptic troublemaker sequence R_n(1, 3) (also sequence R_n(2, 3)) in the notation of Stange (see Table 1, p. 16). For other elliptic troublemaker sequences R_n(a, b) see the cross references below. - Peter Bala, Aug 08 2013
The number of partitions of 2n into exactly 3 parts. - Colin Barker, Mar 22 2015
a(n-1) is the maximum number of non-overlapping triples (i,k), (i+1, k+1), (i+2, k+2) in an n X n matrix. Details: The triples are distributed along the main diagonal and 2*(n-1) other diagonals. Their maximum number is floor(n/3) + 2*Sum_{k = 1..n-1} floor(k/3) = floor((n-1)^2/3). - Gerhard Kirchner, Feb 04 2017
Conjecture: a(n) is the number of intersection points of n cevians that cut a triangle into the maximum number of pieces (see A007980). - Anton Zakharov, May 07 2017
From Gus Wiseman, Oct 05 2020: (Start)
Also the number of unimodal triples (meaning the middle part is not strictly less than both of the other two) of positive integers summing to n + 1. The a(2) = 1 through a(6) = 12 triples are:
(1,1,1) (1,1,2) (1,1,3) (1,1,4) (1,1,5)
(1,2,1) (1,2,2) (1,2,3) (1,2,4)
(2,1,1) (1,3,1) (1,3,2) (1,3,3)
(2,2,1) (1,4,1) (1,4,2)
(3,1,1) (2,2,2) (1,5,1)
(2,3,1) (2,2,3)
(3,2,1) (2,3,2)
(4,1,1) (2,4,1)
(3,2,2)
(3,3,1)
(4,2,1)
(5,1,1)
(End)

Examples

			G.f. = x^2 + 3*x^3 + 5*x^4 + 8*x^5 + 12*x^6 + 16*x^7 + 21*x^8 + 27*x^9 + 33*x^10 + ...
From _Gus Wiseman_, Oct 07 2020: (Start)
The a(2) = 1 through a(6) = 12 partitions of 2*n into exactly 3 parts (Barker) are the following. The Heinz numbers of these partitions are given by the intersection of A014612 (triples) and A300061 (even sum).
  (2,1,1)  (2,2,2)  (3,3,2)  (4,3,3)  (4,4,4)
           (3,2,1)  (4,2,2)  (4,4,2)  (5,4,3)
           (4,1,1)  (4,3,1)  (5,3,2)  (5,5,2)
                    (5,2,1)  (5,4,1)  (6,3,3)
                    (6,1,1)  (6,2,2)  (6,4,2)
                             (6,3,1)  (6,5,1)
                             (7,2,1)  (7,3,2)
                             (8,1,1)  (7,4,1)
                                      (8,2,2)
                                      (8,3,1)
                                      (9,2,1)
                                      (10,1,1)
(End)
		

References

  • 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

Cf. A000290, A007590 (= R_n(2,4)), A002620 (= R_n(1,2)), A118015, A056827, A118013.
Cf. A033436 (= R_n(1,4) = R_n(3,4)), A033437 (= R_n(1,5) = R_n(4,5)), A033438 (= R_n(1,6) = R_n(5,6)), A033439 (= R_n(1,7) = R_n(6,7)), A033440, A033441, A033442, A033443, A033444.
Cf. A001353 and A004523 (first differences). A184535 (= R_n(2,5) = R_n(3,5)).
Cf. A238738. - Bruno Berselli, Apr 17 2015
Cf. A005408.
A000217(n-2) counts 3-part compositions.
A014612 ranks 3-part partitions, with strict case A007304.
A069905 counts the 3-part partitions.
A211540 counts strict 3-part partitions.
A337453 ranks strict 3-part compositions.
A001399(n-6)*4 is the strict version.
A001523 counts unimodal compositions, with strict case A072706.
A001840(n-4) is the non-unimodal version.
A001399(n-6)*2 is the strict non-unimodal version.
A007052 counts unimodal patterns.
A115981 counts non-unimodal compositions, ranked by A335373.
A011782 counts unimodal permutations.
A335373 is the complement of a ranking sequence for unimodal compositions.
A337459 ranks these compositions, with complement A337460.

Programs

  • Magma
    [Floor(n^2 / 3): n in [0..50]]; // Vincenzo Librandi, May 08 2011
    
  • Maple
    A000212:=(-1+z-2*z**2+z**3-2*z**4+z**5)/(z**2+z+1)/(z-1)**3; # Conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence with an additional leading 1.
    A000212 := proc(n) option remember; `if`(n<4, [0,0,1,3][n+1], a(n-1)+a(n-3) -a(n-4)+2) end; # Peter Luschny, Nov 20 2011
  • Mathematica
    Table[Quotient[n^2, 3], {n, 0, 59}] (* Michael Somos, Jan 22 2014 *)
  • PARI
    {a(n) = n^2 \ 3}; /* Michael Somos, Sep 25 2006 */
    
  • Python
    def A000212(n): return n**2//3 # Chai Wah Wu, Jun 07 2022

Formula

G.f.: x^2*(1+x)/((1-x)^2*(1-x^3)). - Franklin T. Adams-Watters, Apr 01 2002
Euler transform of length 3 sequence [ 3, -1, 1]. - Michael Somos, Sep 25 2006
G.f.: x^2 * (1 - x^2) / ((1 - x)^3 * (1 - x^3)). a(-n) = a(n). - Michael Somos, Sep 25 2006
a(n) = Sum_{k = 0..n} A011655(k)*(n-k). - Reinhard Zumkeller, Nov 30 2009
a(n) = a(n-1) + a(n-3) - a(n-4) + 2 for n >= 4. - Alexander Burstein, Nov 20 2011
a(n) = a(n-3) + A005408(n-2) for n >= 3. - Alexander Burstein, Feb 15 2013
a(n) = (n-1)^2 - a(n-1) - a(n-2) for n >= 2. - Richard R. Forberg, Jun 05 2013
Sum_{n >= 2} 1/a(n) = (27 + 6*sqrt(3)*Pi + 2*Pi^2)/36. - Enrique Pérez Herrero, Jun 29 2013
0 = a(n)*(a(n+2) + a(n+3)) + a(n+1)*(-2*a(n+2) - a(n+3) + a(n+4)) + a(n+2)*(a(n+2) - 2*a(n+3) + a(n+4)) for all n in Z. - Michael Somos, Jan 22 2014
a(n) = Sum_{k = 1..n} k^2*A049347(n+2-k). - Mircea Merca, Feb 04 2014
a(n) = Sum_{i = 1..n+1} (ceiling(i/3) + floor(i/3) - 1). - Wesley Ivan Hurt, Jun 06 2014
a(n) = Sum_{j = 1..n} Sum_{i=1..n} ceiling((i+j-n-1)/3). - Wesley Ivan Hurt, Mar 12 2015
a(n) = Sum_{i = 1..n} floor(2*i/3). - Wesley Ivan Hurt, May 22 2017
a(-n) = a(n). - Paul Curtz, Jan 19 2020
a(n) = A001399(2*n - 3). - Gus Wiseman, Oct 07 2020
a(n) = (1/6)*(2*n^2 - 3 + gcd(n,3)). - Ridouane Oudra, Apr 15 2021
E.g.f.: (exp(x)*(-2 + 3*x*(1 + x)) + 2*exp(-x/2)*cos(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 24 2022
Sum_{n>=2} (-1)^n/a(n) = Pi/sqrt(3) - Pi^2/36 - 3/4. - Amiram Eldar, Dec 02 2022

Extensions

Edited by Charles R Greathouse IV, Apr 19 2010

A001522 Number of n-stacks with strictly receding walls, or the number of Type A partitions of n in the sense of Auluck (1951).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 7, 10, 14, 19, 26, 35, 47, 62, 82, 107, 139, 179, 230, 293, 372, 470, 591, 740, 924, 1148, 1422, 1756, 2161, 2651, 3244, 3957, 4815, 5844, 7075, 8545, 10299, 12383, 14859, 17794, 21267, 25368, 30207, 35902, 42600, 50462, 59678, 70465, 83079, 97800, 114967, 134956, 158205, 185209, 216546, 252859
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n with positive crank (n>=2), cf. A064391. - Vladeta Jovovic, Sep 30 2001
Number of smooth weakly unimodal compositions of n into positive parts such that the first and last part are 1 (smooth means that successive parts differ by at most one), see example. Dropping the requirement for unimodality gives A186085. - Joerg Arndt, Dec 09 2012
Number of weakly unimodal compositions of n where the maximal part m appears at least m times, see example. - Joerg Arndt, Jun 11 2013
Also weakly unimodal compositions of n with first part 1, maximal up-step 1, and no consecutive up-steps; see example. The smooth weakly unimodal compositions are recovered by shifting all rows above the bottom row to the left by one position with respect to the next lower row. - Joerg Arndt, Mar 30 2014
It would seem from Stanley that he regards a(0)=0 for this sequence and A001523. - Michael Somos, Feb 22 2015
From Gus Wiseman, Mar 30 2021: (Start)
Also the number of odd-length compositions of n with alternating parts strictly decreasing. These are finite odd-length sequences q of positive integers summing to n such that q(i) > q(i+2) for all possible i. The even-length version is A064428. For example, the a(1) = 1 through a(9) = 14 compositions are:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(211) (221) (231) (241) (251) (261)
(311) (312) (322) (332) (342)
(321) (331) (341) (351)
(411) (412) (413) (423)
(421) (422) (432)
(511) (431) (441)
(512) (513)
(521) (522)
(611) (531)
(612)
(621)
(711)
(32211)
(End)
In the Ferrers diagram of a partition x of n, count the dots in each diagonal parallel to the main diagonal (starting at the top-right, say). The result diag(x) is a smooth weakly unimodal composition of n into positive parts such that the first and last part are 1. For example, diag(5541) = 11233221. The function diag is many-to-one; the size of its codomain as a set is a(n). If diag(x) = diag(y), each hook of x can be slid by the same amount past the main diagonal to get y. For example, diag(5541) = diag(44331). - George Beck, Sep 26 2021
From Gus Wiseman, May 23 2022: (Start)
Conjecture: Also the number of integer partitions y of n with a fixed point y(i) = i. These partitions are ranked by A352827. The conjecture is stated at A238395, but Resta tells me he may not have had a proof. The a(1) = 1 through a(8) = 10 partitions are:
(1) (11) (111) (22) (32) (42) (52) (62)
(1111) (221) (222) (322) (422)
(11111) (321) (421) (521)
(2211) (2221) (2222)
(111111) (3211) (3221)
(22111) (4211)
(1111111) (22211)
(32111)
(221111)
(11111111)
Note that these are not the same partitions (compare A352827 to A352874), only the same count (apparently).
(End)
The above conjecture is true. See Section 4 of the Blecher-Knopfmacher paper in the Links section. - Jeremy Lovejoy, Sep 26 2022

Examples

			For a(6)=5 we have the following stacks:
.x... ..x.. ...x. .xx.
xxxxx xxxxx xxxxx xxxx xxxxxx
.
From _Joerg Arndt_, Dec 09 2012: (Start)
There are a(9) = 14 smooth weakly unimodal compositions of 9:
01:   [ 1 1 1 1 1 1 1 1 1 ]
02:   [ 1 1 1 1 1 1 2 1 ]
03:   [ 1 1 1 1 1 2 1 1 ]
04:   [ 1 1 1 1 2 1 1 1 ]
05:   [ 1 1 1 1 2 2 1 ]
06:   [ 1 1 1 2 1 1 1 1 ]
07:   [ 1 1 1 2 2 1 1 ]
08:   [ 1 1 2 1 1 1 1 1 ]
09:   [ 1 1 2 2 1 1 1 ]
10:   [ 1 1 2 2 2 1 ]
11:   [ 1 2 1 1 1 1 1 1 ]
12:   [ 1 2 2 1 1 1 1 ]
13:   [ 1 2 2 2 1 1 ]
14:   [ 1 2 3 2 1 ]
(End)
From _Joerg Arndt_, Jun 11 2013: (Start)
There are a(9) = 14 weakly unimodal compositions of 9 where the maximal part m appears at least m times:
01:  [ 1 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 2 2 ]
03:  [ 1 1 1 1 2 2 1 ]
04:  [ 1 1 1 2 2 1 1 ]
05:  [ 1 1 1 2 2 2 ]
06:  [ 1 1 2 2 1 1 1 ]
07:  [ 1 1 2 2 2 1 ]
08:  [ 1 2 2 1 1 1 1 ]
09:  [ 1 2 2 2 1 1 ]
10:  [ 1 2 2 2 2 ]
11:  [ 2 2 1 1 1 1 1 ]
12:  [ 2 2 2 1 1 1 ]
13:  [ 2 2 2 2 1 ]
14:  [ 3 3 3 ]
(End)
From _Joerg Arndt_, Mar 30 2014: (Start)
There are a(9) = 14 compositions of 9 with first part 1, maximal up-step 1, and no consecutive up-steps:
01:  [ 1 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 1 1 2 ]
03:  [ 1 1 1 1 1 1 2 1 ]
04:  [ 1 1 1 1 1 2 1 1 ]
05:  [ 1 1 1 1 1 2 2 ]
06:  [ 1 1 1 1 2 1 1 1 ]
07:  [ 1 1 1 1 2 2 1 ]
08:  [ 1 1 1 2 1 1 1 1 ]
09:  [ 1 1 1 2 2 1 1 ]
10:  [ 1 1 1 2 2 2 ]
11:  [ 1 1 2 1 1 1 1 1 ]
12:  [ 1 1 2 2 1 1 1 ]
13:  [ 1 1 2 2 2 1 ]
14:  [ 1 1 2 2 3 ]
(End)
G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 5*x^6 + 7*x^7 + 10*x^8 + 14*x^9 + ...
		

References

  • G. E. Andrews, The reasonable and unreasonable effectiveness of number theory in statistical mechanics, pp. 21-34 of S. A. Burr, ed., The Unreasonable Effectiveness of Number Theory, Proc. Sympos. Appl. Math., 46 (1992). Amer. Math. Soc.
  • G. E. Andrews, Three-quadrant Ferrers graphs, Indian J. Math., 42 (No. 1, 2000), 1-7.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see section 2.5 on page 76.

Crossrefs

A version for permutations is A002467, complement A000166.
The case of zero crank is A064410, ranked by A342192.
The case of nonnegative crank is A064428, ranked by A352873.
A strict version is A352829, complement A352828.
Conjectured to be column k = 1 of A352833.
These partitions (positive crank) are ranked by A352874.
A000700 counts self-conjugate partitions, ranked by A088902.
A064391 counts partitions by crank.
A115720 and A115994 count partitions by their Durfee square.
A257989 gives the crank of the partition with Heinz number n.
Counting compositions: A003242, A114921, A238351, A342527, A342528, A342532.
Fixed points of reversed partitions: A238352, A238394, A238395, A352822, A352830, A352872.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n<=0, `if`(i=1, 1, 0),
          `if`(n<0 or i<1, 0, b(n-i, i, t)+b(n-(i-1), i-1, false)+
          `if`(t, b(n-(i+1), i+1, t), 0)))
        end:
    a:= n-> b(n-1, 1, true):
    seq(a(n), n=0..70);  # Alois P. Heinz, Feb 26 2014
    # second Maple program:
    A001522 := proc(n)
        local r,a;
        a := 0 ;
        if n = 0 then
            return 1 ;
        end if;
        for r from 1 do
            if r*(r+1) > 2*n then
                return a;
            else
                a := a-(-1)^r*combinat[numbpart](n-r*(r+1)/2) ;
            end if;
        end do:
    end proc: # R. J. Mathar, Mar 07 2015
  • Mathematica
    max = 50; f[x_] := 1 + Sum[-(-1)^k*x^(k*(k+1)/2), {k, 1, max}] / Product[(1-x^k), {k, 1, max}]; CoefficientList[ Series[ f[x], {x, 0, max}], x] (* Jean-François Alcover, Dec 27 2011, after g.f. *)
    b[n_, i_, t_] := b[n, i, t] = If[n <= 0, If[i == 1, 1, 0], If[n<0 || i<1, 0, b[n-i, i, t] + b[n - (i-1), i-1, False] + If[t, b[n - (i+1), i+1, t], 0]]]; a[n_] := b[n-1, 1, True]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Dec 01 2015, after Alois P. Heinz *)
    Flatten[{1, Table[Sum[(-1)^(j-1)*PartitionsP[n-j*((j+1)/2)], {j, 1, Floor[(Sqrt[8*n + 1] - 1)/2]}], {n, 1, 60}]}] (* Vaclav Kotesovec, Sep 26 2016 *)
    ici[q_]:=And@@Table[q[[i]]>q[[i+2]],{i,Length[q]-2}];
    Table[If[n==0,1,Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],OddQ@*Length],ici]]],{n,0,15}] (* Gus Wiseman, Mar 30 2021 *)
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( sum(k=1, (sqrt(1+8*n) - 1)\2, -(-1)^k * x^((k + k^2)/2)) / eta(x + x * O(x^n)), n))}; /* Michael Somos, Jul 22 2003 */
    
  • PARI
    N=66; q='q+O('q^N);
    Vec( 1 + sum(n=1, N, q^(n^2)/(prod(k=1,n-1,1-q^k)^2*(1-q^n)) ) ) \\ Joerg Arndt, Dec 09 2012
    
  • Sage
    def A001522(n):
        if n < 4: return 1
        return (number_of_partitions(n) - [p.crank() for p in Partitions(n)].count(0))/2
    [A001522(n) for n in range(30)]  # Peter Luschny, Sep 15 2014

Formula

a(n) = (A000041(n) - A064410(n)) / 2 for n>=2.
G.f.: 1 + ( Sum_{k>=1} -(-1)^k * x^(k*(k+1)/2) ) / ( Product_{k>=1} 1-x^k ).
G.f.: 1 + ( Sum_{n>=1} q^(n^2) / ( ( Product_{k=1..n-1} 1-q^k )^2 * (1-q^n) ) ). - Joerg Arndt, Dec 09 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n) [Auluck, 1951]. - Vaclav Kotesovec, Sep 26 2016
a(n) = A000041(n) - A064428(n). - Gus Wiseman, Mar 30 2021
a(n) = A064428(n) - A064410(n). - Gus Wiseman, May 23 2022

Extensions

a(0) changed from 0 to 1 by Joerg Arndt, Mar 30 2014
Edited definition. - N. J. A. Sloane, Mar 31 2021

A006330 Number of corners, or planar partitions of n with only one row and one column.

Original entry on oeis.org

1, 1, 3, 6, 12, 21, 38, 63, 106, 170, 272, 422, 653, 986, 1482, 2191, 3218, 4666, 6726, 9592, 13602, 19122, 26733, 37102, 51232, 70292, 95989, 130356, 176246, 237120, 317724, 423840, 563266, 745562, 983384, 1292333, 1692790, 2209886, 2876132
Offset: 0

Views

Author

Keywords

Comments

The first four terms a(0), a(1), a(2), a(3) agree with sequence A000219 for unrestricted planar partitions, since the restriction does not rule anything out. For a(4) there is just one planar partition which doesn't satisfy the restriction, four 1's arranged in a square. So A000219 has fifth term 13 and here we have 12.
a(n) + A001523(n) = A000712(n). - Michael Somos, Jul 22 2003
Number of unimodal compositions of n+1 where the maximal part appears once, see example. [Joerg Arndt, Jun 11 2013]

Examples

			From _Joerg Arndt_, Jun 11 2013: (Start)
There are a(4)=12 unimodal compositions of 4+1=5 where the maximal part appears once:
01:  [ 1 1 1 2 ]
02:  [ 1 1 2 1 ]
03:  [ 1 1 3 ]
04:  [ 1 2 1 1 ]
05:  [ 1 3 1 ]
06:  [ 1 4 ]
07:  [ 2 1 1 1 ]
08:  [ 2 3 ]
09:  [ 3 1 1 ]
10:  [ 3 2 ]
11:  [ 4 1 ]
12:  [ 5 ]
(End)
G.f. = 1 + x + 3*x^2 + 6*x^3 + 12*x^4 + 21*x^5 + 38*x^6 + 63*x^7 + 106*x^8 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, 1999; see page 77.

Crossrefs

Column k=1 of A247255.
Row sums of A259100.

Programs

  • Mathematica
    a[0] = 1; a[n_] := SeriesCoefficient[ Sum[x^k/Product[1 - x^i, {i, 1, k}]^2, {k, 1, n}] + 1, {x, 0, n}]; Array[a, 39, 0] (* Jean-François Alcover, Mar 13 2014 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=1, n, x^k / prod(i=1, k, 1 - x^i, 1 + x*O(x^n))^2, 1), n))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, (sqrtint(1 + 8*n) - 1)\2, (-1)^k * x^((k + k^2)/2)) / eta(x + x*O(x^n))^2, n))};

Formula

G.f.: 1+Sum_{k>0} x^k/(Product_{i=1..k} (1-x^i))^2.
G.f.: (Sum_{k>=0} (-1)^k * x^(k(k+1)/2)) / (Product_{k>0} 1 - x^k)^2. - Michael Somos, Jul 28 2003
Convolution product of A197870 and A000712. - Michael Somos, Feb 22 2015
a(n) ~ exp(2*Pi*sqrt(n/3)) / (8 * 3^(3/4) * n^(5/4)) [Auluck, 1951]. - Vaclav Kotesovec, Jun 22 2015

Extensions

Edited and extended by Moshe Shmuel Newman, Jun 10 2003
Showing 1-10 of 114 results. Next