A106195
Riordan array (1/(1-2*x), x*(1-x)/(1-2*x)).
Original entry on oeis.org
1, 2, 1, 4, 3, 1, 8, 8, 4, 1, 16, 20, 13, 5, 1, 32, 48, 38, 19, 6, 1, 64, 112, 104, 63, 26, 7, 1, 128, 256, 272, 192, 96, 34, 8, 1, 256, 576, 688, 552, 321, 138, 43, 9, 1, 512, 1280, 1696, 1520, 1002, 501, 190, 53, 10, 1, 1024, 2816, 4096, 4048, 2972, 1683, 743, 253, 64, 11
Offset: 0
Triangle begins
1;
2, 1;
4, 3, 1;
8, 8, 4, 1;
16, 20, 13, 5, 1;
32, 48, 38, 19, 6, 1;
64, 112, 104, 63, 26, 7, 1;
(0, 2, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, ...) begins :
1;
0, 1;
0, 2, 1;
0, 4, 3, 1;
0, 8, 8, 4, 1;
0, 16, 20, 13, 5, 1;
0, 32, 48, 38, 19, 6, 1;
0, 64, 112, 104, 63, 26, 7, 1. - _Philippe Deléham_, Mar 22 2012
Column 0 = 1, 2, 4...; (binomial transform of 1, 1, 1...); column 1 = 1, 3, 8, 20...(binomial transform of 1, 2, 3...); column 2: 1, 4, 13, 38...= binomial transform of bin(n, 2): 1, 3, 6...
-
a106195 n k = a106195_tabl !! n !! k
a106195_row n = a106195_tabl !! n
a106195_tabl = [1] : [2, 1] : f [1] [2, 1] where
f us vs = ws : f vs ws where
ws = zipWith (-) (zipWith (+) ([0] ++ vs) (map (* 2) vs ++ [0]))
([0] ++ us ++ [0])
-- Reinhard Zumkeller, Dec 16 2013
-
[ (&+[Binomial(n-k, n-j)*Binomial(j, k): j in [0..n]]): k in [0..n], n in [0..10]]; // G. C. Greubel, Mar 15 2020
-
T := (n, k) -> hypergeom([-n+k, k+1],[1],-1):
seq(lprint(seq(simplify(T(n, k)), k=0..n)), n=0..7); # Peter Luschny, May 20 2015
-
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := u[n - 1, x] + v[n - 1, x]
v[n_, x_] := u[n - 1, x] + (x + 1) v[n - 1, x]
Table[Factor[u[n, x]], {n, 1, z}]
Table[Factor[v[n, x]], {n, 1, z}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A207605 *)
Table[Expand[v[n, x]], {n, 1, z}]
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A106195 *)
(* Clark Kimberling, Feb 19 2012 *)
Table[Hypergeometric2F1[-n+k, k+1, 1, -1], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 15 2020 *)
-
create_list(sum(binomial(i,k)*binomial(n-k,n-i),i,0,n),n,0,8,k,0,n); /* Emanuele Munarini, Mar 22 2011 */
-
from sympy import Poly, symbols
x = symbols('x')
def u(n, x): return 1 if n==1 else u(n - 1, x) + v(n - 1, x)
def v(n, x): return 1 if n==1 else u(n - 1, x) + (x + 1)*v(n - 1, x)
def a(n): return Poly(v(n, x), x).all_coeffs()[::-1]
for n in range(1, 13): print(a(n)) # Indranil Ghosh, May 28 2017
-
from mpmath import hyp2f1, nprint
def T(n, k): return hyp2f1(k - n, k + 1, 1, -1)
for n in range(13): nprint([int(T(n, k)) for k in range(n + 1)]) # Indranil Ghosh, May 28 2017, after formula from Peter Luschny
-
[[sum(binomial(n-k,n-j)*binomial(j,k) for j in (0..n)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Mar 15 2020
A032287
"DIK" (bracelet, indistinct, unlabeled) transform of 1,2,3,4,...
Original entry on oeis.org
1, 3, 6, 13, 24, 51, 97, 207, 428, 946, 2088, 4831, 11209, 26717, 64058, 155725, 380400, 936575, 2314105, 5744700, 14300416, 35708268, 89359536, 224121973, 563126689, 1417378191, 3572884062, 9019324297, 22797540648
Offset: 1
- Andrew Howroyd, Table of n, a(n) for n = 1..200
- A. K. Agarwal, n-colour compositions, Indian J. Pure Appl. Math. 31 (11) (2000), 1421-1427.
- C. G. Bower, Transforms (2).
- Meghann Moriah Gibson, Combinatorics of compositions, Master of Science, Georgia Southern University, 2017.
- Meghann Moriah Gibson, Daniel Gray, and Hua Wang, Combinatorics of n-color compositions, Discrete Mathematics 341 (2018), 3209-3226.
- Arnold Knopfmacher and Neville Robbins, Some properties of dihedral compositions, Util. Math. 92 (2013), 207-220.
- Index entries for sequences related to bracelets
-
DIK := proc(L::list)
local x,cidx,ncyc,d,gd,g,g2,n ;
n := nops(L) ;
g := add(op(i,L)*x^i,i=1..n) ;
# wrap into the cycle index of the cyclic group C_n
cidx := 0 ;
for ncyc from 1 to n do
for d in numtheory[divisors](ncyc) do
gd := subs(x=x^d,g) ;
cidx := cidx+1/ncyc*numtheory[phi](d)*gd^(ncyc/d) ;
end do:
end do:
# cycle index is half of th eone for the cyclic group plus two
# different branches or D_n with even or odd n
cidx := cidx/2 ;
g2 := subs(x=x^2,g) ;
for ncyc from 1 to n do
if type(ncyc,'odd') then
cidx := cidx+ g*g2^((ncyc-1)/2)/2 ;
else
cidx := cidx+ (g^2*g2^((ncyc-2)/2) + g2^(ncyc/2))/4 ;
end if;
end do:
taylor(cidx,x=0,nops(L)) ;
gfun[seriestolist](%) ;
end proc:
A032287_list := proc(n)
local ele ;
ele := [seq(i,i=1..40)] ;
DIK(ele) ;
end proc:
A032287_list(50) ; # R. J. Mathar, Feb 14 2025
-
seq[n_] := x(1 + x - 2 x^2 + x^3 + x^4)/((1 - x)^2 (1 - x - x^2)(1 + x - x^2)) + Sum[EulerPhi[d]/d Log[(1 - x^d)^2/(1 - 3 x^d + x^(2d)) + O[x]^(n+1)], {d, 1, n}] // CoefficientList[#, x]& // Rest // #/2&;
seq[30] (* Jean-François Alcover, Sep 17 2019, from PARI *)
-
seq(n)={Vec(x*(1 + x - 2*x^2 + x^3 + x^4)/((1 - x)^2*(1 - x - x^2)*(1 + x - x^2)) + sum(d=1, n, eulerphi(d)/d*log((1 - x^d)^2/(1 - 3*x^d + x^(2*d)) + O(x*x^n))))/2} \\ Andrew Howroyd, Jun 20 2018
A329156
Expansion of Product_{k>=1} 1 / (1 - Sum_{j>=1} j * x^(k*j)).
Original entry on oeis.org
1, 1, 4, 10, 29, 72, 200, 510, 1364, 3546, 9348, 24400, 64090, 167562, 439200, 1149360, 3010349, 7879832, 20633304, 54014950, 141422328, 370239300, 969323000, 2537696160, 6643839400, 17393731933, 45537549048, 119218684970, 312119004990, 817137724392, 2139295489200, 5600747143950
Offset: 0
-
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>1, b(n, i-1), 0)-
add(b(n-i*j, min(n-i*j, i-1))*j, j=`if`(i=1, n, 1..n/i)))
end:
a:= proc(n) option remember; `if`(n=0, 1,
-add(a(j)*b(n-j$2), j=0..n-1))
end:
seq(a(n), n=0..31); # Alois P. Heinz, Jul 25 2025
-
nmax = 31; CoefficientList[Series[Product[1/(1 - Sum[j x^(k j), {j, 1, nmax}]), {k, 1, nmax}], {x, 0, nmax}], x]
nmax = 31; CoefficientList[Series[Product[1/(1 - x^k/(1 - x^k)^2), {k, 1, nmax}], {x, 0, nmax}], x]
A093960
a(1) = 1, a(2) = 2, a(n+1) = n*a(1) + (n-1)*a(2) + ... + (n-r)*a(r+1) + ... + a(n).
Original entry on oeis.org
1, 2, 4, 11, 29, 76, 199, 521, 1364, 3571, 9349, 24476, 64079, 167761, 439204, 1149851, 3010349, 7881196, 20633239, 54018521, 141422324, 370248451, 969323029, 2537720636, 6643838879, 17393796001, 45537549124, 119218851371, 312119004989, 817138163596
Offset: 1
-
[1,2] cat [Lucas(2*n-3): n in [3..30]]; // G. C. Greubel, Dec 30 2021
-
a[1]:=1: a[2]:=2: for n from 2 to 33 do a[n+1]:=sum((n-r)*a[r+1],r=0..n-1) od: seq(a[n],n=1..33); # Emeric Deutsch, Aug 01 2005
A093960List := proc(m) local A, P, n; A := [1,2]; P := [1];
for n from 1 to m - 2 do P := ListTools:-PartialSums([op(A), P[-1]]);
A := [op(A), P[-1]] od; A end: A093960List(30); # Peter Luschny, Mar 24 2022
-
Print[1]; Print[2]; Do[Print[Fibonacci[2*n - 2] + Fibonacci[2*n - 4]], {n, 3, 20}] (* Ryan Propper, Jun 19 2005 *)
LinearRecurrence[{3,-1},{1,2,4,11},30] (* Harvey P. Dale, Nov 17 2018 *)
-
Vec(x*(x-1)^2*(x+1)/(x^2-3*x+1) + O(x^100)) \\ Colin Barker, Mar 26 2015
-
[2^(2-n)*bool(n<3) + lucas_number2(2*n-3, 1, -1) for n in (1..30)] # G. C. Greubel, Dec 30 2021
A273719
Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k horizontal steps in the peaks (n>=2, k>=1).
Original entry on oeis.org
1, 1, 1, 3, 1, 1, 8, 3, 1, 1, 21, 9, 3, 1, 1, 55, 27, 10, 3, 1, 1, 144, 82, 33, 11, 3, 1, 1, 377, 251, 110, 39, 12, 3, 1, 1, 987, 770, 368, 139, 45, 13, 3, 1, 1, 2584, 2358, 1229, 495, 169, 51, 14, 3, 1, 1, 6765, 7191, 4085, 1755, 632, 200, 57, 15, 3, 1, 1
Offset: 2
Row 4 is 3,1,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and the corresponding drawings show that they have 3,1,1,2,1 horizontal steps in their peaks.
Triangle starts
1;
1,1;
3,1,1;
8,3,1,1;
21,9,3,1,1
- Alois P. Heinz, Rows n = 2..150, flattened
- A. Blecher, C. Brennan, and A. Knopfmacher, Peaks in bargraphs, Trans. Royal Soc. South Africa, 71, No. 1, 2016, 97-103.
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
-
eq := G = z^2*s+z*(G-z^2*s/(1-z*s)+z^2*s^2/(1-z*s))+z*G+z^2*G+z*G*(G-z^2*s/(1-z*s)+z^2/(1-z)): G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 20)): for n from 2 to 16 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 2 to 16 do seq(coeff(P[n], s, j), j = 1 .. n-1) end do; # yields sequence in triangular form
# second Maple program:
b:= proc(n, y, t, h) option remember; expand(
`if`(n=0, (1-t)*z^h, `if`(t<0, 0, b(n-1, y+1, 1, 0))+
`if`(t>0 or y<2, 0, b(n, y-1, -1, 0)*z^h)+
`if`(y<1, 0, b(n-1, y, 0, `if`(max(h, t)>0, h+1, 0)))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=1..n-1))(b(n, 0$3)):
seq(T(n), n=2..16); # Alois P. Heinz, Jun 06 2016
-
b[n_, y_, t_, h_] := b[n, y, t, h] = Expand[If[n == 0, (1 - t)*z^h, If[t < 0, 0, b[n - 1, y + 1, 1, 0]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1, 0]*z^h] + If[y < 1, 0, b[n - 1, y, 0, If[Max[h, t] > 0, h + 1, 0]]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 1, n - 1}]][b[n, 0, 0, 0]]; Table[T[n], {n, 2, 16}] // Flatten (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)
A308723
Total number of parts in all m-cyclic compositions of n (where each part of size m can be colored with one of m colors).
Original entry on oeis.org
1, 4, 10, 26, 59, 160, 383, 1018, 2606, 6836, 17721, 46580, 121405, 318212, 832190, 2179358, 5702903, 14933264, 39088187, 102341134, 267915110, 701426484, 1836311925, 4807575700, 12586269265, 32951401540, 86267576506, 225851752438, 591286729907, 1548009602240, 4052739537911
Offset: 1
We have a(1) = 1 because 1_1 is the only m-color cyclic composition of n = 1 and the total number of parts is 1.
We have a(2) = 4 because 2_1, 2_2, 1_1 + 1_1 are all the m-color cyclic compositions of 2 and the total number of parts is 1 + 1 + 2 = 4.
We have a(3) = 10 because 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 1_1 + 1_1 + 1_1 are all the m-color cyclic compositions of n = 3 and the total number of parts is 1 + 1 + 1 + 2 + 2 + 3 = 10.
We have a(4) = 26 because 4_1, 4_2, 4_3, 4_4, 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 1_1 + 1_1 + 1_1 + 1_1 are all the m-color cyclic compositions of n = 4 and the total number of parts is 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 2 + 3 + 3 + 4 = 26.
- A. K. Agarwal, n-colour compositions, Indian J. Pure Appl. Math., 31(11) (2000), 1421-1427.
- C. G. Bower, Transforms (2).
- Meghann Moriah Gibson, Combinatorics of compositions, Master of Science, Georgia Southern University, 2017.
- Meghann Moriah Gibson, Daniel Gray, and Hua Wang, Combinatorics of n-color compositions, Discrete Mathematics, 341 (2018), 3209-3226.
- D. M. Y. Sommerville, On certain periodic properties of cyclic compositions of numbers, Proc. London Math. Soc., S2-7(1) (1909), 263-313.
A382991
Number of compositions of n such that any part 1 at position k can be k different colors.
Original entry on oeis.org
1, 1, 3, 10, 40, 193, 1110, 7473, 57821, 505945, 4940354, 53248874, 627848885, 8037734930, 111017325473, 1645384681765, 26044845197881, 438499277779636, 7824114643731522, 147476551001255125, 2928074880767254238, 61078483577649288463, 1335438738400978511877
Offset: 0
a(3) = 10 counts: (3), (2,1_a), (2,1_b), (1_a,2), (1_a,1_a,1_a), (1_a,1_a,1_b), (1_a,1_a,1_c), (1_a,1_b,1_a), (1_a,1_b,1_b), (1_a,1_b,1_c).
-
b:= proc(n, i) option remember; `if`(n=0, 1,
add(b(n-j, i+1)*`if`(j=1, i, 1), j=1..n))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..22); # Alois P. Heinz, Apr 23 2025
-
A_x(N) = {my(x='x+O('x^N)); Vec(1+ sum(i=1,N, prod(j=1,i, j*x + x^2/(1-x))))}
A_x(30)
A052567
E.g.f.: (1-x)^2/(1-3*x+x^2).
Original entry on oeis.org
1, 1, 6, 48, 504, 6600, 103680, 1900080, 39795840, 937681920, 24548832000, 706966444800, 22210346188800, 755916735974400, 27706219904563200, 1088037381150720000, 45576301518139392000, 2028445209752113152000, 95589693062063456256000, 4754884242802394308608000
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
-
spec := [S,{S=Sequence(Prod(Z,Sequence(Z),Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
-
With[{nn=20},CoefficientList[Series[(1-x)^2/(1-3x+x^2),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jul 06 2021 *)
A242551
Number of n-length words on infinite alphabet {1,2,...} such that the maximal runs of consecutive equal integers have lengths that are at least as great as the integer.
Original entry on oeis.org
1, 1, 2, 5, 11, 24, 53, 118, 261, 577, 1276, 2823, 6246, 13819, 30572, 67635, 149630, 331029, 732344, 1620187, 3584388, 7929844, 17543415, 38811782, 85864379, 189960150, 420254129, 929739922, 2056889538, 4550514023, 10067228909, 22272010878, 49272989918, 109008007822, 241161451563, 533528195645
Offset: 0
a(3)=5 because we have: 111, 122, 221, 222, 333.
a(4)=11 because we have: 1111, 1122, 1221, 1222, 2211, 2221, 2222, 3331, 1333, 3333, 4444.
-
b:= proc(n, t) option remember; `if`(n=0, 1,
`if`(t=0, 0, b(n-1, t)) +add(
`if`(t=j, 0, b(n-j, j)), j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..40); # Alois P. Heinz, Oct 07 2015
-
n=nn=35;CoefficientList[Series[1/(1-Sum[v[i]/(1+v[i])/.v[i]->z^i/(1-z),{i,1,n}]),{z,0,nn}],z]
-
C_x(N)={my(x='x+O('x^N), h = 1/(1-sum(i=1,N, x^i/(1 - x + x^i)))); Vec(h)}
C_x(40) \\ John Tyler Rascoe, Jul 23 2024
A308747
Number of achiral m-color cyclic compositions of n (that is, number of cyclic compositions of n with reflection symmetry where each part of size m can be colored with one of m colors).
Original entry on oeis.org
1, 3, 6, 13, 23, 44, 73, 131, 210, 365, 575, 984, 1537, 2611, 4062, 6877, 10679, 18052, 28009, 47315, 73386, 123933, 192191, 324528, 503233, 849699, 1317558, 2224621, 3449495, 5824220, 9030985, 15248099, 23643522, 39920141, 61899647, 104512392, 162055489, 273617107
Offset: 1
We have a(1) = 1 because we only have one symmetric cyclic composition of n = 1, namely 1_1 (and a part of size 1 can be colored with only one color).
We have a(2) = 3 because we have the following colored achiral cyclic compositions of n = 2: 2_1, 2_2, 1_1 + 1_1.
We have a(3) = 6 because we have the following colored achiral cyclic compositions of n = 3: 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 1_1 + 1_1 + 1_1.
We have a(4) = 13 because we have the following colored achiral cyclic compositions of n = 4: 4_1, 4_2, 4_3, 4_4, 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 1_1 + 1_1 + 1_1 + 1_1.
We have a(5) = 23 because we have the following colored achiral cyclic compositions of n = 5:
(i) with one part: 5_1, 5_2, 5_3, 5_4, 5_5;
(ii) with two parts: 1_1 + 4_1, 1_1 + 4_2, 1_1 + 4_3, 1_1 + 4_4, 2_1 + 3_1, 2_1 + 3_2, 2_1 + 3_3, 2_2 + 3_1, 2_2 + 3_2, 2_2 + 3_3;
(iii) with three parts: 1_1 + 3_1 + 1_1, 1_1 + 3_2 + 1_1, 1_1 + 3_3 + 1_1, 2_1 + 1_1 + 2_1, 2_2 + 1_1 + 2_2;
(iv) with four parts: 1_1 + 1_1 + 2_1 + 1_1, 1_1 + 1_1 + 2_2 + 1_1 (here, the axis of symmetry passes through one of the 1's and through 2);
(v) with five parts: 1_1 + 1_1 + 1_1 + 1_1 + 1_1.
- A. K. Agarwal, n-colour compositions, Indian J. Pure Appl. Math. 31 (11) (2000), 1421-1427.
- Christian G. Bower, Transforms (2).
- Petros Hadjicostas, Generalized colored circular palindromic compositions, Moscow Journal of Combinatorics and Number Theory, 9(2) (2020), 173-186.
- Meghann Moriah Gibson, Combinatorics of compositions, Master of Science, Georgia Southern University, 2017.
- Meghann Moriah Gibson, Daniel Gray, and Hua Wang, Combinatorics of n-color compositions, Discrete Mathematics 341 (2018), 3209-3226.
- D. M. Y. Sommerville, On certain periodic properties of cyclic compositions of numbers, Proc. London Math. Soc. S2-7(1) (1909), 263-313.
Comments