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-3 of 3 results.

A005203 Fibonacci numbers (or rabbit sequence) converted to decimal.

Original entry on oeis.org

0, 1, 2, 5, 22, 181, 5814, 1488565, 12194330294, 25573364166211253, 439347050970302571643057846, 15829145720289447797800874537321282579904181, 9797766637414564027586288536574448245991597197836000123235901011048118
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the denominator of the continued fraction [2^F(0), 2^F(1), 2^F(2), 2^F(3), 2^F(4), ..., 2^F(n-1)] for n>0. For the numerator, see A063896. - Chinmay Dandekar and Greg Dresden, Sep 11 2020

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    rewrite_0to1_1to10_n_i_times := proc(n,i) local z,j; z := n; j := i; while(j > 0) do z := rewrite_0to1_1to10(z); j := j - 1; od; RETURN(z); end;
    rewrite_0to1_1to10 := proc(n) option remember; if(n < 2) then RETURN(n + 1); else RETURN(((2^(1+(n mod 2))) * rewrite_0to1_1to10(floor(n/2))) + (n mod 2) + 1); fi; end;
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = a[n-1]*2^Fibonacci[n-1] + a[n-2]; Table[a[n], {n, 0, 12}] (* Jean-François Alcover, Jul 27 2011 *)
  • Python
    def A005203(n):
        s = '0'
        for i in range(n):
            s = s.replace('0','a').replace('1','10').replace('a','1')
        return int(s,2) # Chai Wah Wu, Apr 24 2025

Formula

a(0) = 0, a(1) = 1, a(n) = a(n-1) * 2^F(n-1) + a(n-2).
a(n) = rewrite_0to1_1to10_n_i_times(0, n) [ Each 0->1, 1->10 in binary expansion ]

Extensions

Comments and more terms from Antti Karttunen, Mar 30 1999

A048722 Reversed binary packing of Fibonacci sequence A000045.

Original entry on oeis.org

0, 1, 3, 7, 29, 233, 7457, 1908993, 15638470657, 32796250015268865, 563435284988077103288156161, 20299895516157546089301785397257605216206849, 12565026726380593749379544715414757684521993402717913413208480665305089
Offset: 0

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Crossrefs

Formula

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

A036571 Binary packing of Connell sequence (shifted once right).

Original entry on oeis.org

0, 1, 3, 11, 27, 91, 347, 859, 2907, 11099, 43867, 109403, 371547, 1420123, 5614427, 22391643, 55946075, 190163803, 727034715, 2874518363, 11464452955, 45824191323, 114543668059, 389421575003
Offset: 0

Views

Author

Keywords

Comments

Binary representation of n has 1's at positions specified by Connell sequence (A001614).

Examples

			347=101011011 in binary, with 1's at positions 1,2,4,5,7,9.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from math import isqrt
    def A036571_gen(): # generator of terms
        c = 0
        for n in count(1):
            yield c
            c += 1<<(m:=n<<1)-(k:=isqrt(m))-int((m<<2)>(k<<2)*(k+1)+1)-1
    A036571_list = list(islice(A036571_gen(),25)) # Chai Wah Wu, Jul 26 2022

Formula

a(0)=0, a(n) = a(n-1) + 2^((2*n - floor((1/2)*(1 + sqrt(8*n - 7)))) - 1).
Showing 1-3 of 3 results.