OFFSET
2,1
LINKS
Colin Barker, Table of n, a(n) for n = 2..500
Wikipedia, Carol number
Index entries for linear recurrences with constant coefficients, signature (111,-1110,1000).
FORMULA
a(n) = 111*a(n-1)-1110*a(n-2)+1000*a(n-3).
a(n) = (-1-9*10^(1+n)+100^n)/9.
G.f.: x^2*(89000*x^2-88790*x-111) / ((x-1)*(10*x-1)*(100*x-1)).
EXAMPLE
a(3) is 101111 because A093112(3) = 47 which is 101111 in base 2.
MATHEMATICA
Table[FromDigits[IntegerDigits[4^n-2^(n+1)-1, 2]], {n, 2, 15}] (* Harvey P. Dale, Oct 03 2016 *)
PROG
(PARI) vector(100, n, (100^(n+1)-9*10^(2+n)-1)/9)
(PARI) Vec(x^2*(89000*x^2-88790*x-111)/((x-1)*(10*x-1)*(100*x-1)) + O(x^100))
(PARI) a(n) = subst(Pol(binary(4^n-2^(n+1)-1)), x, 10); \\ Michel Marcus, Jul 08 2014
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Colin Barker, Jul 07 2014
STATUS
approved