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

A075874 Pi = Sum_{n >= 1} a(n)/n!, with largest possible a(n).

Original entry on oeis.org

3, 0, 0, 3, 1, 5, 6, 5, 0, 1, 4, 7, 8, 0, 6, 7, 10, 7, 10, 4, 10, 6, 16, 1, 11, 20, 3, 18, 12, 9, 13, 18, 21, 14, 34, 27, 11, 27, 33, 36, 18, 5, 18, 5, 23, 39, 1, 10, 42, 28, 17, 20, 51, 8, 42, 47, 0, 27, 23, 16, 52, 32, 52, 53, 24, 43, 61, 64, 18, 17, 11, 0, 53, 14, 62
Offset: 1

Views

Author

N. J. A. Sloane, Robert G. Wilson v, Nov 02 2001 and Oct 20 2002

Keywords

Comments

What is meant is the expansion in the factorial number system, cf. links. The formula itself is not sufficient to define the terms uniquely: a(n) can be decreased by any amount x if x*(n+1) is added to a(n+1). - M. F. Hasler, Nov 26 2018

Examples

			Pi = 3/1! + 0/2! + 0/3! + 3/4! + 1/5! + ...
		

Crossrefs

Essentially same as A007514.
Pi in base n: A004601 to A004608, A000796, A068436 to A068440, A062964.

Programs

  • Magma
    SetDefaultRealField(RealField(250)); R:=RealField(); [Floor(Pi(R))] cat [Floor(Factorial(n)*Pi(R)) - n*Floor(Factorial((n-1))*Pi(R)) : n in [2..80]]; // G. C. Greubel, Nov 26 2018
    
  • Maple
    Digits := 120; M := proc(a,n) local i,b,c; b := a; c := [ floor(b) ]; for i from 1 to n-1 do b := b-c[ i ]/i!; c := [ op(c), floor(b*(i+1)!) ]; od; c; end: t1 := M(Pi,100); A075874 := n->t1[n+1];
  • Mathematica
    p = N[Pi, 1000]; Do[k = Floor[p*n! ]; p = p - k/n!; Print[k], {n, 1, 75}]
    With[{b = Pi}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]] (* G. C. Greubel, Nov 26 2018 *)
  • PARI
    x=Pi;vector(floor((y->y/log(y))(default(realprecision))),n,t=n!;k=floor(x*t);x-=k/t;k) \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    vector(30,n,if(n>1,t=t%1*n,t=Pi)\1) \\ Increase realprecision (e.g., \p500) to compute more terms. - M. F. Hasler, Nov 25 2018
    
  • PARI
    default(realprecision, 250); b = Pi; for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", ")) \\ G. C. Greubel, Nov 26 2018
    
  • Sage
    def A075874(n):
        if (n==1): return floor(pi)
        else: return expand(floor(factorial(n)*pi) - n*floor(factorial(n-1)*pi))
    [A075874(n) for n in (1..80)] # G. C. Greubel, Nov 26 2018

Formula

a(1)=3; for n >= 2, a(n) = floor(n!*Pi) - n*floor((n-1)!*Pi). - Benoit Cloitre, Mar 10 2002

A068463 Factorial expansion of Gamma(3/4) = Sum_{n>=1} a(n)/n! where Gamma is Euler's gamma function.

Original entry on oeis.org

1, 0, 1, 1, 2, 0, 2, 0, 7, 2, 1, 5, 1, 12, 12, 12, 12, 5, 7, 9, 4, 20, 10, 9, 6, 17, 20, 18, 7, 6, 11, 9, 24, 3, 22, 8, 24, 33, 35, 33, 31, 12, 0, 27, 6, 31, 37, 37, 27, 31, 6, 24, 7, 17, 12, 1, 39, 41, 51, 48, 21, 8, 15, 26, 46, 52, 43, 39, 7, 21, 60, 24, 58, 21, 57, 58, 36, 60, 25, 7
Offset: 1

Views

Author

Benoit Cloitre, Mar 10 2002

Keywords

Examples

			Gamma(3/4) = 1 + 0/2! + 1/3! + 1/4! + 2/5! + 0/6! + 2/7! + ...
		

Crossrefs

Cf. A075874, A068465 (decimal expansion), A068464 (Gamma(1/4)).

Programs

  • Magma
    SetDefaultRealField(RealField(250)); [Floor(Gamma(3/4))] cat [Floor(Factorial(n)*Gamma(3/4)) - n*Floor(Factorial((n-1))*Gamma(3/4)) : n in [2..80]]; // G. C. Greubel, Nov 27 2018
    
  • Mathematica
    With[{b = Gamma[3/4]}, Table[If[n == 1, Floor[b], Floor[n!*b]-n*Floor[(n - 1)!*b]], {n, 1, 100}]] (* G. C. Greubel, Nov 27 2018 *)
  • PARI
    A068463(N=90,c=gamma(precision(.75,logint(N!,10)+1)))=vector(N,n,if(n>1,c=c%1*n,c)\1) \\ - M. F. Hasler, Nov 26 2018
    
  • PARI
    default(realprecision, 250); b = gamma(3/4); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", ")) \\ G. C. Greubel, Nov 27 2018
    
  • Sage
    def A068463(n):
        if (n==1): return floor(gamma(3/4))
        else: return expand(floor(factorial(n)*gamma(3/4)) - n*floor(factorial(n-1)*gamma(3/4)))
    [A068463(n) for n in (1..80)] # G. C. Greubel, Nov 27 2018

Extensions

Name edited and keywords cons, easy removed by M. F. Hasler, Nov 26 2018

A322508 Factorial expansion of Gamma(1/3) = Sum_{n>=1} a(n)/n!.

Original entry on oeis.org

2, 1, 1, 0, 1, 2, 5, 6, 7, 2, 1, 8, 5, 7, 9, 12, 13, 10, 10, 13, 17, 18, 5, 1, 6, 3, 26, 13, 20, 29, 8, 31, 27, 19, 21, 27, 5, 14, 12, 3, 9, 37, 34, 40, 14, 29, 35, 12, 27, 4, 36, 22, 24, 11, 31, 37, 12, 5, 47, 14, 22, 18, 51, 20, 51, 4, 15, 54, 61, 26, 55, 2, 6, 73, 7, 17, 66, 54, 27
Offset: 1

Views

Author

G. C. Greubel, Dec 12 2018

Keywords

Examples

			Gamma(1/3) = 2 + 1/2! + 1/3! + 0/4! + 1/5! + 2/6! + 5/7! + 6/8! + ...
		

Crossrefs

Cf. A073005 (decimal expansion), A030651 (continued fraction).
Cf. A068463 (Gamma(3/4)), A068464 (Gamma(1/4)), A322509 (Gamma(2/3)).

Programs

  • Magma
    SetDefaultRealField(RealField(250));  [Floor(Gamma(1/3))] cat [Floor(Factorial(n)*Gamma(1/3)) - n*Floor(Factorial((n-1))*Gamma(1/3)) : n in [2..80]];
    
  • Mathematica
    With[{b = Gamma[1/3]}, Table[If[n==1, Floor[b], Floor[n!*b] - n*Floor[(n-1)!*b]], {n, 1, 100}]]
  • PARI
    default(realprecision, 250); b = gamma(1/3); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", "))
    
  • Sage
    b=gamma(1/3);
    def a(n):
        if (n==1): return floor(b)
        else: return expand(floor(factorial(n)*b) -n*floor(factorial(n-1)*b))
    [a(n) for n in (1..80)]

A322509 Factorial expansion of Gamma(2/3) = Sum_{n>=1} a(n)/n!.

Original entry on oeis.org

1, 0, 2, 0, 2, 2, 6, 6, 0, 3, 1, 11, 7, 6, 6, 14, 1, 8, 12, 15, 8, 17, 8, 1, 13, 15, 3, 4, 10, 16, 25, 1, 25, 22, 6, 3, 19, 17, 8, 10, 25, 37, 29, 17, 35, 19, 24, 25, 30, 31, 4, 7, 51, 49, 14, 51, 45, 54, 0, 26, 34, 41, 56, 57, 16, 15, 63, 4, 51, 42, 13, 35, 12, 15, 66, 22, 13, 43, 14, 78
Offset: 1

Views

Author

G. C. Greubel, Dec 12 2018

Keywords

Examples

			Gamma(2/3) = 1 + 0/2! + 2/3! + 0/4! + 2/5! + 2/6! + 6/7! + 6/8! + ...
		

Crossrefs

Cf. A073006 (decimal expansion), A030652 (continued fraction).
Cf. A068463 (Gamma(3/4)), A068464 (Gamma(1/4)), A322508 (Gamma(1/3)).

Programs

  • Magma
    SetDefaultRealField(RealField(250));  [Floor(Gamma(2/3))] cat [Floor(Factorial(n)*Gamma(2/3)) - n*Floor(Factorial((n-1))*Gamma(2/3)) : n in [2..80]];
    
  • Mathematica
    With[{b = Gamma[2/3]}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]]
  • PARI
    default(realprecision, 250); b = gamma(2/3); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", "))
    
  • Sage
    b=gamma(2/3);
    def a(n):
        if (n==1): return floor(b)
        else: return expand(floor(factorial(n)*b) -n*floor(factorial(n-1)*b))
    [a(n) for n in (1..80)]
Showing 1-4 of 4 results.