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.

Showing 1-5 of 5 results.

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

Original entry on oeis.org

0, 1, 11, 183, 5871, 375775, 48099263, 12313411455, 6304466665215, 6455773865180671, 13221424875890015231, 54154956291645502388223, 443637401941159955564326911, 7268555193403964711965932118015, 238176016577461115681699663643131903
Offset: 0

Views

Author

Alex Ratushnyak, Aug 05 2012

Keywords

Examples

			Binary representations:
a(0): 0;
a(1): 1;
a(2): 1011;
a(3): 10110111;
a(4): 1011011101111;
a(5): 1011011101111011111;
a(6): 10110111011110111110111111;
a(7): 1011011101111011111011111101111111;
a(8): 1011011101111011111011111101111111011111111, etc.
		

Crossrefs

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

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,FromDigits[Join[IntegerDigits[a,2],PadRight[{0},n+2,1]],2]}; NestList[nxt,{0,0},15][[All,2]] (* Harvey P. Dale, Feb 11 2023 *)
  • Python
    a = 0
    for n in range(1, 10):
        print(a, end=', ')
        a = a*(2**(n+1)) + 2**n - 1

Formula

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

A076127 n-th term is binary string of length t_n with 1's at positions t_i, where t_n = n-th triangular number.

Original entry on oeis.org

0, 1, 101, 101001, 1010010001, 101001000100001, 101001000100001000001, 1010010001000010000010000001, 101001000100001000001000000100000001, 101001000100001000001000000100000001000000001
Offset: 0

Views

Author

Kyle Hunter (hunterk(AT)raytheon.com), Oct 31 2002

Keywords

Examples

			For example, the first 4 strings are: '1' (length 1, nonzero index 1), '101' (length 3, nonzero indices 1,3), '101001' (length 6, nonzero indices 1,3,6) '1010010001' (length 10, nonzero indices 1,3,6,10)
		

Crossrefs

Programs

  • MATLAB
    function ans=bstn(n) if(n==0), ans=0; else, ans=10^n*bstn(n-1)
  • Mathematica
    f[n_] := Block[{a = {1}}, Do[a = Join[a, Table[0, {i}], {1}], {i, 1, n}]; FromDigits[a]]; Table[ f[n], {n, 0, 8}]
  • PARI
    a(n)=if(n<1,0,1+a(n-1)*10^n)
    
  • PARI
    a(n)=subst( Polrev( Vec( sum(k=1, n, x^(k*(k+1)/2)))), x, 10)
    

Formula

if(n==0), a(0)=0; else a(n)=10^n*a(n-1)+1

Extensions

Edited and extended by Robert G. Wilson v, Oct 31 2002

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.

A225609 Recurrence a(n) = 2^n*a(n-1) + a(n-2) with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 4, 33, 532, 17057, 1092180, 139816097, 35794013012, 18326674478241, 18766550459731796, 38433913668205196449, 157425329151518944386900, 1289628334843156860622681249, 21129270795495611155960953970516, 692363946716428521201685400328549537
Offset: 0

Views

Author

Vaclav Kotesovec, Aug 22 2013

Keywords

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n]==2^n*a[n-1]+a[n-2],a[0]==0,a[1]==1},a,{n,0,15}]

Formula

a(n) ~ c * 2^(n^2/2 + n/2), where c = 0.52087674149344124670486211129137...

A228467 Recurrence a(n) = 2^n*a(n-1) - a(n-2) with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 4, 31, 492, 15713, 1005140, 128642207, 32931399852, 16860748082017, 17265373104585556, 35359467257443136671, 144832360621113983218860, 1186466662848698493085764449, 19439069659280715489603181513556, 636979433408843822314618558750438559
Offset: 0

Views

Author

Vaclav Kotesovec, Aug 22 2013

Keywords

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n]==2^n*a[n-1]-a[n-2],a[0]==0,a[1]==1},a,{n,0,15}]
    nxt[{n_,a_,b_}]:={n+1,b,b*2^(n+1)-a}; NestList[nxt,{1,0,1},20][[All,2]] (* Harvey P. Dale, Jul 02 2022 *)

Formula

a(n) ~ c * 2^(n^2/2 + n/2), where c = 0.4792100640621967581293535977698228585...
Showing 1-5 of 5 results.