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!)
A084187 First occurrence of exactly n 0's in the binary expansion of sqrt(2). 4
2, 15, 63, 58, 9, 1003, 524, 454, 1303, 5335, 22472, 8882, 37469, 32279, 220311, 92988, 698343, 24002, 574131, 3333660, 5940559, 4079882, 8356569, 115885798, 76570753, 202460870, 1034477781, 457034356, 1005210009, 3753736439, 2204906858, 50747186116, 32242071604, 159423417084, 114244391078, 74632918239 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
The binary expansion of sqrt(2) is 1.0110101000001..(A004539) and at position 9, there are five 0's, framed by 1's, so a(5)=9.
MATHEMATICA
With[{d=RealDigits[Sqrt[2], 2, 116*10^6][[1]]}, Flatten[Table[SequencePosition[d, Join[ {1}, PadRight[{}, n, 0], {1}], 1][[All, 1]], {n, 25}]]]+1 (* Harvey P. Dale, Dec 12 2022 *)
PROG
(Python)
from math import isqrt
from itertools import count
def A084187(n):
a, b = 2, (1<<n+2)-1
c = (b+1>>1)|1
for k in count(1-n):
if isqrt(a)&b==c:
return k
a<<=2 # Chai Wah Wu, Jan 25 2024
(C) See Links section of A084186.
CROSSREFS
Cf. A233836.
Sequence in context: A296661 A000181 A047146 * A267596 A119904 A271828
KEYWORD
nonn,hard
AUTHOR
Ralf Stephan, May 18 2003
EXTENSIONS
More terms from Ryan Propper, May 09 2006
a(26)-a(29) from Chai Wah Wu, Jan 25 2024
a(30)-a(36) from Nick Hobson, Feb 15 2024
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 April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)