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

A068452 Pi^2 = Sum_{n>=1} a(n)/n!.

Original entry on oeis.org

9, 1, 2, 0, 4, 2, 0, 6, 4, 0, 4, 11, 6, 4, 14, 8, 12, 6, 18, 12, 12, 14, 13, 2, 7, 20, 12, 2, 16, 21, 25, 26, 29, 19, 7, 3, 20, 3, 38, 7, 12, 19, 37, 1, 23, 32, 19, 32, 38, 45, 45, 27, 44, 34, 14, 49, 35, 29, 30, 57, 57, 18, 56, 48, 33, 19, 44, 35, 12, 56, 28, 38, 64, 35, 10, 45, 35, 0
Offset: 1

Views

Author

Benoit Cloitre, Mar 10 2002

Keywords

Comments

For the fractional part, this corresponds to the factoradic (or factorial base, or harmonic) expansion, but the integer part 9 = 3! + 2! + 1! would be [1, 1, 1] in factorial base, cf. A007623(9) = 111. - M. F. Hasler, Nov 27 2018

Crossrefs

Cf. A002388 (decimal expansion of Pi^2).
Similar expansions: A068450 (sqrt(Pi)), A075874 (Pi), A007514 (different variant for Pi).

Programs

  • Magma
    SetDefaultRealField(RealField(250)); R:=RealField(); [Floor(Pi(R)^2)] cat [Floor(Factorial(n)*Pi(R)^2) - n*Floor(Factorial((n-1))*Pi(R)^2) : n in [2..80]]; // G. C. Greubel, Nov 26 2018
    
  • Maple
    fexp := proc(x) local xres,a,n ; xres := x ; a := [] ; for n from 1 to 100 do a := [op(a),floor(n!*xres)] ; xres := xres-op(-1,a)/n! ; od: a ; end: Digits := 400 ; fexp(evalf(Pi^2)) ; Digits := 600 ; fexp(evalf(Pi^2)) ; # R. J. Mathar, Sep 30 2008
  • Mathematica
    p=N[Pi, 10000]^2; Do[k=Floor[p n!]; p=p - k / n!; Print[k], {n, 1000}] (* Vincenzo Librandi, Nov 24 2018 *)
    With[{b = Pi^2}, Table[If[n == 1, Floor[b], Floor[n!*b] -n*Floor[(n- 1)!*b]], {n, 1, 100}]] (* G. C. Greubel, Nov 26 2018 *)
  • PARI
    default(realprecision, 250); b = Pi^2; for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", ")) \\ G. C. Greubel, Nov 26 2018
    
  • PARI
    A068452(N=90, c=precision(Pi^2,logint(N!,10)))=vector(N, n, if(n>1, c=c%1*n, c)\1) \\ M. F. Hasler, Nov 27 2018
    
  • Sage
    def A068452(n):
        if (n==1): return floor(pi^2)
        else: return expand(floor(factorial(n)*pi^2) - n*floor(factorial(n-1)*pi^2))
    [A068452(n) for n in (1..80)] # G. C. Greubel, Nov 26 2018

Extensions

Corrected beginning at 3rd term by R. J. Mathar, Sep 30 2008

A068448 Factorial expansion of log(Pi) = Sum_{n>0} a(n)/n! with a(n) as large as possible.

Original entry on oeis.org

1, 0, 0, 3, 2, 2, 1, 3, 4, 5, 8, 10, 11, 7, 13, 13, 3, 14, 11, 16, 6, 9, 3, 14, 0, 16, 22, 9, 8, 26, 5, 18, 6, 3, 13, 31, 4, 27, 25, 5, 12, 1, 17, 31, 2, 4, 16, 17, 39, 15, 15, 25, 52, 40, 50, 3, 27, 32, 54, 18, 55, 10, 29, 62, 38, 4, 17, 53, 13, 24, 22, 40, 23, 11, 74, 18, 74, 31, 8
Offset: 1

Views

Author

Benoit Cloitre, Mar 10 2002

Keywords

Comments

If a(n) is not required to be as large as possible, it isn't well defined: it can be decreased by any amount x without changing the value of the sum, if x*(n+1) is added to a(n+1), which in turn can be decreased by any arbitrary amount etc. - M. F. Hasler, Dec 04 2018

Crossrefs

Cf. A053510 (decimal expansion).
Similar expansions: A068450 (sqrt(Pi)), A075874 (Pi), A007514 (a different variant for Pi).

Programs

  • Magma
    R:= RealField(); [Floor(Log(Pi(R)))] cat [Floor(Factorial(n)*Log(Pi(R))) - n*Floor(Factorial((n-1))*Log(Pi(R))) : n in [2..30]]; // G. C. Greubel, Mar 21 2018
  • Mathematica
    Table[If[n == 1, Floor[Log[Pi]], Floor[n!*Log[Pi]] - n*Floor[(n - 1)!*Log[Pi]]], {n,1,50}] (* G. C. Greubel, Mar 21 2018 *)
  • PARI
    for(n=1,30, print1(if(n==1, floor(log(Pi)), floor(n!*log(Pi)) - n*floor((n-1)!*log(Pi))), ", ")) \\ G. C. Greubel, Mar 21 2018
    
  • PARI
    A068448_vec(N=90,c=log(precision(Pi,N*log(N/2.4)\/2.3)))=vector(N,n,if(n>1,c=c%1*n,c)\1) \\ N*log(N/2.4)\/2.3 ~ logint(N!,10) but uses much less memory when N is big. - M. F. Hasler, Nov 28 2018
    

Extensions

Name edited by M. F. Hasler, Dec 04 2018
Showing 1-2 of 2 results.