login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064809 Decimal expansion of Pi written as a sequence of positive integers avoiding duplicates. 3
3, 1, 4, 15, 9, 2, 6, 5, 35, 8, 97, 93, 23, 84, 62, 64, 33, 83, 27, 950, 28, 841, 971, 69, 39, 937, 510, 58, 20, 974, 94, 45, 92, 30, 7, 81, 640, 628, 620, 89, 98, 6280, 34, 82, 53, 42, 11, 70, 67, 982, 14, 80, 86, 51, 32, 8230, 66, 470, 938, 44, 60, 95, 50, 582, 231, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
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.
Is the sequence a permutation of the positive integers?
LINKS
EXAMPLE
Pi = 3.141592653589...
PROG
(Python)
from itertools import islice
from sympy import S
# download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
# with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
pi_digits = str(S.Pi.n(10**5))[:-1] # alternative to above
pi_digits = pi_digits.replace(".", "")
def diggen(): yield from map(int, pi_digits)
def agen(): # generator of terms
g = diggen()
aset, nextd = set(), next(g)
while True:
an, nextd = nextd, next(g)
while an in aset or nextd == 0:
an, nextd = int(str(an) + str(nextd)), next(g)
yield an
aset.add(an)
print(list(islice(agen(), 66))) # Michael S. Branicky, Mar 31 2022
CROSSREFS
Cf. A000796.
Sequence in context: A095328 A375854 A066712 * A058361 A112668 A016734
KEYWORD
base,nonn,look
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 22 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 5 20:11 EDT 2024. Contains 375700 sequences. (Running on oeis4.)