cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A147538 Numbers whose binary representation is the concatenation of n 1's and 2n-1 digits 0.

Original entry on oeis.org

2, 24, 224, 1920, 15872, 129024, 1040384, 8355840, 66977792, 536346624, 4292870144, 34351349760, 274844352512, 2198889037824, 17591649173504, 140735340871680, 1125891316908032, 9007164895002624, 72057456598974464, 576460202547609600
Offset: 1

Views

Author

Omar E. Pol, Nov 06 2008

Keywords

Comments

a(n) is the number whose binary representation is A138119(n).

Crossrefs

Cf. A138119.
Cf. A016152. - Omar E. Pol, Nov 13 2008

Programs

  • GAP
    List([1..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
    
  • 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 *)
  • PARI
    vector(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
  • Sage
    [2^(2*n-1)*(2^n -1) for n in (1..20)] # G. C. Greubel, Jan 12 2020
    

Formula

a(n) = 2^(2*n-1)*(2^n -1) = A081294(n)*A000225(n). - R. J. Mathar, Nov 09 2008
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)

Extensions

Extended by R. J. Mathar and Stefan Steinerberger, Nov 09 2008