A173593 Numbers having in binary representation exactly two ones in three consecutive digits.
3, 5, 6, 11, 13, 22, 27, 45, 54, 91, 109, 182, 219, 365, 438, 731, 877, 1462, 1755, 2925, 3510, 5851, 7021, 11702, 14043, 23405, 28086, 46811, 56173, 93622, 112347, 187245, 224694, 374491, 449389, 748982, 898779, 1497965, 1797558, 2995931, 3595117
Offset: 1
Examples
a(10) = 91 = 1011011_2 a(11) = 109 = 1101101_2 a(12) = 182 = 10110110_2 a(13) = 219 = 11011011_2 a(14) = 365 = 101101101_2 a(15) = 438 = 110110110_2 a(16) = 731 = 1011011011_2 a(17) = 877 = 1101101101_2 a(18) = 1462 = 10110110110_2 a(19) = 1755 = 11011011011_2 a(20) = 2925 = 101101101101_2
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 2, 1, 0, -2).
Programs
-
Mathematica
LinearRecurrence[{0, 2, 1, 0, -2}, {3, 5, 6, 11, 13}, 50] (* Jean-François Alcover, Feb 17 2018 *)
Formula
From R. J. Mathar, Feb 24 2010: (Start)
a(n) = 2*a(n-2) + a(n-3) - 2*a(n-5).
G.f.: x*(-3-5*x+2*x^3+4*x^4)/ ((1-x) * (1+x+x^2) * (2*x^2-1)). (End)
Comments