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.

A157196 a(n) = (1/2)*(sum of elements of n-th run) using 1 and 2 starting with 1,1.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Benoit Cloitre, Feb 24 2009

Keywords

Comments

We conjecture that the density of 1's in the sequence approaches 2/3 as n -> infinity. This conjecture is proved in the paper of Shallit.

Examples

			Write the sums of elements in each run, you obtain: 2,2,4,2,2,2,2,4,2,2,4,2,2,4,4,... dividing by 2 you get: 1,1,2,1,1,1,1,2,1,1,2,1,1,2,2,... the sequence itself.
		

Crossrefs

Programs

  • Maple
    mx:= 1000: l:= [1$2]: a:= n-> l[n]:
    for h from 2 while nops(l)Alois P. Heinz, May 31 2012

Extensions

More terms from Alvin Hoover Belt, May 31 2012

A336686 Decimal expansion of Sum_{k>=0} 1/(k!)!.

Original entry on oeis.org

2, 5, 0, 1, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 0, 5, 0, 0, 6, 2, 6, 4, 5, 9, 9, 8, 5, 0, 0, 7, 2, 3, 7, 9, 3, 7, 6, 0, 2, 1, 9, 3, 6, 9, 0, 0, 6, 0, 6, 9, 0, 2, 1, 3, 6, 1, 4, 9, 9, 1, 4, 9, 6, 1, 1, 6, 8, 6, 2, 4, 1, 8, 1, 7, 8, 9, 1, 9, 8, 9, 9, 3, 3, 9, 4, 3, 7, 4, 1, 5, 7, 4, 4, 1
Offset: 1

Views

Author

Daniel Hoyt, Nov 20 2020

Keywords

Comments

The sum has 18 8's in a row within the first 23 decimal places.
1801/720 approximates this constant to 23 significant digits.

Examples

			2.5013888888888888888888905006...
		

Crossrefs

Programs

  • Maple
    evalf(sum(1/(k!)!, k=0..infinity), 112);  # Alois P. Heinz, Nov 20 2020
  • Mathematica
    RealDigits[Sum[1/(k!)!, {k, 0, 4}], 10, 100][[1]] (* Amiram Eldar, Nov 21 2020 *)
  • PARI
    suminf(k=0, 1/(k!)!)

A363841 Continued fraction expansion of Sum_{k>=0} 1/(k!)!^2.

Original entry on oeis.org

2, 3, 1, 32399, 4, 1432456210278611587930429493084159999, 1, 3, 32399, 1, 3
Offset: 0

Views

Author

Daniel Hoyt, Jun 23 2023

Keywords

Comments

In general, sums of the form Sum_{k>=0} 1/(k!)!^t, t > 1 in N, have the following continued fraction expansion formulas:
The first term is always 2.
Let P(k) = (((k+1)!)! / ((k!)!)^2)^t - 1.
Take the sequence A157196 and replace the runs of '1,1' with 2^t - 1, the odd occurring runs of '2' with 2^t, and the even occurring runs of '2' with 2^t - 2. Finally interleave the modified sequence with a string of 1's and let it be called f(n). To get the continued fraction expansion, interleave the n-th runs of '2^t', '2^t - 1, 1', '1, 2^t - 1' and '1, 2^t - 2, 1' in f(n), and P(A001511(n)+1).
The next term a(11) has 303 digits. - Stefano Spezia, Jun 24 2023

Crossrefs

Cf. A363842 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Sum[1/(k!)!^2, {k, 0, 6}], 21]

Formula

Take the sequence A157196 and replace the runs of '1,1' with '3'. Then replace the odd occurring runs of '2' with '4'. Finally interleave the modified sequence with a string of 1's and let it be called f(n). To get the continued fraction expansion, interleave between the n-th runs of '4', '3, 1', '1, 3' and '1, 2, 1' in f(n), and P(A001511(n)+1).

A386384 Continued fraction expansion of Sum_{k>=0} (-1)^k/(k!)!.

Original entry on oeis.org

0, 2, 179, 1, 1, 1196852626800230399, 2, 179, 1, 1, 17377308326435956818596067989554034737368967210468674554156131654360754429984573360106123813424835044026977477398690421454067571097599999999999999999999, 2, 179, 2, 1196852626800230399, 1, 1, 179, 2
Offset: 0

Views

Author

Daniel Hoyt, Aug 17 2025

Keywords

Comments

The peak terms have the form P(k) = ((k+1)!)! / ((k!)!)^2 - 1. The sequence is an interleaving between the n-th runs of '2' and '1,1' in A386385, and P(A001511(n)+1).

Crossrefs

Cf. A387268 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Sum[(-1)^k/(k!)!, {k, 0, 6}], 21]
  • Python
    import sys #for printing huge factorials
    sys.set_int_max_str_digits(0)  # otherwise sys not needed.
    def a386384(n):
        import math
        if n==0: return 0
        t=n-1; M=0x18199818
        s=[1,1]; h=2; p=0; r=0
        def g(u):
            nonlocal s,h
            while len(s)>(r&31))&1) else ('A' if xb=='B' else 'B')
            L = 2 if yb=='A' else 1
            if t < L: return 1 if yb=='A' else 2
            t -= L
            if t==0:
                rr=r+1
                K=((rr & -rr).bit_length()-1)+2
                A=math.factorial(math.factorial(K+1))
                B=math.factorial(math.factorial(K))
                return A//(B*B)-1
            t-=1; r+=1

A387268 Decimal expansion of Sum_{k>=0} (-1)^k/(k!)!.

Original entry on oeis.org

4, 9, 8, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 2, 2, 8, 4, 8, 6, 8, 2, 2, 0, 7, 2, 2, 9, 4, 6, 0, 1, 5, 9, 8, 2, 4, 4, 1, 5, 9, 1, 2, 2, 8, 2, 9, 1, 2, 4, 3, 5, 8, 3, 7, 2, 1, 3, 7, 1, 8, 3, 3, 9, 0, 8, 4, 6, 4, 0, 4, 0, 1, 1, 4, 2, 1, 2, 1, 5, 6, 1, 6, 5, 9, 6, 3, 7, 9
Offset: 0

Views

Author

Daniel Hoyt, Aug 24 2025

Keywords

Comments

This constant has an interesting simple continued fraction representation.
359/720 approximates this constant to 19 significant digits.

Examples

			0.498611111111111111127228486822072294...
		

Crossrefs

Cf. A386384 (continued fraction expansion).

Programs

  • Mathematica
    RealDigits[Sum[(-1)^k/(k!)!, {k, 0, 6}], 10, 100][[1]]
  • PARI
    suminf(k=0, (-1)^k/(k!)!)
Showing 1-5 of 5 results.