A152775 Numbers with 3n binary digits where every run length is 3, written in binary.
111, 111000, 111000111, 111000111000, 111000111000111, 111000111000111000, 111000111000111000111, 111000111000111000111000, 111000111000111000111000111, 111000111000111000111000111000
Offset: 1
Examples
n ... a(n) .............. A152776(n) 1 ... 111 ............... 7 2 ... 111000 ............ 56 3 ... 111000111 ......... 455 4 ... 111000111000 ...... 3640 5 ... 111000111000111 ... 29127
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..100
- Index entries for linear recurrences with constant coefficients, signature (1000,1,-1000).
Programs
-
Mathematica
FromDigits/@Table[Flatten[PadRight[{},n,{a,b}]/.{a->{1,1,1},b->{0,0,0}}],{n,10}] (* Harvey P. Dale, Mar 23 2012 *) CoefficientList[Series[111/((x - 1) (x + 1) (1000 x - 1)), {x, 0, 20}], x] (* Vincenzo Librandi, Apr 21 2014 *)
-
PARI
Vec(111*x / ((x-1)*(x+1)*(1000*x-1)) + O(x^100)) \\ Colin Barker, Apr 20 2014
Formula
From Colin Barker, Apr 20 2014: (Start)
a(n) = (-1001-999*(-1)^n+2^(4+3*n)*125^(1+n))/18018.
a(n) = 1000*a(n-1)+a(n-2)-1000*a(n-3).
G.f.: 111*x / ((x-1)*(x+1)*(1000*x-1)). (End).
Comments