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!)
A185366 First n-digit square in the digits of e. 0
1, 81, 676, 8281, 72900, 819025, 21609, 3644281, 59845696, 796707076, 2113884529, 736205184576, 1751509314916, 1751509314916, 5176216516900, 4737309139140769, 99398242392417424, 887828157705424896, 8576326547254681744, 2583667059970281481 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Squares are allowed to have prefix 0 (see example).
a(18)-a(20) require 1.6, 2, 4.9 billion digits, respectively. - Michael S. Branicky, Dec 28 2022
LINKS
EXAMPLE
a(7) = 21609 is the first square that occurs in the sequence of the 7 decimal digits ...0021609...with the index 830 in A001113.
MAPLE
Digits := 10000: p0 := evalf(exp(1)):for d from 1 to 20 do: id:=0:for i from
0 to 50000 while(id=0) do :q0:=trunc(p0*10^(i+d-1)): x:= irem(q0, 10^d): if sqrt(x)=floor(sqrt(x)) then printf(`%d, `, x):id:=1: else fi:od:od:
PROG
(Python)
from math import isqrt
from sympy import E, isprime
e = str(E.n(10**5))[2:] # or load from file using the pattern:
# with open('e.txt', 'r') as f: digits_of_e = f.readline()[2:]
def a(n): return next((t for k in range(len(e)-n) if isqrt(t:=int(e[k:k+n]))**2 == t), "more digits needed")
print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Dec 28 2022
CROSSREFS
Cf. A001113.
Sequence in context: A187433 A269055 A236876 * A232026 A133549 A235946
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Feb 20 2011
EXTENSIONS
a(11)-a(20) from Michael S. Branicky, Dec 28 2022
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 July 29 11:08 EDT 2024. Contains 374734 sequences. (Running on oeis4.)