A202064
Triangle T(n,k), read by rows, given by (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Original entry on oeis.org
1, 2, 0, 3, 1, 0, 4, 4, 0, 0, 5, 10, 1, 0, 0, 6, 20, 6, 0, 0, 0, 7, 35, 21, 1, 0, 0, 0, 8, 56, 56, 8, 0, 0, 0, 0, 9, 84, 126, 36, 1, 0, 0, 0, 0, 10, 120, 252, 120, 10, 0, 0, 0, 0, 0, 11, 165, 462, 330, 55, 1, 0, 0, 0, 0, 0
Offset: 0
Triangle begins :
1
2, 0
3, 1, 0
4, 4, 0, 0
5, 10, 1, 0, 0
6, 20, 6, 0, 0, 0
7, 35, 21, 1, 0, 0, 0
8, 56, 56, 8, 0, 0, 0, 0
Last nonzero term in each row appears to be
A124625.
A034839 counts subsets by number of maximal runs, for anti-runs
A384893.
A116674 counts strict partitions by number of maximal runs, for anti-runs
A384905.
Cf.
A000045,
A000071,
A001629,
A010027,
A053538,
A208342,
A210034,
A245563,
A268193,
A384177,
A384890.
-
Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Length[Split[#,#2==#1+1&]]==k&]],{n,12},{k,n}] (* Gus Wiseman, Jul 07 2025 *)
A077954
Expansion of 1/(1-x+2*x^2-x^3) in powers of x.
Original entry on oeis.org
1, 1, -1, -2, 1, 4, 0, -7, -3, 11, 10, -15, -24, 16, 49, -7, -89, -26, 145, 108, -208, -279, 245, 595, -174, -1119, -176, 1888, 1121, -2831, -3185, 3598, 7137, -3244, -13920, -295, 24301, 10971, -37926, -35567, 51256, 84464, -53615, -171287, 20407, 309366, 97265, -501060, -386224, 713161
Offset: 0
G.f. = 1 + x - x^2 - 2*x^3 + x^4 + 4*x^5 - 7*x^7 - 3*x^8 + 11*x^9 + ...
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Paul Barry, Centered polygon numbers, heptagons and nonagons, and the Robbins numbers, arXiv:2104.01644 [math.CO], 2021.
- Index entries for linear recurrences with constant coefficients, signature (1,-2,1).
-
a:=[1,1,-1];; for n in [4..50] do a[n]:=a[n-1]-2*a[n-2]+a[n-3]; od; a; # G. C. Greubel, Aug 07 2019
-
R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x+2*x^2-x^3) )); // G. C. Greubel, Aug 07 2019
-
seq(coeff(series(1/(1-x+2*x^2-x^3), x, n+1), x, n), n = 0..50); # G. C. Greubel, Aug 07 2019
-
a[ n_] := If[ n < 0, SeriesCoefficient[ x^3 / (1 - 2 x + x^2 - x^3), {x, 0, -n}], SeriesCoefficient[ 1 / (1 - x + 2 x^2 - x^3), {x, 0, n}]]
LinearRecurrence[{1,-2,1}, {1,1,-1}, 50] (* G. C. Greubel, Aug 07 2019 *)
-
{a(n) = if( n<0, polcoeff( x^3 / (1 - 2*x + x^2 - x^3) + x * O(x^-n), -n), polcoeff( 1 / (1 - x + 2*x^2 - x^3) + x * O(x^n), n))} /* Michael Somos, Sep 18 2012 */
-
(1/(1-x+2*x^2-x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Aug 07 2019
A136444
a(n) = Sum_{k=0..n} k*binomial(n-k, 2*k).
Original entry on oeis.org
0, 0, 0, 1, 3, 6, 12, 25, 51, 101, 197, 381, 731, 1392, 2634, 4958, 9290, 17337, 32239, 59760, 110460, 203651, 374593, 687567, 1259597, 2303449, 4205493, 7666560, 13956532, 25374108, 46076436, 83575025, 151431099, 274108826, 495708364, 895670733, 1617003823, 2916984121
Offset: 0
- D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.4.
-
[&+[k*Binomial(n-k, 2*k): k in [0..n]]: n in [0..40]]; // Bruno Berselli, Feb 13 2015
-
a:= n-> (Matrix([[0,0,1,1,-3,-5]]). Matrix(6, (i,j)-> if (i=j-1) then 1 elif j=1 then [4,-6,6,-5,2,-1][i] else 0 fi)^n)[1,1]: seq(a(n), n=0..37); # Alois P. Heinz, Aug 13 2008
-
a[n_] := ({0, 0, 1, 1, -3, -5} . MatrixPower[ Table[If[i == j-1, 1, If[j == 1, {4, -6, 6, -5, 2, -1}[[i]], 0]], {i, 6}, {j, 6}], n])[[1]]; Table[a[n], {n, 0, 37}] (* Jean-François Alcover, Feb 13 2015, after Alois P. Heinz *)
CoefficientList[Series[x^3 (1 - x)/(1 - 2 x + x^2 - x^3)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 15 2015 *)
A077930
Expansion of (1-x)^(-1)/(1+2*x+x^2+x^3).
Original entry on oeis.org
1, -1, 2, -3, 6, -10, 18, -31, 55, -96, 169, -296, 520, -912, 1601, -2809, 4930, -8651, 15182, -26642, 46754, -82047, 143983, -252672, 443409, -778128, 1365520, -2396320, 4205249, -7379697, 12950466, -22726483, 39882198, -69988378, 122821042, -215535903, 378239143, -663763424
Offset: 0
-
CoefficientList[Series[1/(1-x)/(1+2x+x^2+x^3),{x,0,50}],x] (* or *) LinearRecurrence[ {-1,1,0,1},{1,-1,2,-3},50] (* Harvey P. Dale, Feb 20 2013 *)
-
Vec((1-x)^(-1)/(1+2*x+x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 24 2012
A099529
Expansion of (1+x)^2/((1+x)^2+x^3).
Original entry on oeis.org
1, 0, 0, -1, 2, -3, 5, -9, 16, -28, 49, -86, 151, -265, 465, -816, 1432, -2513, 4410, -7739, 13581, -23833, 41824, -73396, 128801, -226030, 396655, -696081, 1221537, -2143648, 3761840, -6601569, 11584946, -20330163, 35676949, -62608681, 109870576, -192809420, 338356945, -593775046, 1042002567
Offset: 0
A259967
a(n) = a(n-1) + a(n-2) + a(n-4).
Original entry on oeis.org
3, 2, 2, 5, 10, 17, 29, 51, 90, 158, 277, 486, 853, 1497, 2627, 4610, 8090, 14197, 24914, 43721, 76725, 134643, 236282, 414646, 727653, 1276942, 2240877, 3932465, 6900995, 12110402, 21252274, 37295141, 65448410, 114853953, 201554637, 353703731, 620706778
Offset: 0
- R. K. Guy, Letter to N. J. A. Sloane, Feb 05 1986.
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Nazim Fatès, Biswanath Sethi, Sukanta Das, On the reversibility of ECAs with fully asynchronous updating: the recurrence point of view, Preprint, hal-01571847, 2017.
- R. K. Guy, Letter to N. J. A. Sloane, Feb 1986
- Bojan Vučković and Miodrag Živković, Row Space Cardinalities Above 2^(n - 2) + 2^(n - 3), ResearchGate, January 2017, p. 3.
- Eric Weisstein's World of Mathematics, Antiprism Graph
- Eric Weisstein's World of Mathematics, Chordless Cycle
- Eric Weisstein's World of Mathematics, Gear Graph
- Eric Weisstein's World of Mathematics, Maximal Independent Vertex Set
- Eric Weisstein's World of Mathematics, Minimal Vertex Cover
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1).
-
a259967 n = a259967_list !! n
a259967_list = 3 : 2 : 2 : 5 : zipWith3 (((+) .) . (+))
a259967_list (drop 2 a259967_list) (drop 3 a259967_list)
-- Reinhard Zumkeller, Jul 12 2015
-
I:=[3,2,2,5]; [n le 4 select I[n] else Self(n-1)+Self(n-2)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Sep 26 2017
-
f:= gfun:-rectoproc({-a(n+3)+2*a(n+2)-a(n+1)+a(n), a(0) = 3, a(1) = 2, a(2) = 2},a(n),remember):
map(f, [$0..50]); # Robert Israel, Jul 18 2016
-
Abs @ CoefficientList[Series[(x - 1) (x - 3)/(-1 + 2 x - x^2 + x^3), {x, 0, 36}], x] (* Michael De Vlieger, Jul 18 2016 *)
LinearRecurrence[{2, -1, 1}, {2, 2, 5}, 20] (* Eric W. Weisstein, May 25 2017 *)
Table[RootSum[-1 + # - 2 #^2 + #^3 &, #^n &], {n, 20}] (* Eric W. Weisstein, May 25 2017 *)
RootSum[-1 + # - 2 #^2 + #^3 &, #^Range[0, 20] &] (* Eric W. Weisstein, Jan 02 2018 *)
-
x='x+O('x^50); Vec((x-1)*(x-3)/(1-2*x+x^2-x^3)) \\ G. C. Greubel, May 24 2017
A224838
Triangle read by rows, obtained from triangle A011973 by reading that array from right to left along the irregular paths shown in the figure.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 3, 1, 1, 3, 4, 1, 4, 6, 5, 1, 1, 10, 10, 6, 1, 1, 5, 20, 15, 7, 1, 6, 15, 35, 21, 8, 1, 1, 21, 35, 56, 28, 9, 1, 1, 7, 56, 70, 84, 36, 10, 1, 8, 28, 126, 126, 120, 45, 11, 1, 1, 36, 84, 252, 210, 165, 55, 12, 1, 1, 9, 120, 210, 462, 330, 220, 66, 13, 1
Offset: 1
First 11 rows of the triangle:
1;
1, 1;
2, 1;
1, 3, 1;
1, 3, 4, 1;
4, 6, 5, 1;
1, 10, 10, 6, 1;
1, 5, 20, 15, 7, 1;
6, 15, 35, 21, 8, 1;
1, 21, 35, 56, 28, 9, 1;
1, 7, 56, 70, 84, 36, 10, 1;
-
Table[Reverse[Table[Binomial[n - Floor[(k + 1)/2], n - Floor[(3 k - 1)/2]], {k, Floor[(2 n + 2)/3]}]], {n, 13}] (* T. D. Noe, Jul 25 2013 *)
Column[Table[Binomial[n - Floor[(4 n + 15 - 6 k + (-1)^k)/12], n - Floor[(4 n + 15 - 6 k + (-1)^k)/12] - Floor[(2 n - 1)/3] + k - 1], {n, 1, 25}, {k, 1, Floor[(2 n + 2)/3]}]] (* John Molokach, Jul 25 2013 *)
A289692
The number of partitions of [n] with exactly 2 blocks without peaks.
Original entry on oeis.org
0, 1, 2, 4, 8, 15, 27, 48, 85, 150, 264, 464, 815, 1431, 2512, 4409, 7738, 13580, 23832, 41823, 73395, 128800, 226029, 396654, 696080, 1221536, 2143647, 3761839, 6601568, 11584945
Offset: 1
- Muniru A Asiru, Table of n, a(n) for n = 1..300
- T. Mansour and M. Shattuck, Counting Peaks and Valleys in a Partition of a Set, J. Int. Seq. 13 (2010), 10.6.8, Table 1.
- Index entries for linear recurrences with constant coefficients, signature (3,-3,2,-1).
-
a:=[0, 1, 2, 4]; for n in [5..10^2] do a[n]:=3*a[n-1]-3*a[n-2]+2*a[n-3]-a[n-4]; od; a; # Muniru A Asiru, Jan 25 2018
-
I:=[0, 1, 2, 4]; [n le 4 select I[n] else 3*Self(n-1)-3*Self(n-2)+2*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jan 26 2018
-
a := proc(n) option remember: if n = 1 then 0 elif n = 2 then 1 elif n=3 then 2 elif n=4 then 4 elif n >= 5 then 3*procname(n-1) -3*procname(n-2)+2*procname(n-3)-procname(n-4) fi; end:
seq(a(n), n = 0..100); # Muniru A Asiru, Jan 25 2018
-
LinearRecurrence[{3, -3, 2, -1}, {0, 1, 2, 4}, 40] (* Vincenzo Librandi, Jan 26 2018 *)
A193736
Triangular array: the fusion of polynomial sequences P and Q given by p(n,x) = (n+1)-st Fibonacci polynomial and q(n,x) = (x+1)^n.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 3, 4, 2, 1, 4, 8, 8, 3, 1, 5, 13, 19, 15, 5, 1, 6, 19, 36, 42, 28, 8, 1, 7, 26, 60, 91, 89, 51, 13, 1, 8, 34, 92, 170, 216, 182, 92, 21, 1, 9, 43, 133, 288, 446, 489, 363, 164, 34, 1, 10, 53, 184, 455, 826, 1105, 1068, 709, 290, 55, 1, 11, 64, 246, 682, 1414, 2219, 2619, 2266, 1362, 509, 89
Offset: 0
First six rows:
1;
1, 1;
1, 2, 1;
1, 3, 4, 2;
1, 4, 8, 8, 3;
1, 5, 13, 19, 15, 5;
-
function T(n,k) // T = A193736
if k lt 0 or n lt 0 then return 0;
elif n lt 3 then return Binomial(n,k);
else return T(n-1, k) + T(n-1, k-1) + T(n-2, k-2);
end if;
end function;
[T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 24 2023
-
(* First program *)
p[0, x_] := 1
p[n_, x_] := Fibonacci[n + 1, x] /; n > 0
q[n_, x_] := (x + 1)^n
t[n_, k_] := Coefficient[p[n, x], x^(n - k)];
t[n_, n_] := p[n, x] /. x -> 0;
w[n_, x_] := Sum[t[n, k]*q[n - k + 1, x], {k, 0, n}]; w[-1, x_] := 1
g[n_] := CoefficientList[w[n, x], {x}]
TableForm[Table[Reverse[g[n]], {n, -1, z}]]
Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193736 *)
TableForm[Table[g[n], {n, -1, z}]]
Flatten[Table[g[n], {n, -1, z}]] (* A193737 *)
(* Second program *)
T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] +T[n-1,k-1] +T[n -2,k-2]];
Table[T[n, k], {n,0,12}, {k,0,n}]//TableForm (* G. C. Greubel, Oct 24 2023 *)
-
def T(n,k): # T = A193736
if (n<3): return binomial(n,k)
else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k-2)
flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 24 2023
A099557
Slanted Pascal's triangle, read by rows, such that T(n,k) = binomial(n-[k/2],k) for [n*2/3]>=k>=0, where [x]=floor(x).
Original entry on oeis.org
1, 1, 1, 1, 2, 0, 1, 3, 1, 0, 1, 4, 3, 1, 0, 1, 5, 6, 4, 0, 0, 1, 6, 10, 10, 1, 0, 0, 1, 7, 15, 20, 5, 1, 0, 0, 1, 8, 21, 35, 15, 6, 0, 0, 0, 1, 9, 28, 56, 35, 21, 1, 0, 0, 0, 1, 10, 36, 84, 70, 56, 7, 1, 0, 0, 0, 1, 11, 45, 120, 126, 126, 28, 8, 0, 0, 0, 0
Offset: 0
Rows begin:
[1],
[1,1],
[1,2,0],
[1,3,1,0],
[1,4,3,1,0],
[1,5,6,4,0,0],
[1,6,10,10,1,0,0],
[1,7,15,20,5,1,0,0],
[1,8,21,35,15,6,0,0,0],
[1,9,28,56,35,21,1,0,0,0],
[1,10,36,84,70,56,7,1,0,0,0],...
and can be derived from Pascal's triangle
by shifting each column k down by [k/2] rows.
-
{T(n,k)=polcoeff(polcoeff((1-x+x*y)/((1-x)^2-x^3*y^2)+x*O(x^n),n,x)+y*O(y^k),k,y)}
Comments