OFFSET
1,2
COMMENTS
For every positive integer n there exists a contiguous subsequence of the decimal expansion of Pi that is divisible by n (conjectured).
FORMULA
a(n) = n * A088143(n). - Alois P. Heinz, Dec 05 2024
EXAMPLE
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.
PROG
(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)
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Simon R Blow, Dec 02 2024
STATUS
approved