OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3322
Index entries for linear recurrences with constant coefficients, signature (4,-6,8,-10,4).
FORMULA
G.f.: (x^4-4*x^3+2*x^2-2*x+1)/((1-2*x)*(2*x^4-4*x^3+2*x^2-2*x+1)).
a(n) = Sum_{k>=0} A118869(n,2*k).
EXAMPLE
a(4) = 15 = 2^4 - 1: 0101 is not counted.
a(5) = 28 = 2^5 - 4: 00101, 10101, 01010, 01011 are not counted.
MAPLE
a:= n-> 2^n-(<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>
, <0|0|0|0|1>, <4|-10|8|-6|4>>^n)[1, 5]:
seq(a(n), n=0..39);
MATHEMATICA
LinearRecurrence[{4, -6, 8, -10, 4}, {1, 2, 4, 8, 15}, 50] (* Harvey P. Dale, Mar 07 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Feb 06 2020
STATUS
approved