%I #28 Apr 14 2024 04:44:26
%S 0,0,0,0,0,0,1,3,8,20,48,112,256,575,1275,2798,6088,13152,28240,60320,
%T 128257,271623,573216,1205880,2529680,5293264,11050496,23021311,
%U 47868151,99357390,205897508,426042552,880346272,1816750912,3744698241,7709963787,15857441096,32582726508,66886894112
%N a(n) is the number of n-tosses having a run of 6 or more heads for a fair coin (i.e., probability is a(n)/2^n).
%C a(n-1) is the number of compositions of n with at least one part >=7. - _Joerg Arndt_, Aug 06 2012
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-1,-1,-1,-1,-2).
%F G.f.: x^6/ ( (2*x-1)*(x^6+x^5+x^4+x^3+x^2+x-1) ). - _Joerg Arndt_, Aug 06 2012
%F a(n) = 2^n - A001592(n+6). - _R. J. Mathar_, Aug 06 2012
%t LinearRecurrence[{3,-1,-1,-1,-1,-1,-2},{0,0,0,0,0,0,1},40] (* _Harvey P. Dale_, Dec 06 2018 *)
%o (PARI)
%o N=66; x='x+O('x^N);
%o gf = (1-x)/(1-2*x); /* A011782(n): compositions of n */
%o gf -= 1/(1 - (x+x^2+x^3+x^4+x^5+x^6)); /* A001592(n+5): compositions of n into parts <=6 */
%o v143662=Vec(gf + 'a0); v143662[1]=0; /* kludge to get all terms */
%o v143662 /* show terms */
%o /* _Joerg Arndt_, Aug 06 2012 */
%K nonn
%O 0,8
%A DoZerg (daidodo(AT)gmail.com), Aug 28 2008