OFFSET
0,2
COMMENTS
Number of terms of A164710 with exactly n+1 binary digits. - Robert Israel, Nov 09 2015
From Gus Wiseman, Jun 23 2025: (Start)
This is the number of subsets of {1..n} with all equal lengths of runs of consecutive elements increasing by 1. For example, the runs of S = {1,2,5,6,8,9} are ((1,2),(5,6),(8,9)), with lengths (2,2,2), so S is counted under a(9). The a(0) = 1 through a(4) = 14 subsets are:
{} {} {} {} {}
{1} {1} {1} {1}
{2} {2} {2}
{1,2} {3} {3}
{1,2} {4}
{1,3} {1,2}
{2,3} {1,3}
{1,2,3} {1,4}
{2,3}
{2,4}
{3,4}
{1,2,3}
{2,3,4}
{1,2,3,4}
(End)
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
0110 is a "good" word because the length of both its runs of 0's is 1.
Words of the form 11...1 are good words because the condition is vacuously satisfied.
a(5) = 24 because there are 32 length 5 binary words but we do not count: 00010, 00101, 00110, 01000, 01001, 01100, 10010, 10100.
MAPLE
a:= n-> 1 + add(add((d-> binomial(d+j, d))(n-(i*j-1))
, j=1..iquo(n+1, i)), i=2..n+1):
seq(a(n), n=0..50); # Alois P. Heinz, Jun 11 2014
MATHEMATICA
nn=30; Prepend[Map[Total, Transpose[Table[Drop[CoefficientList[Series[ (1+x^k)/(1-x-x^(k+1))-1/(1-x), {x, 0, nn}], x], 1], {k, 1, nn}]]], 0]+1
Table[Length[Select[Subsets[Range[n]], SameQ@@Length/@Split[#, #2==#1+1&]&]], {n, 0, 10}] (* Gus Wiseman, Jun 23 2025 *)
KEYWORD
nonn
AUTHOR
Geoffrey Critzer, Jun 11 2014
STATUS
approved
