A216604
G.f. satisfies: A(x) = (1 + x*(1-x)*A(x)) * (1 + x^2*A(x)).
Original entry on oeis.org
1, 1, 1, 2, 3, 4, 7, 12, 19, 33, 59, 102, 181, 329, 593, 1076, 1979, 3643, 6723, 12494, 23289, 43498, 81557, 153356, 288925, 545687, 1032997, 1958978, 3721819, 7083716, 13503311, 25778612, 49283755, 94345179, 180830195, 347006694, 666636809, 1282024484, 2467964693
Offset: 0
G.f.: A(x) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 7*x^6 + 12*x^7 + 19*x^8 + ...
The logarithm of the g.f. begins:
log(A(x)) = ((1-x) + x)*x + ((1-x)^2 + 2^2*x*(1-x) + x^2)*x^2/2 +
((1-x)^3 + 3^2*x*(1-x)^2 + 3^2*x^2*(1-x) + x^3)*x^3/3 +
((1-x)^4 + 4^2*x*(1-x)^3 + 6^2*x^2*(1-x)^2 + 4^2*x^3*(1-x) + x^4)*x^4/4 +
((1-x)^5 + 5^2*x*(1-x)^4 + 10^2*x^2*(1-x)^3 + 10^2*x^3*(1-x)^2 + 5^2*x^4*(1-x) + x^5)*x^5/5 + ...
Explicitly,
log(A(x)) = x + x^2/2 + 4*x^3/3 + 5*x^4/4 + 6*x^5/5 + 16*x^6/6 + 29*x^7/7 + 45*x^8/8 + 94*x^9/9 + 186*x^10/10 + ... + A217464(n)*x^n/n + ...
-
CoefficientList[Series[((1 - x) - Sqrt[(1 - x)^2 - 4*x^3*(1 - x)])/(2*x^3 *(1 - x)), {x,0,50}], x] (* G. C. Greubel, Jan 24 2017 *)
-
a(n):=sum(sum(binomial(n-2*q-2,n-r-q)*binomial(q+1,r-1)*binomial(q+1,r) ,r,0,q+1)/(q+1), q,0,n); /* Vladimir Kruchinin, Jan 22 2019 */
a(n):=sum((binomial(2*m,m)*binomial(n-2*m+1,n-3*m))/(n-2*m+1),m,0,n/3);
/*Vladimir Kruchinin, Jan 27 2022 */
-
{a(n)=polcoeff(exp(sum(m=1,n+1,x^m/m*sum(k=0,m,binomial(m,k)^2*x^k*(1-x)^(m-k) + x*O(x^n)))),n)}
-
{a(n)=polcoeff(2/(1-x+sqrt((1-x)^2-4*x^3*(1-x) +x*O(x^n))),n)}
for(n=0,40,print1(a(n),", "))
-
a(n) = sum(k=0, n\3, binomial(n-2*k, k)*binomial(2*k, k)/(k+1)); \\ Seiichi Manyama, Jan 22 2023
A217615
G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k)^2 * x^k*(1-x)^(n-k).
Original entry on oeis.org
1, 1, 1, 3, 5, 7, 15, 29, 49, 95, 187, 345, 659, 1289, 2465, 4739, 9237, 17911, 34715, 67705, 132063, 257477, 503309, 984983, 1927895, 3778017, 7411237, 14544967, 28565661, 56144615, 110406527, 217225533, 427636561, 842256047, 1659600955, 3271579689, 6451913519
Offset: 0
G.f.: A(x) = 1 + x + x^2 + 3*x^3 + 5*x^4 + 7*x^5 + 15*x^6 + 29*x^7 + 49*x^8 + ...
where the g.f. equals the series:
A(x) = 1 +
x*((1-x) + x) +
x^2*((1-x)^2 + 2^2*x*(1-x) + x^2) +
x^3*((1-x)^3 + 3^2*x*(1-x)^2 + 3^2*x^2*(1-x) + x^3) +
x^4*((1-x)^4 + 4^2*x*(1-x)^3 + 6^2*x^2*(1-x)^2 + 4^2*x^3*(1-x) + x^4) +
x^5*((1-x)^5 + 5^2*x*(1-x)^4 + 10^2*x^2*(1-x)^3 + 10^2*x^3*(1-x)^2 + 5^2*x^4*(1-x) + x^5) + ...
-
a := n -> `if`(n < 4, [1, 1, 1, 3][n+1], hypergeom([1/2, (1-n)/3, (2-n)/3, -n/3], [1, (1-n)/2, -n/2], -27)):
seq(simplify(a(n)), n=0..36); # Peter Luschny, Oct 09 2019
-
CoefficientList[Series[1/Sqrt[(1-x+2*x^2)^2-4*x^2], {x, 0, 20}], x] (* Vaclav Kotesovec, Sep 16 2013 *)
-
{a(n)=polcoeff(sum(m=0, n+1, x^m*sum(k=0, m, binomial(m, k)^2*x^k*(1-x)^(m-k) + x*O(x^n))), n)}
for(n=0,40,print1(a(n),", "))
-
a(n)={sum(k=0, n\2, binomial(2*k, k) * binomial(n-2*k, k))} \\ Andrew Howroyd, Oct 09 2019
A371570
Number of binary necklaces of length n which have more 01 than 00 substrings.
Original entry on oeis.org
0, 0, 2, 3, 6, 15, 29, 56, 118, 237, 467, 946, 1905, 3796, 7618, 15303, 30614, 61319, 122951, 246202, 492971, 987542, 1977560, 3959289, 7927969, 15873190, 31776708, 63614397, 127346134, 254908115, 510233309, 1021273672, 2044071894, 4091064805, 8187770675
Offset: 0
a(3) = 3: 011, 101, 110.
a(4) = 6: 0101, 0111, 1010, 1011, 1101, 1110.
a(5) = 15: 00101, 01001, 01010, 01011, 01101, 01111, 10010, 10100, 10101, 10110, 10111, 11010, 11011, 11101, 11110.
Cf.
A217464 (necklaces with equal 00 and 01),
A371668 (necklaces with more 00 than 01).
Cf.
A126869 (necklaces with equal 00 and 11, for n>=1),
A058622 (necklaces with more 00 than 11).
Cf.
A163493 (strings with equal 00 and 01),
A371358 (strings with more 00 than 01),
A371564 (strings with more 01 than 00).
-
tup[n_] := Tuples[{0, 1}, n];
tupToNec[n_] := Map[Append[#, #[[1]]] &, tup[n]];
cou[lst_List] := Count[lst, {0, 1}] > Count[lst, {0, 0}];
par[lst_List] := Partition[lst, 2, 1];
a[0] = 0;
a[n_] := Map[cou, Map[par, tupToNec[n]]] // Boole // Total;
Monitor[Table[a[n], {n, 0, 18}], {n, Table[a[m], {m, 0, n - 1}]}]
A371668
Number of binary necklaces of length n which have more 00 than 01 substrings.
Original entry on oeis.org
0, 1, 1, 1, 5, 11, 19, 43, 93, 181, 371, 771, 1547, 3121, 6357, 12821, 25805, 52123, 105031, 211243, 425215, 855457, 1719257, 3455153, 6942387, 13942111, 27993317, 56197117, 112785797, 226311535, 454043339, 910778203, 1826666093, 3663122277, 7344953123
Offset: 0
a(3) = 1: 000.
a(4) = 5: 0000, 0001, 0010, 0100, 1000.
a(5) = 11: 00000, 00001, 00010, 00011, 00100, 00110, 01000, 01100, 10000, 10001, 11000.
Cf.
A217464 (necklaces with equal 00 and 01),
A371570 (necklaces with more 01 than 00).
Cf.
A126869 (necklaces with equal 00 and 11, for n>=1),
A058622 (necklaces with more 00 than 11).
Cf.
A163493 (strings with equal 00 and 01),
A371358 (strings with more 00 than 01),
A371564 (strings with more 01 than 00).
-
tup[n_] := Tuples[{0, 1}, n];
tupToNec[n_] := Map[Append[#, #[[1]]] &, tup[n]];
cou[lst_List] := Count[lst, {0, 0}] > Count[lst, {0, 1}];
par[lst_List] := Partition[lst, 2, 1];
a[0] = 0;
a[n_] := a[n] = Map[cou, Map[par, tupToNec[n]]] // Boole // Total;
Monitor[Table[a[n], {n, 0, 18}], {n, Table[a[m], {m, 0, n - 1}]}]
Showing 1-4 of 4 results.
Comments