A293136
Irregular triangle T(n,k) read by rows: T(n,k) is the number of strongly unimodal compositions of n (A059618) into k parts.
Original entry on oeis.org
1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 1, 0, 1, 4, 1, 0, 1, 4, 5, 0, 1, 6, 6, 2, 0, 1, 6, 10, 4, 0, 1, 8, 14, 6, 1, 0, 1, 8, 19, 14, 1, 0, 1, 10, 23, 20, 5, 0, 1, 10, 31, 30, 10, 0, 1, 12, 36, 42, 18, 2, 0, 1, 12, 44, 60, 27, 4, 0, 1, 14, 52, 76, 48, 8, 0, 1, 14, 61, 102, 68, 16, 1, 0, 1, 16, 69, 126, 101, 30, 1, 0, 1, 16, 81, 160, 138, 50, 5, 0
Offset: 0
Triangle starts:
00: [1]
01: [0, 1]
02: [0, 1]
03: [0, 1, 2]
04: [0, 1, 2, 1]
05: [0, 1, 4, 1]
06: [0, 1, 4, 5]
07: [0, 1, 6, 6, 2]
08: [0, 1, 6, 10, 4]
09: [0, 1, 8, 14, 6, 1]
10: [0, 1, 8, 19, 14, 1]
11: [0, 1, 10, 23, 20, 5]
12: [0, 1, 10, 31, 30, 10]
13: [0, 1, 12, 36, 42, 18, 2]
14: [0, 1, 12, 44, 60, 27, 4]
15: [0, 1, 14, 52, 76, 48, 8]
16: [0, 1, 14, 61, 102, 68, 16, 1]
17: [0, 1, 16, 69, 126, 101, 30, 1]
18: [0, 1, 16, 81, 160, 138, 50, 5]
19: [0, 1, 18, 90, 194, 191, 80, 10]
20: [0, 1, 18, 102, 238, 252, 118, 22]
...
Row n=7 is [0, 1, 6, 6, 2] because in the 15 partitions of 7 there is 0 into zero parts, 1 into one part, 6 into two parts, 6 into three parts, and 2 into four parts:
[ 1] [ 1 2 3 1 ]
[ 2] [ 1 2 4 ]
[ 3] [ 1 3 2 1 ]
[ 4] [ 1 4 2 ]
[ 5] [ 1 5 1 ]
[ 6] [ 1 6 ]
[ 7] [ 2 3 2 ]
[ 8] [ 2 4 1 ]
[ 9] [ 2 5 ]
[10] [ 3 4 ]
[11] [ 4 2 1 ]
[12] [ 4 3 ]
[13] [ 5 2 ]
[14] [ 6 1 ]
[15] [ 7 ]
Cf.
A072704 (same for weakly unimodal compositions).
-
N=25; x='x+O('x^N);
T=Vec(1 + sum(n=1, N, t*x^(n) * prod(k=1, n-1, 1+t*x^k)^2));
for(r=1,#T, print(Vecrev(T[r])) ); \\ as triangle
A001523
Number of stacks, or planar partitions of n; also weakly unimodal compositions of n.
Original entry on oeis.org
1, 1, 2, 4, 8, 15, 27, 47, 79, 130, 209, 330, 512, 784, 1183, 1765, 2604, 3804, 5504, 7898, 11240, 15880, 22277, 31048, 43003, 59220, 81098, 110484, 149769, 202070, 271404, 362974, 483439, 641368, 847681, 1116325, 1464999, 1916184, 2498258, 3247088, 4207764
Offset: 0
For a(4)=8 we have the following stacks:
x
x x. .x
x x. .x x.. .x. ..x xx
x xx xx xxx xxx xxx xx xxxx
G.f. = 1 + x + 2*x^2 + 4*x^3 + 8*x^4 + 15*x^5 + 27*x^6 + 47*x^7 + 79*x^8 + ...
From _Gus Wiseman_, Mar 04 2020: (Start)
The a(1) = 1 through a(5) = 15 unimodal compositions:
(1) (2) (3) (4) (5)
(11) (12) (13) (14)
(21) (22) (23)
(111) (31) (32)
(112) (41)
(121) (113)
(211) (122)
(1111) (131)
(221)
(311)
(1112)
(1121)
(1211)
(2111)
(11111)
(End)
- 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.
- Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1001 terms from T. D. Noe)
- F. C. Auluck, On some new types of partitions associated with generalized Ferrers graphs, Proc. Cambridge Philos. Soc. 47, (1951), 679-686, g(x).
- F. C. Auluck, On some new types of partitions associated with generalized Ferrers graphs (annotated scanned copy)
- H. Bottomley, Illustration of initial terms
- Shouvik Datta, Matthias R. Gaberdiel, Wei Li, and Cheng Peng, Twisted sectors from plane partitions, arXiv preprint arXiv:1606.07070 [hep-th], 2016. See Sect. 2.1.
- Sergi Elizalde, Symmetric peaks and symmetric valleys in Dyck paths, arXiv:2008.05669 [math.CO], 2020.
- Sergi Elizalde and Emeric Deutsch, The degree of asymmetry of a sequence, Enum. Combinat. Applic. 2 (2022) no 1 #S2R7, U(1,z).
- Philippe Flajolet and Robert Sedgewick, Analytic Combinatorics, 2009; see page 46.
- Rigoberto Flórez, José L. Ramírez, and Diego Villamizar, Restricted bargraphs and unimodal compositions, J. Comb. Theory, Series A, (2024) Vol. 208, Art. No. 105934.
- R. C. Rhoades, Strongly Unimodal Sequences and Mixed Mock Modular Forms
- Alan D. Sokal, The leading root of the partial theta function, arXiv preprint arXiv:1106.1003 [math.CO], 2011.
- Eric Weisstein's World of Mathematics, Unimodal Sequence
- E. M. Wright, Stacks, III, Quart. J. Math. Oxford, 23 (1972), 153-158.
The complement is counted by
A115981.
The case covering an initial interval is
A227038.
The version whose negation is unimodal as well appears to be
A329398.
Unimodal sequences covering an initial interval are
A007052.
Non-unimodal permutations are
A059204.
Non-unimodal sequences covering an initial interval are
A328509.
Partitions with unimodal run-lengths are
A332280.
Numbers whose prime signature is not unimodal are
A332282.
Partitions whose 0-appended first differences are unimodal are
A332283.
The number of unimodal permutations of the prime indices of n is
A332288.
Compositions whose negation is unimodal are
A332578.
Compositions whose run-lengths are unimodal are
A332726.
-
m:=100;
R:=PowerSeriesRing(Integers(), m);
Coefficients(R!( 1 + (&+[ x^n*(1-x^n)/(&*[(1-x^j)^2: j in [1..n]]): n in [1..m+2]]) )); // G. C. Greubel, Apr 03 2023
-
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(n, 1)):
seq(a(n), n=0..60); # Alois P. Heinz, Mar 26 2014
-
max = 40; s = 1 + Sum[(-1)^(k + 1)*q^(k*(k + 1)/2), {k, 1, max}] / QPochhammer[q]^2 + O[q]^max; CoefficientList[s, q] (* Jean-François Alcover, Jan 25 2012, updated Nov 29 2015 *)
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[n, 1]]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 24 2015, after Alois P. Heinz *)
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 04 2020 *)
-
{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))^2 ,n))}; /* Michael Somos, Jul 22 2003 */
-
def b(n, i):
if i>n: return 0
if n%i==0: x=1
else: x=0
return x + sum([b(n - i*j, i + 1)*(j + 1) for j in range(n//i + 1)])
def a(n): return 1 if n==0 else b(n, 1) # Indranil Ghosh, Jun 09 2017, after Maple code by Alois P. Heinz
A072706
Number of unimodal partitions/compositions of n into distinct terms.
Original entry on oeis.org
1, 1, 1, 3, 3, 5, 9, 11, 15, 21, 33, 39, 55, 69, 93, 127, 159, 201, 261, 327, 411, 537, 653, 819, 1011, 1257, 1529, 1899, 2331, 2829, 3441, 4179, 5031, 6093, 7305, 8767, 10575, 12573, 14997, 17847, 21223, 25089, 29757, 35055, 41379, 48801, 57285, 67131
Offset: 0
a(6)=9 since 6 can be written as 1+2+3, 1+3+2, 1+5, 2+3+1, 2+4, 3+2+1, 4+2, 5+1, or 6, but not for example 1+4+1 (which does not have distinct terms) nor 2+1+3 (which is not unimodal).
From _Joerg Arndt_, Mar 25 2014: (Start)
The a(10) = 33 such compositions of 10 are:
01: [ 1 2 3 4 ]
02: [ 1 2 4 3 ]
03: [ 1 2 7 ]
04: [ 1 3 4 2 ]
05: [ 1 3 6 ]
06: [ 1 4 3 2 ]
07: [ 1 4 5 ]
08: [ 1 5 4 ]
09: [ 1 6 3 ]
10: [ 1 7 2 ]
11: [ 1 9 ]
12: [ 2 3 4 1 ]
13: [ 2 3 5 ]
14: [ 2 4 3 1 ]
15: [ 2 5 3 ]
16: [ 2 7 1 ]
17: [ 2 8 ]
18: [ 3 4 2 1 ]
19: [ 3 5 2 ]
20: [ 3 6 1 ]
21: [ 3 7 ]
22: [ 4 3 2 1 ]
23: [ 4 5 1 ]
24: [ 4 6 ]
25: [ 5 3 2 ]
26: [ 5 4 1 ]
27: [ 6 3 1 ]
28: [ 6 4 ]
29: [ 7 2 1 ]
30: [ 7 3 ]
31: [ 8 2 ]
32: [ 9 1 ]
33: [ 10 ]
(End)
-
b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`(n=0, 1,
expand(b(n, i-1) +`if`(i>n, 0, x*b(n-i, i-1)))))
end:
a:= n->(p->add(coeff(p, x, i)*ceil(2^(i-1)), i=0..degree(p)))(b(n$2)):
seq(a(n), n=0..100); # Alois P. Heinz, Mar 25 2014
-
b[n_, i_] := b[n, i] = If[n > i*(i + 1)/2, 0, If[n == 0, 1, Expand[b[n, i - 1] + If[i > n, 0, x*b[n - i, i - 1]]]]]; a[n_] := Function[{p}, Sum[Coefficient[p, x, i]*Ceiling[2^(i - 1)], {i, 0, Exponent[p, x]}]][b[n, n]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jan 16 2015, after Alois P. Heinz *)
Table[If[n==0,1,Sum[2^(Length[ptn]-1),{ptn,Select[IntegerPartitions[n],UnsameQ@@#&]}]],{n,0,15}] (* Gus Wiseman, Dec 31 2019 *)
-
N=66; q='q+O('q^N); Vec( 1 + sum(n=1, N, 2^(n-1)*q^(n*(n+1)/2) / prod(k=1, n, 1-q^k ) ) ) \\ Joerg Arndt, Mar 25 2014
A195012
Sum of positive cranks minus the sum of positive ranks of all partitions of n.
Original entry on oeis.org
1, 1, 1, 2, 2, 4, 5, 7, 10, 13, 17, 24, 31, 40, 53, 69, 88, 113, 144, 183, 231, 290, 362, 453, 563, 696, 859, 1058, 1296, 1587, 1935, 2354, 2856, 3458, 4175, 5033, 6051, 7259, 8692, 10390, 12391, 14756, 17537, 20808, 24648, 29151, 34417, 40581, 47773, 56158
Offset: 1
For n = 6 we have:
------------------------------------------------
Partitions
of 6 Crank Rank
------------------------------------------------
6 6 6 - 1 = 5
3+3 3 3 - 2 = 1
4+2 4 4 - 2 = 2
2+2+2 2 2 - 3 = -1
5+1 1 - 1 = 0 5 - 2 = 3
3+2+1 2 - 1 = 1 3 - 3 = 0
4+1+1 1 - 2 = -1 4 - 3 = 1
2+2+1+1 0 - 2 = -2 2 - 4 = -2
3+1+1+1 0 - 3 = -3 3 - 4 = -1
2+1+1+1+1 0 - 4 = -4 2 - 5 = -3
1+1+1+1+1+1 0 - 6 = -6 1 - 6 = -5
------------------------------------------------
The sum of positive cranks is 6+3+4+2+1 = 16 and the sum of positive ranks is 5+1+2+3+1 = 12 therefore a(6) = 16 - 12 = 4.
- G. E. Andrews, S. H. G. Chan, and B. Kim, The odd moments of ranks and cranks (This is the function C_1 - R_1 of that paper), Journal of Combinatorial Theory, Series A, Volume 120, Issue 1, January 2013, Pages 77-91.
- G. E. Andrews, F. G. Garvan, and J. Liang, Combinatorial interpretation of congruences for the spt-function, The Ramanujan Journal, December 2012, Volume 29, Issue 1-3, pp 321-338.
- A. O. L. Atkin and F. G. Garvan, Relations between the ranks and cranks of partitions, arXiv:math/0208050 [math.NT], 2002.
- K. Bringmann, C. Jennings-Shaffer, K. Mahlburg, and R. Rhoades, Peak positions of strongly unimodal sequences, Trans. Amer. Math. Soc. 372 (2019), 7087-7109.
- Frank Garvan, Dyson's rank function and Andrews's SPT-function [Broken link?]
- K. Hikami and J. Lovejoy, Torus knots and quantum modular forms, Res. Math. Sci. 2, Article 2 (2015).
-
# Based on Theorem 1 of Andrews-Chan-Kim:
M:=101;
qinf:=mul(1-q^i,i=1..M);
qinf:=series(qinf,q,M);
C1:=add((-1)^(n+1)*q^(n*(n+1)/2)/(1-q^n),n=1..M);
C1:=series(C1/qinf,q,M);
R1:=add((-1)^(n+1)*q^(n*(3*n+1)/2)/(1-q^n),n=1..M);
R1:=series(R1/qinf,q,M);
series(C1-R1,q,M);
seriestolist(%); # N. J. A. Sloane, Sep 04 2012
-
M = 101;
qinf = Product[1-q^i, {i, 1, M}];
qinf = Series[qinf, {q, 0, M}];
C1 = Sum[(-1)^(n+1) q^(n(n+1)/2)/(1-q^n), {n, 1, M}];
C1 = Series[C1/qinf, {q, 0, M}];
R1 = Sum[(-1)^(n+1) q^(n(3n+1)/2)/(1-q^n), {n, 1, M}];
R1 = Series[R1/qinf, {q, 0, M}];
CoefficientList[Series[C1-R1, {q, 0, M}], q] // Rest (* Jean-François Alcover, Aug 18 2018, translated from Maple *)
New name, example and more terms from
Omar E. Pol, Apr 06 2012
A238872
Number of strongly unimodal compositions of n with absolute difference of successive parts = 1.
Original entry on oeis.org
1, 1, 1, 3, 2, 3, 3, 4, 3, 6, 4, 3, 5, 6, 4, 9, 5, 3, 7, 7, 5, 9, 6, 6, 8, 9, 5, 9, 8, 6, 10, 6, 5, 15, 8, 9, 10, 7, 7, 12, 10, 3, 11, 15, 7, 15, 8, 6, 13, 12, 9, 12, 9, 9, 14, 12, 7, 15, 12, 6, 15, 13, 6, 21, 12, 12, 13, 6, 11, 15, 15, 9, 14, 12, 8, 24, 10, 9
Offset: 0
The a(33) = 15 such compositions of 33 are:
01: [ 1 2 3 4 5 6 5 4 3 ]
02: [ 2 3 4 5 6 7 6 ]
03: [ 3 4 5 6 5 4 3 2 1 ]
04: [ 3 4 5 6 7 8 ]
05: [ 4 5 6 7 6 5 ]
06: [ 5 6 7 6 5 4 ]
07: [ 5 6 7 8 7 ]
08: [ 6 7 6 5 4 3 2 ]
09: [ 7 8 7 6 5 ]
10: [ 8 7 6 5 4 3 ]
11: [ 10 11 12 ]
12: [ 12 11 10 ]
13: [ 16 17 ]
14: [ 17 16 ]
15: [ 33 ]
G.f. = 1 + x + x^2 + 3*x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 3*x^8 + 6*x^9 + ...
-
a[ n_] := If[ n < 1, Boole[n == 0], If[ OddQ[n], 1, 1/3] Length @ FindInstance[ {x >= 0, y >= 0, z >= 0, x y + y z + z x + x + y + z + 1 == n}, {x, y, z}, Integers, 10^9]]; (* Michael Somos, Jul 04 2015 *)
a[ n_] := If[ n < 1, Boole[n == 0], Length @ FindInstance[ {1 <= y <= n, 1 <= x <= y, 1 <= z <= y, y^2 + (x - x^2 + z - z^2) / 2 == n}, {x, y, z}, Integers, 10^9]]; (* Michael Somos, Jul 04 2015 *)
-
\\ generate the compositions
a(n)=
{
if ( n==0, return(1) );
my( ret=0 );
my( as, ts );
for (f=1, n, \\ first part
as = 0;
for (p=f, n, \\ numper of parts in rising half
as += p; \\ ascending sum
if ( as > n, break() );
if ( as == n, ret+=1; break() );
ts = as; \\ total sum
forstep (q=p-1, 1, -1,
ts += q; \\ descending sum
if ( ts > n, break() );
if ( ts == n, ret+=1; break() );
);
);
);
return( ret );
}
v=vector(100,n,a(n-1))
A275389
Number of set partitions of [n] with a strongly unimodal block size list.
Original entry on oeis.org
1, 1, 1, 4, 7, 19, 71, 219, 759, 2697, 12395, 47477, 231950, 1040116, 4851742, 26690821, 131478031, 736418510, 4262619682, 24680045903, 145629814329, 935900941506, 5778263418232, 37626913475878, 257550263109475, 1782180357952449, 12526035635331581
Offset: 0
a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 7: 1234, 123|4, 124|3, 134|2, 1|234, 1|23|4, 1|24|3.
a(5) = 19: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 1|234|5, 1|235|4, 1|245|3.
-
b:= proc(n, i, t) option remember; `if`(t=0 and n>i*(i-1)/2, 0,
`if`(n=0, 1, add(b(n-j, j, 0)*binomial(n-1, j-1), j=1..min(n, i-1))
+`if`(t=1, add(b(n-j, j, 1)*binomial(n-1, j-1), j=i+1..n), 0)))
end:
a:= n-> b(n, 0, 1):
seq(a(n), n=0..30);
-
b[n_, i_, t_] := b[n, i, t] = If[t==0 && n > i*(i-1)/2, 0, If[n==0, 1, Sum[b[n-j, j, 0]*Binomial[n-1, j-1], {j, 1, Min[n, i-1]}] + If[t==1, Sum[b[n-j, j, 1]*Binomial[n-1, j-1], {j, i+1, n}], 0]]]; a[n_] := b[n, 0, 1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 07 2017, translated from Maple *)
A059619
As upper right triangle, number of strongly unimodal partitions of n (strongly unimodal means strictly increasing then strictly decreasing) where initial part is k.
Original entry on oeis.org
1, 1, 1, 1, 0, 1, 3, 1, 1, 1, 4, 2, 0, 1, 1, 6, 2, 1, 1, 1, 1, 10, 4, 2, 1, 1, 1, 1, 15, 6, 3, 1, 2, 1, 1, 1, 21, 9, 4, 2, 1, 2, 1, 1, 1, 30, 12, 6, 3, 2, 2, 2, 1, 1, 1, 43, 18, 8, 5, 3, 2, 2, 2, 1, 1, 1, 59, 25, 12, 6, 3, 3, 3, 2, 2, 1, 1, 1, 82, 34, 17, 9, 5, 4, 3, 3, 2, 2, 1, 1, 1, 111, 48, 22, 12
Offset: 0
Rows start:
1, 1, 1, 3, 4, 6, 10, 15, 21, 30, 43, 59, 82, 111, ...
1, 0, 1, 2, 2, 4, 6, 9, 12, 18, 25, 34, 48, ...
1, 1, 0, 1, 2, 3, 4, 6, 8, 12, 17, 22, ...
1, 1, 1, 1, 1, 2, 3, 5, 6, 9, 12, ...
1, 1, 1, 2, 1, 2, 3, 3, 5, ...
1, 1, 1, 2, 2, 2, 3, 4, ...
1, 1, 1, 2, 2, 3, 3, ...
1, 1, 1, 2, 2, 3, ...
1, 1, 1, 2, 2, ...
1, 1, 1, 2, ...
1, 1, 1, ...
1, 1, ...
1, ... etc.
T(16,6)=8 since 16 can be written as 6+10, 6+9+1, 6+8+2, 6+7+3, 6+7+2+1, 6+5+4+1, 6+5+3+2, or 6+4+3+2+1 (but for example neither 6+6+4 nor 6+8+1+1 which are only weakly unimodal).
-
s[n_?Positive, k_] := s[n, k] = Sum[s[n-k, j], {j, 0, k-1}]; s[0, 0] = 1; s[0, ] = 0; s[?Negative, ] = 0; t[n, k_] := t[n, k] = s[n, k] + Sum[t[n-k, j], {j, k+1, n}]; Table[t[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 11 2012 *)
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
-
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 *)
A229707
Triangular array read by rows. T(n,k) is the number of strictly unimodal compositions of n with the greatest part equal to k; n>=1, 1<=k<=n.
Original entry on oeis.org
1, 0, 1, 0, 2, 1, 0, 1, 2, 1, 0, 0, 3, 2, 1, 0, 0, 4, 3, 2, 1, 0, 0, 3, 6, 3, 2, 1, 0, 0, 2, 7, 6, 3, 2, 1, 0, 0, 1, 8, 9, 6, 3, 2, 1, 0, 0, 0, 10, 12, 9, 6, 3, 2, 1, 0, 0, 0, 8, 16, 14, 9, 6, 3, 2, 1, 0, 0, 0, 7, 20, 20, 14, 9, 6, 3, 2, 1
Offset: 1
1,
0, 1,
0, 2, 1,
0, 1, 2, 1,
0, 0, 3, 2, 1,
0, 0, 4, 3, 2, 1,
0, 0, 3, 6, 3, 2, 1,
0, 0, 2, 7, 6, 3, 2, 1,
0, 0, 1, 8, 9, 6, 3, 2, 1,
0, 0, 0, 10, 12, 9, 6, 3, 2, 1
T(7,3) = 3 because we have: 1+2+3+1 = 1+3+2+1 = 2+3+2.
-
b:= proc(n, t, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
`if`(k>0, `if`(n b(n, 0, k):
seq(seq(T(n, k), k=1..n), n=1..16); # Alois P. Heinz, Oct 07 2013
-
nn=10;Table[Take[Drop[Transpose[Map[PadRight[#,nn+1,0]&,Table[CoefficientList[Series[x^n Product[(1+x^i),{i,1,n-1}]^2,{x,0,nn}],x],{n,1,nn}]]],1][[n]],n],{n,1,nn}]//Grid
A293137
a(0) = 0, and a(n) = floor(2*sqrt(n)) - 1 for n >= 1.
Original entry on oeis.org
0, 1, 1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18
Offset: 0
-
0,seq(seq(k, n=ceil(((k+1)/2)^2) .. ceil(((k+2)/2)^2)-1),k=0..18); # Robert Israel, Oct 01 2017
-
Join[{0}, Floor[2*Sqrt[Range[100]]] - 1] (* Paolo Xausa, Nov 13 2024 *)
-
a(n)=if(n==0,0,floor(2*sqrt(n)) - 1);
-
from math import isqrt
def A293137(n): return isqrt(n<<2)-1 if n else 0 # Chai Wah Wu, Jul 28 2022
Showing 1-10 of 11 results.
Comments