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.

A378625 The first subsequence starting at the first digit after the decimal point in the decimal expansion of Pi that is divisible by n.

Original entry on oeis.org

1, 14, 141, 141592, 1415, 141592653589793238, 14, 141592, 141592653, 14159265358979323846264338327950, 141592, 1415926535897932384626433832795028, 14159265358979, 14, 14159265, 1415926535897932384, 141592653589793, 141592653589793238, 141592653589793238462
Offset: 1

Views

Author

Simon R Blow, Dec 02 2024

Keywords

Comments

For every positive integer n there exists a contiguous subsequence of the decimal expansion of Pi that is divisible by n (conjectured).

Examples

			a(3) = 141 is the first integer in the sequence that is divisible by 3.
a(6) = 141592653589793238 is the first integer in the sequence that is divisibe by 6.
		

Crossrefs

Cf. A014777 (if start can move).

Programs

  • Python
    from mpmath import mp
    mp.dps = 1000000
    pi_digits = str(mp.pi)[2:]
    def first_divisible(n):
        current_number = 0
        for digit in pi_digits:
            current_number = current_number * 10 + int(digit)
            if current_number % n == 0:
                return current_number
        return None
    results = [first_divisible(n) for n in range(1, 21)]
    print(results)

Formula

a(n) = n * A088143(n). - Alois P. Heinz, Dec 05 2024