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!)
A175728 Decimal expansion of e written as a sequence of distinct positive integers. 1

%I #11 Apr 01 2022 11:40:07

%S 2,7,1,8,28,18,284,5,90,4,52,3,53,60,287,47,13,526,6,24,9,77,57,2470,

%T 93,69,99,59,574,96,696,76,27,72,40,766,30,35,354,75,94,571,38,21,78,

%U 525,16,64,274,2746,63,91,93200,305,992,181,74,135,966,290,43,572,900,33,42

%N Decimal expansion of e written as a sequence of distinct positive integers.

%C Inverse: 3, 1, 12, 10, 8, 19, 2, 4, 21, 119, 86, 166, 17, 154, 160, 47, 192, 6, 83, 214, ..., . - _Robert G. Wilson v_, Aug 22 2010

%H Michael S. Branicky, <a href="/A175728/b175728.txt">Table of n, a(n) for n = 1..10000</a>

%t rd = RealDigits[E, 10, 200][[1]]; lst = {}; f[n_] := Block[{k = 1}, While[a = FromDigits[ Take[ rd, k]]; MemberQ[lst, a] || rd[[k + 1]] == 0, k++ ]; AppendTo[ lst, a]; rd = Drop[rd, k]]; Array[f, 70]; lst (* _Robert G. Wilson v_, Aug 22 2010 *)

%o (Python)

%o from itertools import islice

%o from sympy import exp

%o def diggen():

%o yield from map(int, str(exp(1).n(10**5))[:-1].replace(".", ""))

%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(), 65))) # _Michael S. Branicky_, Mar 31 2022

%Y Cf. A001113, A064809.

%K nonn,base

%O 1,1

%A _Jason G. Wurtzel_, Aug 19 2010

%E More terms from _Robert G. Wilson v_, Aug 22 2010

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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)