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

A303877 Expansion of 1 in base Pi, 1 = Sum_{n>=0} a(n)/Pi^(n+1).

Original entry on oeis.org

3, 0, 1, 1, 0, 2, 1, 1, 1, 0, 0, 2, 0, 2, 2, 1, 1, 3, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 1, 0, 2, 2, 2, 2, 1, 2, 2, 1, 2, 0, 2, 0, 1, 2, 1, 2, 0, 2, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 1, 2, 1, 0, 1, 2, 0, 0, 0, 0, 2, 2, 1, 1, 0, 0, 2, 2, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 2, 2, 1, 0, 0, 1, 1, 0, 2, 2, 0, 2, 2, 0, 2, 0, 2, 1, 1
Offset: 0

Views

Author

Simon Plouffe, May 02 2018

Keywords

Comments

Using a simple greedy algorithm.
Apart from a leading 3 the same as A188921. - R. J. Mathar, May 07 2018

Examples

			1 = 0.30110211100202211300010200021022221221202..._{Pi}
		

Crossrefs

Programs

  • Maple
    r2bk:=proc(s, b)
    local i, j, v, premier, fin, lll, liste, w, baz;
        baz := evalf(b);
        v := abs(evalf(s));
        fin := trunc(evalf(Digits/log10(b))) - 10;
        lll := [seq(baz^j, j = 1 .. fin)];
        liste := [];
        for i to fin do w := trunc(v*lll[i]); v := v - w/lll[i]; liste := [op(liste), w] end do;
        RETURN(liste)
    end;
    # enter a real number s and a base b > 1; b can be a real number, too.
Showing 1-1 of 1 results.