Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Apr 01 2022 20:19:03
%S 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 39,937,510,58,20,974,94,45,92,30,7,81,640,628,620,89,98,6280,34,82,
%U 53,42,11,70,67,982,14,80,86,51,32,8230,66,470,938,44,60,95,50,582,231,72
%N Decimal expansion of Pi written as a sequence of positive integers avoiding duplicates.
%C 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 Is the sequence a permutation of the positive integers?
%H Paul Tek, <a href="/A064809/b064809.txt">Table of n, a(n) for n = 1..10000</a>
%e Pi = 3.141592653589...
%o (Python)
%o from itertools import islice
%o from sympy import S
%o # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
%o # with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
%o pi_digits = str(S.Pi.n(10**5))[:-1] # alternative to above
%o pi_digits = pi_digits.replace(".", "")
%o def diggen(): yield from map(int, pi_digits)
%o def agen(): # generator of terms
%o g = diggen()
%o aset, nextd = set(), next(g)
%o while True:
%o an, nextd = nextd, next(g)
%o while an in aset or nextd == 0:
%o an, nextd = int(str(an) + str(nextd)), next(g)
%o yield an
%o aset.add(an)
%o print(list(islice(agen(), 66))) # _Michael S. Branicky_, Mar 31 2022
%Y Cf. A000796.
%K base,nonn,look
%O 1,1
%A Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 22 2001