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.

A215172 a(0)=1, a(n) = a(n-1)*4^n + 2^n - 1. That is, add n 0's and n 1's to the binary representation of previous term.

Original entry on oeis.org

1, 5, 83, 5319, 1361679, 1394359327, 5711295803455, 93573870443806847, 6132457173405325525247, 1607586853265165654490350079, 1685676992249374341322873324438527, 7070241751299519797307892876185811552255
Offset: 0

Views

Author

Alex Ratushnyak, Aug 05 2012

Keywords

Comments

Binary representations:
a(0) 1
a(1) 101
a(2) 1010011
a(3) 1010011000111
a(4) 101001100011100001111
a(5) 1010011000111000011110000011111
a(6) 1010011000111000011110000011111000000111111
a(7) 101001100011100001111000001111100000011111100000001111111
a(8) 1010011000111000011110000011111000000111111000000011111110000000011111111

Crossrefs

Cf. A076131: add n 0's and one 1 to the binary representation of previous term.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,FromDigits[Join[IntegerDigits[a],PadRight[{},n,0], PadRight[ {},n,1]]]}; FromDigits[IntegerDigits[#],2]&/@NestList[nxt,{1,1},12][[All,2]] (* Harvey P. Dale, Apr 30 2019 *)
  • Python
    a = 1
    for n in range(1,13):
        print(a, end=', ')
        a = a*(4**n) + 2**n - 1

Formula

a(0)=1, a(n) = a(n-1)*4^n + 2^n - 1.