login
Binary representation of 4^n - 2^(n+1) - 1.
1

%I #23 Oct 03 2016 15:24:12

%S 111,101111,11011111,1110111111,111101111111,11111011111111,

%T 1111110111111111,111111101111111111,11111111011111111111,

%U 1111111110111111111111,111111111101111111111111,11111111111011111111111111,1111111111110111111111111111

%N Binary representation of 4^n - 2^(n+1) - 1.

%H Colin Barker, <a href="/A244845/b244845.txt">Table of n, a(n) for n = 2..500</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Carol_number">Carol number</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (111,-1110,1000).

%F a(n) = 111*a(n-1)-1110*a(n-2)+1000*a(n-3).

%F a(n) = (-1-9*10^(1+n)+100^n)/9.

%F G.f.: x^2*(89000*x^2-88790*x-111) / ((x-1)*(10*x-1)*(100*x-1)).

%e a(3) is 101111 because A093112(3) = 47 which is 101111 in base 2.

%t Table[FromDigits[IntegerDigits[4^n-2^(n+1)-1,2]],{n,2,15}] (* _Harvey P. Dale_, Oct 03 2016 *)

%o (PARI) vector(100, n, (100^(n+1)-9*10^(2+n)-1)/9)

%o (PARI) Vec(x^2*(89000*x^2-88790*x-111)/((x-1)*(10*x-1)*(100*x-1)) + O(x^100))

%o (PARI) a(n) = subst(Pol(binary(4^n-2^(n+1)-1)), x, 10); \\ _Michel Marcus_, Jul 08 2014

%Y Cf. A093112.

%K nonn,base,easy

%O 2,1

%A _Colin Barker_, Jul 07 2014