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.

A064809 Decimal expansion of Pi written as a sequence of positive integers avoiding duplicates.

This page as a plain text file.
%I A064809 #16 Apr 01 2022 20:19:03
%S A064809 3,1,4,15,9,2,6,5,35,8,97,93,23,84,62,64,33,83,27,950,28,841,971,69,
%T A064809 39,937,510,58,20,974,94,45,92,30,7,81,640,628,620,89,98,6280,34,82,
%U A064809 53,42,11,70,67,982,14,80,86,51,32,8230,66,470,938,44,60,95,50,582,231,72
%N A064809 Decimal expansion of Pi written as a sequence of positive integers avoiding duplicates.
%C A064809 Start with the first digit of Pi and set a(1)=3. Let p(1),...,p(i) be the digits of Pi used to construct a(1),...,a(n); then a(n+1) is the smallest integer with digits p(i+1),...,p(i+j) such that a(n+1) is new and p(i+j+1) != 0.
%C A064809 Is the sequence a permutation of the positive integers?
%H A064809 Paul Tek, <a href="/A064809/b064809.txt">Table of n, a(n) for n = 1..10000</a>
%e A064809 Pi = 3.141592653589...
%o A064809 (Python)
%o A064809 from itertools import islice
%o A064809 from sympy import S
%o A064809 # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
%o A064809 # with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
%o A064809 pi_digits = str(S.Pi.n(10**5))[:-1] # alternative to above
%o A064809 pi_digits = pi_digits.replace(".", "")
%o A064809 def diggen(): yield from map(int, pi_digits)
%o A064809 def agen(): # generator of terms
%o A064809     g = diggen()
%o A064809     aset, nextd = set(), next(g)
%o A064809     while True:
%o A064809         an, nextd = nextd, next(g)
%o A064809         while an in aset or nextd == 0:
%o A064809             an, nextd = int(str(an) + str(nextd)), next(g)
%o A064809         yield an
%o A064809         aset.add(an)
%o A064809 print(list(islice(agen(), 66))) # _Michael S. Branicky_, Mar 31 2022
%Y A064809 Cf. A000796.
%K A064809 base,nonn,look
%O A064809 1,1
%A A064809 Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 22 2001