login
A147539
Numbers whose binary representation is the concatenation of n 1's, 2n-1 digits 0 and n 1's.
6
5, 99, 1799, 30735, 507935, 8257599, 133169279, 2139095295, 34292630015, 549218943999, 8791798056959, 140703128621055, 2251524935786495, 36026597995724799, 576443160117411839, 9223231299366486015
OFFSET
1,1
COMMENTS
a(n) is the number whose binary representation is A138120(n).
FORMULA
a(n) = 2^n - 1 + 2^(4*n-1) - 2^(3*n-1). - R. J. Mathar, Nov 09 2008
G.f.: x*(5 -36*x +136*x^2)/((1-x)*(1-2*x)*(1-8*x)*(1-16*x)). - Colin Barker, Nov 04 2012
a(n) = 27*a(n-1) - 202*a(n-2) + 432*a(n-3) - 256*a(n-4). - Wesley Ivan Hurt, Jan 11 2017
MAPLE
A147539:=n->2^n-1+2^(4*n-1)-2^(3*n-1): seq(A147539(n), n=1..30); # Wesley Ivan Hurt, Jan 11 2017
MATHEMATICA
Table[FromDigits[Join[Table[1, {n}], Table[0, {2n - 1}], Table[1, {n}]], 2], {n, 1, 20}] (* Stefan Steinerberger, Nov 11 2008 *)
LinearRecurrence[{27, -202, 432, -256}, {5, 99, 1799, 30735}, 20] (* Harvey P. Dale, Aug 28 2017 *)
PROG
(Magma) [2^n-1+2^(4*n-1)-2^(3*n-1) : n in [1..20]]; // Wesley Ivan Hurt, Jan 11 2017
(PARI) vector(20, n, 2^(4*n-1) -2^(3*n-1) +2^n -1) \\ G. C. Greubel, Jan 12 2020
(Sage) [2^(4*n-1) -2^(3*n-1) +2^n -1 for n in (1..20)] # G. C. Greubel, Jan 12 2020
(GAP) List([1..20], n-> 2^(4*n-1) -2^(3*n-1) +2^n -1); # G. C. Greubel, Jan 12 2020
CROSSREFS
Cf. A138120.
Sequence in context: A301307 A277418 A318061 * A266610 A156276 A322715
KEYWORD
base,easy,nonn
AUTHOR
Omar E. Pol, Nov 06 2008
EXTENSIONS
Extended by R. J. Mathar and Stefan Steinerberger, Nov 09 2008
STATUS
approved