A135491
Number of ways to toss a coin n times and not get a run of four.
Original entry on oeis.org
1, 2, 4, 8, 14, 26, 48, 88, 162, 298, 548, 1008, 1854, 3410, 6272, 11536, 21218, 39026, 71780, 132024, 242830, 446634, 821488, 1510952, 2779074, 5111514, 9401540, 17292128, 31805182, 58498850, 107596160, 197900192, 363995202, 669491554, 1231386948, 2264873704
Offset: 0
James R FitzSimons (cherry(AT)getnet.net), Feb 07 2008
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Elena Barcucci, Antonio Bernini, Stefano Bilotta, Renzo Pinzani, Non-overlapping matrices, arXiv:1601.07723 [cs.DM], 2016. See column 2 of Table 2 p. 11.
- Elena Barcucci, Antonio Bernini, Stefano Bilotta and Renzo Pinzani, Non-overlapping matrices, Theoretical Computer Science, Vol. 658, Part A (2017), 36-45.
- B. Chaffin, J. P. Linderman, N. J. A. Sloane and Allan Wilks, On Curling Numbers of Integer Sequences, arXiv:1212.6102 [math.CO], 2012-2013.
- B. Chaffin, J. P. Linderman, N. J. A. Sloane and Allan Wilks, On Curling Numbers of Integer Sequences, Journal of Integer Sequences, Vol. 16 (2013), Article 13.4.3.
- Emrah Kılıç, Talha Arıkan, Evaluation of Hessenberg determinants with recursive entries: generating function approach, Filomat (2017) Vol. 31, Issue 15, pp. 4945-4962.
- A. V. Zharkova, Inaccesible States in Dynamic Systems Associated with Paths and Cycles, Izv. Saratov Univ. (N.S.), Ser. Math. Mech. Inform., 11 (2011), 116-122.
- Index entries for linear recurrences with constant coefficients, signature (1, 1, 1).
-
LinearRecurrence[{1, 1, 1}, {1, 2, 4, 8}, 36] (* Vladimir Joseph Stephan Orlovsky, Jul 23 2011; first term 1 added by Georg Fischer, Apr 02 2019 *)
-
Vec(1-2*x*(1+x+x^2)/(-1+x+x^2+x^3) + O(x^100)) \\ Altug Alkan, Dec 10 2015
A249530
T(n,k)=Number of length n+5 0..k arrays with no six consecutive terms having five times any element equal to the sum of the remaining five.
Original entry on oeis.org
62, 606, 122, 3492, 1572, 240, 13580, 12156, 4120, 472, 40950, 59720, 42400, 10834, 928, 104562, 217170, 263156, 147984, 28500, 1824, 235196, 655352, 1154444, 1161050, 516652, 74886, 3586, 480912, 1699092, 4116620, 6143828, 5126096
Offset: 1
Some solutions for n=3 k=4
..1....1....0....1....0....1....1....0....1....0....0....1....0....0....1....1
..0....1....0....3....3....4....4....4....0....0....0....3....2....4....2....2
..1....4....0....3....0....0....1....0....3....3....1....0....0....4....3....0
..2....4....1....1....2....2....1....0....4....1....0....1....4....1....0....3
..2....0....3....1....0....1....0....0....2....1....1....1....1....4....2....4
..4....0....0....3....4....0....3....2....4....4....1....1....0....0....1....3
..2....1....1....2....0....2....3....2....2....3....1....1....1....1....1....3
..0....3....4....1....0....2....0....2....4....0....4....1....1....1....4....0
A135492
Number of ways to toss a coin n times and not get a run of five.
Original entry on oeis.org
1, 2, 4, 8, 16, 30, 58, 112, 216, 416, 802, 1546, 2980, 5744, 11072, 21342, 41138, 79296, 152848, 294624, 567906, 1094674, 2110052, 4067256, 7839888, 15111870, 29129066, 56148080, 108228904, 208617920, 402123970, 775118874, 1494089668, 2879950432
Offset: 0
James R FitzSimons (cherry(AT)getnet.net), Feb 07 2008
-
a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4]; a[1] = 2; a[2] = 4; a[3] = 8; a[4] = 16; Array[a, 33] (* Robert G. Wilson v, Feb 10 2008 *)
LinearRecurrence[{1, 1, 1, 1}, {2, 4, 8, 16}, 25] (* G. C. Greubel, Oct 15 2016 *)
-
a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 1,1,1,1]^(n-1)*[2;4;8;16])[1,1] \\ Charles R Greathouse IV, Oct 17 2016
A277828
Least number of tosses of a fair coin needed to have an even chance or better of getting a run of at least m consecutive heads or consecutive tails.
Original entry on oeis.org
1, 2, 5, 11, 23, 45, 90, 179, 357, 712, 1422, 2842, 5681, 11360, 22716, 45430, 90856, 181709, 363413, 726822, 1453640, 2907276, 5814546, 11629086, 23258166, 46516327, 93032647
Offset: 1
- Marcus du Sautoy, The Number Mysteries, Fourth Estate, 2011, pages 126 - 127.
-
a:= proc(n) option remember; local l, j; Digits:= 50;
if n<3 then n else l:= 0$n;
for j from 0 while l[n]<1/2 do l:= seq(
(`if`(i=1, 1.0, l[i-1])+l[n-1])/2, i=1..n)
od; j
fi
end:
seq(a(n), n=1..16); # Alois P. Heinz, Nov 01 2016
-
a[n_] := a[n] = Module[{l, j}, If[n < 3, n, l = Table[0, {n}]; For[j = 0, l[[n]] < 1/2, j++, l = Table[(If[i == 1, 1, l[[i - 1]]] + l[[n - 1]])/2, {i, n}]]; j]];
Array[a, 16] (* Jean-François Alcover, May 31 2019, after Alois P. Heinz *)
-
step(v)=my(n=#v); concat([sum(i=1,n-1,v[i])], concat(vector(n-2,i, v[i]), 2*v[n]+v[n-1]))
a(n)=if(n<3, return(n)); my(v=vector(n), flips=1, needed=1/2); v[1]=1; while(v[n]Charles R Greathouse IV, Nov 02 2016
-
a(n)=if(n<3, return(n)); my(M=2^(n-1),v=powers(2,n-1)[2..n],i=1,m=n); while(1, v[i]=vecsum(v); if(v[i]<=M, return(m)); if(i++>#v, i=1); M*=2; m++) \\ Charles R Greathouse IV, Nov 02 2016
-
def a(m):
if m == 1:
return 1
g = [2**i for i in range(1, m)]
sg, lim, n = sum(g), 2**(m-1), m
while True:
g.append(sg)
sg <<= 1
sg -= g.pop(0)
if g[-1] <= lim:
return n
lim <<= 1
n += 1
print([a(i) for i in range(1, 15)])
# Andrey Zabolotskiy, Nov 01 2016
Showing 1-4 of 4 results.
Comments