OFFSET
1,1
COMMENTS
a(n) is the number whose binary representation is A138119(n).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (12,-32).
FORMULA
a(n) = 2*A016152(n). - Omar E. Pol, Nov 13 2008
From Colin Barker, Nov 04 2012: (Start)
a(n) = 12*a(n-1) - 32*a(n-2).
G.f.: 2*x/((1-4*x)*(1-8*x)). (End)
MAPLE
seq(2^(2*n-1)*(2^n -1), n=1..20); # G. C. Greubel, Jan 12 2020
MATHEMATICA
Table[FromDigits[Join[Table[1, {n}], Table[0, {2n - 1}]], 2], {n, 1, 20}] (* Stefan Steinerberger, Nov 11 2008 *)
PROG
(PARI) vector(20, n, 2^(2*n-1)*(2^n -1)) \\ G. C. Greubel, Jan 12 2020
(Magma) [2^(2*n-1)*(2^n -1): n in [1..20]]; // G. C. Greubel, Jan 12 2020
(Sage) [2^(2*n-1)*(2^n -1) for n in (1..20)] # G. C. Greubel, Jan 12 2020
(GAP) List([1..20], n-> 2^(2*n-1)*(2^n -1)); # G. C. Greubel, Jan 12 2020
(Python)
def a(n): return ((1 << n) - 1) << (2*n-1)
print([a(n) for n in range(1, 22)]) # Michael S. Branicky, Feb 24 2021
CROSSREFS
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