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

A317335 a(n) = A317332(n) - 8*n.

Original entry on oeis.org

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

Views

Author

A.H.M. Smeets, Jul 26 2018

Keywords

Crossrefs

Programs

  • Python
    n, f, i, p, q = 1, 1, 0, 0, 1
    while i < 1000000:
        i, p, q = i+1, p*10, q*10
        if i == f:
            p, n = p+1, n+1
            f = f*n
    n, a, j = 0, 0, 0
    while p%q > 0:
        a, f, p, q = a+1, p//q, q, p%q
        if f == 8:
            n = n+1
            print(n, a-1-8*n)

Formula

a(4*n-3) = 1, a(4*n-1) = -2, a(2*n) = a(n) for n > 0.
abs(a(n)+1) = A014710(n-1).
abs(a(n)) = A014709(n-1).

A058304 Continued fraction for Liouville's number (A012245).

Original entry on oeis.org

0, 9, 11, 99, 1, 10, 9, 999999999999, 1, 8, 10, 1, 99, 11, 9, 999999999999999999999999999999999999999999999999999999999999999999999999, 1, 8, 11, 99, 1, 10, 8, 1, 999999999999, 9, 10, 1, 99, 11, 9
Offset: 0

Views

Author

Robert G. Wilson v, Dec 08 2000

Keywords

Comments

From A.H.M. Smeets, Jun 06 2018: (Start)
Except for the first term, the only values that occur in this sequence are 1,8,9,10,11,and values 10^((m-1)*m!)-1 for m > 1. The probability of occurrence P(a(n) = k) are given by:
P(a(n) = 1) = 1/4,
P(a(n) = 8) = 1/8,
P(a(n) = 9) = 1/8,
P(a(n) = 10) = 1/8,
P(a(n) = 11) = 1/8 and
P(a(n) = 10^((m-1)*m!)-1) = 2^-(m+1) for m > 1. (End)

Examples

			0.1100010000000000000000010... = 0 + 1/(9 + 1/(11 + 1/(99 + 1/(1 + ...)))). - _Harry J. Smith_, May 15 2009
		

References

  • Harold M. Stark, "An Introduction to Number Theory," The MIT Press, Cambridge, MA and London, England, Eighth Printing, 1994, pages 172 - 177.

Crossrefs

Cf. A012245.
Cf. A317413 (in base 2), A317414 (in base 3) A317661 (in base 4 and general).

Programs

  • Maple
    with(numtheory): cfrac(add(1/10^factorial(n),n=1..7),62,'quotients'); # Muniru A Asiru, Aug 08 2018
  • Mathematica
    ContinuedFraction[ Sum[ 1 /10^(n!), {n, 1, 7} ], 40 ]
  • PARI
    { allocatemem(932245000); default(realprecision, 200000); x=contfrac(suminf(n=1, 1.0/10^n!)); for (n=1, 255, write("b058304.txt", n, " ", x[n])); } \\ Harry J. Smith, May 15 2009
    
  • Python
    n,f,i,p,q,base = 1,1,0,0,1,10
    while i < 1000:
        i,p,q = i+1,p*base,q*base
        if i == f:
            p,n = p+1,n+1
            f = f*n
    n,a,j = 0,0,0
    while p%q > 0:
        a,f,p,q = a+1,p//q,q,p%q
        print(a-1,f)
    # A.H.M. Smeets, Aug 03 2018

Formula

From A.H.M. Smeets, Jun 26 2018: (Start)
a(n) = 1 iff n in A317331,
a(n) = 8 iff n in A317332,
a(n) = 9 iff n in A317333,
a(n) = 10 iff n = 8*m - 6 + 3*(m mod 2) for m > 0,
a(n) = 11 iff n = 8*m - 3 - 3*(m mod 2) for m > 0,
a(n) = 10^((m-1)*m!)-1 iff n in {2^m*(1+k*4) - 1 | k >= 0} union {2^m*(3+k*4) | k >= 0} for m > 1. (End)

Extensions

Offset changed to 0 on the advice of A.H.M. Smeets by Muniru A Asiru, Aug 11 2018

A317331 Indices m for which A058304(m) = 1.

Original entry on oeis.org

4, 8, 11, 16, 20, 23, 27, 32, 36, 40, 43, 47, 52, 55, 59, 64, 68, 72, 75, 80, 84, 87, 91, 95, 100, 104, 107, 111, 116, 119, 123, 128, 132, 136, 139, 144, 148, 151, 155, 160, 164, 168, 171, 175, 180, 183, 187, 191, 196, 200, 203, 208, 212, 215, 219, 223, 228, 232, 235, 239, 244, 247, 251
Offset: 1

Views

Author

A.H.M. Smeets, Jul 26 2018

Keywords

Crossrefs

Programs

  • Python
    n, f, i, p, q = 1, 1, 0, 0, 1
    while i < 100000:
        i, p, q = i+1, p*10, q*10
        if i == f:
            p, n = p+1, n+1
            f = f*n
    n, a, j = 0, 0, 0
    while p%q > 0:
        a, f, p, q = a+1, p//q, q, p%q
        if f == 1:
            n = n+1
            print(n, a-1)

Formula

a(n) = 4*n + A014577(n-1)-1. - A.H.M. Smeets, Jul 29 2018

A317333 Indices m for which A058304(m) = 9.

Original entry on oeis.org

1, 6, 14, 25, 30, 38, 49, 57, 62, 70, 78, 89, 97, 102, 113, 121, 126, 134, 142, 153, 158, 166, 177, 185, 193, 198, 206, 217, 225, 230, 241, 249, 254, 262, 270, 281, 286, 294, 305, 313, 318, 326, 334, 345, 353, 358, 369, 377, 385, 390, 398, 409, 414, 422, 433, 441, 449, 454, 462, 473, 481, 486, 497, 505
Offset: 1

Views

Author

A.H.M. Smeets, Jul 26 2018

Keywords

Crossrefs

Programs

  • Python
    n, f, i, p, q = 1, 1, 0, 0, 1
    while i < 1000000:
        i, p, q = i+1, p*10, q*10
        if i == f:
            p, n = p+1, n+1
            f = f*n
    n, a, j = 0, 0, 0
    while p%q > 0:
        a, f, p, q = a+1, p//q, q, p%q
        if f == 9:
            n = n+1
            print(n, a-1)

Formula

a(n) = 8*n + A317336(n).

A317336 a(n) = A317333(n) - 8*n.

Original entry on oeis.org

-7, -10, -10, -7, -10, -10, -7, -7, -10, -10, -10, -7, -7, -10, -7, -7, -10, -10, -10, -7, -10, -10, -7, -7, -7, -10, -10, -7, -7, -10, -7, -7, -10, -10, -10, -7, -10, -10, -7, -7, -10, -10, -10, -7, -7, -10, -7, -7, -7, -10, -10, -7, -10, -10, -7, -7, -7, -10, -10, -7, -7, -10, -7, -7
Offset: 1

Views

Author

A.H.M. Smeets, Jul 26 2018

Keywords

Crossrefs

Programs

  • Python
    n, f, i, p, q = 1, 1, 0, 0, 1
    while i < 1000000:
        i, p, q = i + 1, p * 10, q * 10
        if i == f:
            p, n = p + 1, n + 1
            f = f * n
    n, a, j = 0, 0, 0
    while p % q > 0:
        a, f, p, q = a + 1, p // q, q, p % q
        if f == 9:
            n = n + 1
            print(n, a - 1 - 8 * n)

Formula

a(4*n+4) = -7, a(4*n+2) = -10, for n > 0. a(1) = -7 and a(2*n-1) = a(n) for n > 1.
abs(a(n+2)+8) = A014710(n) for n >= 0.
a(n) = -7-3*A082410(n)

A317661 Continued fraction for quaternary expansion of Liouville's number interpreted in base 4 (A012245).

Original entry on oeis.org

0, 3, 5, 15, 1, 4, 3, 16777215, 1, 2, 4, 1, 15, 5, 3, 22300745198530623141535718272648361505980415, 1, 2, 5, 15, 1, 4, 2, 1, 16777215, 3, 4, 1, 15, 5, 3
Offset: 0

Views

Author

A.H.M. Smeets, Aug 03 2018

Keywords

Crossrefs

Cf. A058304 (in base 10), A317413 (in base 2), A317414 (in base 3).

Programs

  • Maple
    with(numtheory): cfrac(add(1/4^factorial(n),n=1..7),30,'quotients'); # Muniru A Asiru, Aug 12 2018
  • Python
    n, f, i, p, q, base = 1, 1, 0, 0, 1, 4
    while i < 100000:
        i, p, q = i+1, p*base, q*base
        if i == f:
            p, n = p+1, n+1
            f = f*n
    n, a, j = 0, 0, 0
    while p%q > 0:
        a, f, p, q = a+1, p//q, q, p%q
        print(a-1, f)

Formula

In general for any Liouville's number base > 2:
a(n) = 1 if (and only if, for base > 3) n in A317331,
a(n) = base-2 if (and only if, for base > 3) n in A317332,
a(n) = base-1 if and only if n in A317333,
a(n) = base if and only if n in {8*m - 6 + 3*(m mod 2) | m > 0},
a(n) = base+1 if and only if n in {8*m - 3 - 3*(m mod 2) | m > 0},
a(n) = base^((m-1)*m!)-1 iff n in {2^m*(1+k*4) - 1 | k >= 0} union {2^m*(3+k*4) | k >= 0} for m > 1.

A359457 Continued fraction for constant A359456.

Original entry on oeis.org

0, 9, 11, 99, 1, 10, 9, 999999999999999999, 1, 8, 10, 1, 99, 11, 9
Offset: 0

Views

Author

A.H.M. Smeets, Jan 02 2023

Keywords

Comments

It seems that all terms smaller than 100 are identical to the continued fraction terms of Liouville's constant as in A058304.
Except for the first term, the only values that occur in this sequence are 1,8,9,10,11,and values 10^A359458(m-1)-1 for m > 1. The probability of occurrence P(a(n) = k) are given by:
P(a(n) = 1) = 1/4,
P(a(n) = 8) = 1/8,
P(a(n) = 9) = 1/8,
P(a(n) = 10) = 1/8,
P(a(n) = 11) = 1/8 and
P(a(n) = 10^A359458(m-1)-1) = 2^-(m+1) for m > 1.

Crossrefs

Formula

a(n) = 1 if and only if n in A317331,
a(n) = 8 if and only if n in A317332,
a(n) = 9 if and only if n in A317333,
a(n) = 10 if and only if n = 8*m - 6 + 3*(m mod 2) for m > 0,
a(n) = 11 if and only if n = 8*m - 3 - 3*(m mod 2) for m > 0,
a(n) = 10^A359458(m-1)-1 if and only if n in {2^m*(1+k*4) - 1 | k >= 0} union {2^m*(3+k*4) | k >= 0} for m > 1.
Showing 1-7 of 7 results.