A345915
Numbers k such that the k-th composition in standard order (row k of A066099) has alternating sum <= 0.
Original entry on oeis.org
0, 3, 6, 10, 12, 13, 15, 20, 24, 25, 27, 30, 36, 40, 41, 43, 46, 48, 49, 50, 51, 53, 54, 55, 58, 60, 61, 63, 72, 80, 81, 83, 86, 92, 96, 97, 98, 99, 101, 102, 103, 106, 108, 109, 111, 116, 120, 121, 123, 126, 136, 144, 145, 147, 150, 156, 160, 161, 162, 163
Offset: 1
The sequence of terms together with the corresponding compositions begins:
0: ()
3: (1,1)
6: (1,2)
10: (2,2)
12: (1,3)
13: (1,2,1)
15: (1,1,1,1)
20: (2,3)
24: (1,4)
25: (1,3,1)
27: (1,2,1,1)
30: (1,1,1,2)
36: (3,3)
40: (2,4)
41: (2,3,1)
The version for Heinz numbers of partitions is
A028260 (counted by
A027187).
These compositions are counted by
A058622.
These are the positions of terms <= 0 in
A124754.
The reverse-alternating version is
A345916.
The opposite (k >= 0) version is
A345917.
The strictly negative (k < 0) version is
A345919.
A000041 counts partitions of 2n with alternating sum 0, ranked by
A000290.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A236913 counts partitions of 2n with reverse-alternating sum <= 0.
A316524 gives the alternating sum of prime indices (reverse:
A344616).
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
Cf.
A000070,
A000097,
A000346,
A008549,
A025047,
A032443,
A114121,
A163493,
A344607,
A344609,
A344610.
-
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
Select[Range[0,100],ats[stc[#]]<=0&]
A345916
Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum <= 0.
Original entry on oeis.org
0, 3, 5, 9, 10, 13, 15, 17, 18, 23, 25, 29, 33, 34, 36, 39, 41, 43, 45, 46, 49, 50, 53, 55, 57, 58, 61, 63, 65, 66, 68, 71, 75, 77, 78, 81, 85, 89, 90, 95, 97, 98, 103, 105, 109, 113, 114, 119, 121, 125, 129, 130, 132, 135, 136, 139, 141, 142, 145, 147, 149
Offset: 1
The sequence of terms together with the corresponding compositions begins:
0: ()
3: (1,1)
5: (2,1)
9: (3,1)
10: (2,2)
13: (1,2,1)
15: (1,1,1,1)
17: (4,1)
18: (3,2)
23: (2,1,1,1)
25: (1,3,1)
29: (1,1,2,1)
33: (5,1)
34: (4,2)
36: (3,3)
The version for Heinz numbers of partitions is
A000290.
These compositions are counted by
A058622.
These are the positions of terms <= 0 in
A344618.
The opposite (k >= 0) version is
A345914.
The version for unreversed alternating sum is
A345915.
The strictly negative (k < 0) version is
A345920.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A236913 counts partitions of 2n with reverse-alternating sum <= 0.
A316524 gives the alternating sum of prime indices (reverse:
A344616).
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
Cf.
A000070,
A000346,
A008549,
A025047,
A027187,
A028260,
A032443,
A114121,
A163493,
A344607,
A344610,
A345908.
-
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
Select[Range[0,100],sats[stc[#]]<=0&]
A027914
T(n,0) + T(n,1) + ... + T(n,n), T given by A027907.
Original entry on oeis.org
1, 2, 6, 17, 50, 147, 435, 1290, 3834, 11411, 34001, 101400, 302615, 903632, 2699598, 8068257, 24121674, 72137547, 215786649, 645629160, 1932081885, 5782851966, 17311097568, 51828203475, 155188936431, 464732722872
Offset: 0
-
a027914 n = sum $ take (n + 1) $ a027907_row n
-- Reinhard Zumkeller, Jan 22 2013
-
a := n -> simplify((3^n + GegenbauerC(n,-n,-1/2))/2):
seq(a(n), n=0..25); # Peter Luschny, May 12 2016
-
CoefficientList[ Series[ (1 + x + Sqrt[1 - 2x - 3x^2])/(2 - 4x - 6x^2), {x, 0, 26}], x] (* Robert G. Wilson v, Jul 21 2015 *)
Table[(3^n + Hypergeometric2F1[1/2 - n/2, -n/2, 1, 4])/2, {n, 0, 20}] (* Vladimir Reshetnikov, May 07 2016 *)
f[n_] := Plus @@ Take[ CoefficientList[ Sum[x^k, {k, 0, 2}]^n, x], n +1]; Array[f, 26, 0] (* Robert G. Wilson v, Jan 30 2017 *)
-
a(n)=sum(i=0,n,polcoeff((1+x+x^2)^n,i,x))
-
a(n)=sum(i=0,n,sum(j=0,n,sum(k=0,j,if(i+j+k-n,0,(n!/i!/j!/k!)))))
-
x='x+O('x^99); Vec((1+x+(1-2*x-3*x^2)^(1/2))/(2*(1-2*x-3*x^2))) \\ Altug Alkan, May 12 2016
A038208
Triangle whose (i,j)-th entry is binomial(i,j)*2^i.
Original entry on oeis.org
1, 2, 2, 4, 8, 4, 8, 24, 24, 8, 16, 64, 96, 64, 16, 32, 160, 320, 320, 160, 32, 64, 384, 960, 1280, 960, 384, 64, 128, 896, 2688, 4480, 4480, 2688, 896, 128, 256, 2048, 7168, 14336, 17920, 14336, 7168, 2048, 256, 512, 4608, 18432, 43008, 64512, 64512, 43008, 18432, 4608, 512
Offset: 0
1;
2, 2;
4, 8, 4;
8, 24, 24, 8;
16, 64, 96, 64, 16;
32, 160, 320, 320, 160, 32;
64, 384, 960, 1280, 960, 384, 64;
128, 896, 2688, 4480, 4480, 2688, 896, 128;
256, 2048, 7168, 14336, 17920, 14336, 7168, 2048, 256;
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- B. N. Cyvin et al., Isomer enumeration of unbranched catacondensed polygonal systems with pentagons and heptagons, Match, No. 34 (Oct 1996), pp. 109-121.
- S. Elizalde, E. Deutsch, The degree of asymmetry of a sequence, Enum. Combinat. Applic. 2 (2022) no 1 #S2R7, corollary 2.2 at m=2, then dropping each 2nd row
- Franck Ramaharo, Statistics on some classes of knot shadows, arXiv:1802.07701 [math.CO], 2018.
- Franck Ramaharo, A generating polynomial for the pretzel knot, arXiv:1805.10680 [math.CO], 2018.
- Franck Ramaharo, A bracket polynomial for 2-tangle shadows, arXiv:2002.06672 [math.CO], 2020.
-
[Binomial(n,k)*2^n: k in [0..n], n in [0..10]]; // G. C. Greubel, Oct 17 2018
-
nn=8;Map[Select[#,#>0&]&,Transpose[Table[Range[0,nn]!CoefficientList[Series[2^k x^k/k! Exp[2x],{x,0,nn}],x],{k,0,nn}]]]//Grid (* Geoffrey Critzer, Feb 13 2014 *)
Flatten[Table[Binomial[i,j]2^i,{i,0,10},{j,0,i}]] (* Harvey P. Dale, May 28 2015 *)
-
for(n=0,10, for(k=0,n, print1(binomial(n,k)*2^n, ", "))) \\ G. C. Greubel, Oct 17 2018
-
flatten([[binomial(n,k)*2^n for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 21 2022
A034868
Left half of Pascal's triangle.
Original entry on oeis.org
1, 1, 1, 2, 1, 3, 1, 4, 6, 1, 5, 10, 1, 6, 15, 20, 1, 7, 21, 35, 1, 8, 28, 56, 70, 1, 9, 36, 84, 126, 1, 10, 45, 120, 210, 252, 1, 11, 55, 165, 330, 462, 1, 12, 66, 220, 495, 792, 924, 1, 13, 78, 286, 715, 1287, 1716, 1, 14, 91, 364, 1001, 2002, 3003, 3432, 1, 15
Offset: 0
1;
1;
1, 2;
1, 3;
1, 4, 6;
1, 5, 10;
1, 6, 15, 20;
...
-
a034868 n k = a034868_tabf !! n !! k
a034868_row n = a034868_tabf !! n
a034868_tabf = map reverse a034869_tabf
-- Reinhard Zumkeller, improved Dec 20 2015, Jul 27 2012
-
Flatten[ Table[ Binomial[n, k], {n, 0, 15}, {k, 0, Floor[n/2]}]] (* Robert G. Wilson v, May 28 2005 *)
-
for(n=0, 14, for(k=0, floor(n/2), print1(binomial(n, k),", ");); print();) \\ Indranil Ghosh, Mar 31 2017
-
import math
from sympy import binomial
for n in range(15):
print([binomial(n, k) for k in range(int(math.floor(n/2)) + 1)]) # Indranil Ghosh, Mar 31 2017
-
from itertools import count, islice
def A034868_gen(): # generator of terms
yield from (s:=(1,))
for i in count(0):
yield from (s:=(1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1)) + ((s[-1]<<1,) if i&1 else ()))
A034868_list = list(islice(A034868_gen(),30)) # Chai Wah Wu, Oct 17 2023
A292506
Number T(n,k) of multisets of exactly k nonempty binary words with a total of n letters such that no word has a majority of 0's; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
Original entry on oeis.org
1, 0, 1, 0, 3, 1, 0, 4, 3, 1, 0, 11, 10, 3, 1, 0, 16, 23, 10, 3, 1, 0, 42, 59, 33, 10, 3, 1, 0, 64, 134, 83, 33, 10, 3, 1, 0, 163, 320, 230, 98, 33, 10, 3, 1, 0, 256, 699, 568, 270, 98, 33, 10, 3, 1, 0, 638, 1599, 1451, 738, 291, 98, 33, 10, 3, 1, 0, 1024, 3434, 3439, 1935, 798, 291, 98, 33, 10, 3, 1
Offset: 0
T(4,2) = 10: {1,011}, {1,101}, {1,110}, {1,111}, {01,01}, {01,10}, {01,11}, {10,10}, {10,11}, {11,11}.
Triangle T(n,k) begins:
1;
0, 1;
0, 3, 1;
0, 4, 3, 1;
0, 11, 10, 3, 1;
0, 16, 23, 10, 3, 1;
0, 42, 59, 33, 10, 3, 1;
0, 64, 134, 83, 33, 10, 3, 1;
0, 163, 320, 230, 98, 33, 10, 3, 1;
0, 256, 699, 568, 270, 98, 33, 10, 3, 1;
0, 638, 1599, 1451, 738, 291, 98, 33, 10, 3, 1;
...
Columns k=0-10 give:
A000007,
A027306 (for n>0),
A316403,
A316404,
A316405,
A316406,
A316407,
A316408,
A316409,
A316410,
A316411.
-
g:= n-> 2^(n-1)+`if`(n::odd, 0, binomial(n, n/2)/2):
b:= proc(n, i) option remember; expand(`if`(n=0 or i=1, x^n,
add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)))
end:
T:= n-> (p-> seq(coeff(p,x,i), i=0..n))(b(n$2)):
seq(T(n), n=0..12);
-
g[n_] := 2^(n-1) + If[OddQ[n], 0, Binomial[n, n/2]/2];
b[n_, i_] := b[n, i] = Expand[If[n == 0 || i == 1, x^n, Sum[Binomial[g[i] + j - 1, j]*b[n - i*j, i - 1]*x^j, {j, 0, n/i}]]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, n]];
Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jun 06 2018, from Maple *)
A345908
Traces of the matrices (A345197) counting integer compositions by length and alternating sum.
Original entry on oeis.org
1, 1, 0, 1, 3, 3, 6, 15, 24, 43, 92, 171, 315, 629, 1218, 2313, 4523, 8835, 17076, 33299, 65169
Offset: 0
The a(0) = 1 through a(7) = 15 compositions of n = 0..7 of length (n + s)/2 where s = alternating sum (empty column indicated by dot):
() (1) . (2,1) (2,2) (2,3) (2,4) (2,5)
(1,1,2) (1,2,2) (1,3,2) (1,4,2)
(2,1,1) (2,2,1) (2,3,1) (2,4,1)
(1,1,3,1) (1,1,3,2)
(2,1,2,1) (1,2,3,1)
(3,1,1,1) (2,1,2,2)
(2,2,2,1)
(3,1,1,2)
(3,2,1,1)
(1,1,1,1,3)
(1,1,2,1,2)
(1,1,3,1,1)
(2,1,1,1,2)
(2,1,2,1,1)
(3,1,1,1,1)
Traces of the matrices given by
A345197.
Diagonals and antidiagonals of the same matrices are
A346632 and
A345907.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A316524 gives the alternating sum of prime indices (reverse:
A344616).
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
-
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==(n+ats[#])/2&]],{n,0,15}]
A246437
Expansion of (1/2)*(1/(x+1)+1/(sqrt(-3*x^2-2*x+1))).
Original entry on oeis.org
1, 0, 2, 3, 10, 25, 71, 196, 554, 1569, 4477, 12826, 36895, 106470, 308114, 893803, 2598314, 7567465, 22076405, 64498426, 188689685, 552675364, 1620567764, 4756614061, 13974168191, 41088418150, 120906613076, 356035078101, 1049120176954
Offset: 0
- Michael De Vlieger, Table of n, a(n) for n = 0..2100
- Christos A. Athanasiadis and Christina Savvidou, The Local h-Vector of the Cluster Subdivision of a Simplex, Séminaire Lotharingien de Combinatoire 66 (2012), Article B66c.
- Eric Marberg, On some actions of the 0-Hecke monoids of affine symmetric groups, arXiv:1709.07996 [math.CO], 2017.
- Yassine Otmani, The 2-Pascal Triangle and a Related Riordan Array, J. Int. Seq. (2025) Vol. 28, Issue 3, Art. No. 25.3.5. See p. 24.
-
CoefficientList[Series[(1/2) (1 / (x + 1) + 1 / (Sqrt[-3 x^2 - 2 x + 1])), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 14 2014 *)
Table[(-1)^n (Hypergeometric2F1[1/2, -n, 1, 4] + 1)/2, {n, 0, 20}] (* Vladimir Reshetnikov, Apr 25 2016 *)
Table[Sum[Binomial[n, k] Binomial[n - k - 1, n - 2 k], {k, 0, n/2}], {n, 0, 28}] (* Michael De Vlieger, Apr 25 2016 *)
-
a(n):=sum(binomial(n,k)*binomial(n-k-1,n-2*k),k,0,n/2);
-
def a(n):
if n < 3: return [1,0,2][n]
return n*hypergeometric([1-n, 1-n/2, 3/2-n/2],[2, 2-n], 4)
[simplify(a(n)) for n in (0..28)] # Peter Luschny, Nov 14 2014
A348614
Numbers k such that the k-th composition in standard order has sum equal to twice its alternating sum.
Original entry on oeis.org
0, 9, 11, 14, 130, 133, 135, 138, 141, 143, 148, 153, 155, 158, 168, 177, 179, 182, 188, 208, 225, 227, 230, 236, 248, 2052, 2057, 2059, 2062, 2066, 2069, 2071, 2074, 2077, 2079, 2084, 2089, 2091, 2094, 2098, 2101, 2103, 2106, 2109, 2111, 2120, 2129, 2131
Offset: 1
The terms together with their binary indices begin:
0: ()
9: (3,1)
11: (2,1,1)
14: (1,1,2)
130: (6,2)
133: (5,2,1)
135: (5,1,1,1)
138: (4,2,2)
141: (4,1,2,1)
143: (4,1,1,1,1)
148: (3,2,3)
153: (3,1,3,1)
155: (3,1,2,1,1)
158: (3,1,1,1,2)
The unordered case (partitions) is counted by
A000712, reverse
A006330.
These compositions are counted by
A262977.
Except for 0, a subset of
A345917 (which is itself a subset of
A345913).
A000346 = even-length compositions with alt sum != 0, complement
A001700.
A034871 counts compositions of 2n with alternating sum 2k.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse:
A344612).
A116406 counts compositions with alternating sum >=0, ranked by
A345913.
A138364 counts compositions with alternating sum 0, ranked by
A344619.
A345197 counts compositions by length and alternating sum.
Cf.
A008549,
A013777,
A027306,
A058622,
A088218,
A114121,
A120452,
A126869,
A163493,
A294175,
A344604.
-
ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
Select[Range[0,1000],Total[stc[#]]==2*ats[stc[#]]&]
A292549
Number of multisets of exactly n nonempty binary words with a total of 2n letters such that no word has a majority of 0's.
Original entry on oeis.org
1, 3, 10, 33, 98, 291, 826, 2320, 6342, 17188, 45750, 120733, 314690, 813854, 2085363, 5306878, 13406382, 33665476, 84031608, 208655086, 515469203, 1267600993, 3103490884, 7567559622, 18381579206, 44487740012, 107301636460, 257967350824, 618279370985
Offset: 0
a(0) = 1: {}.
a(1) = 3: {01}, {10}, {11}.
a(2) = 10: {1,011}, {1,101}, {1,110}, {1,111}, {01,01}, {01,10}, {01,11}, {10,10}, {10,11}, {11,11}.
-
g:= n-> 2^(n-1)+`if`(n::odd, 0, binomial(n, n/2)/2):
a:= proc(n) option remember; `if`(n=0, 1, add(add(d*
g(d+1), d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..35);
-
g[n_] := 2^(n-1) + If[OddQ[n], 0, Binomial[n, n/2]/2];
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*g[d+1], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 11 2019, after Alois P. Heinz *)
Comments