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.
1, 5, 83, 5319, 1361679, 1394359327, 5711295803455, 93573870443806847, 6132457173405325525247, 1607586853265165654490350079, 1685676992249374341322873324438527, 7070241751299519797307892876185811552255
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..57
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.
Comments