login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A280660 Least k such that at least half of the last n digits of 2^k are 9. 1
12, 53, 53, 232, 93, 1862, 93, 3244, 93, 93, 93, 55754, 12864, 55756, 23353, 361353, 16441, 361353, 304362, 361353, 361353, 361353, 361353, 3748854, 3748854, 78055893, 66290232, 119133355, 119133355, 379371432, 20958353, 130883333, 20958353, 130883333 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

See the Mathematical Reflections link for a proof that a(n) exists for all n>1.

LINKS

Jon E. Schoenfield and Chai Wah Wu, Table of n, a(n) for n = 2..44 (terms for n = 2..42 from Jon E. Schoenfield)

Mathematical Reflections, Solution to Problem O316, Issue 6, 2014, p 26.

Jon E. Schoenfield, Magma program

EXAMPLE

For n=2, k=12 with 2^k = 4096.

MAPLE

a:= proc(n) local m, t, k, c, h; m, t:= 10^n, 2048;

      for k from 12 do t:= 2*t mod m; h, c:= t, 0;

        while h>0 do if irem(h, 10, 'h')=9 then c:= c+2 fi od;

        if c >= n then return k fi

      od

    end:

seq(a(n), n=2..16);  # Alois P. Heinz, Jan 07 2017

PROG

(PARI) indexp(n) = my(k = 1, ok = 0}; until (ok, vd = Vecrev(digits(2^k)); nb = sum(j=1, min(n, #vd), vd[j]==9); ok = (nb >= n/2); if (! ok, k++); ); k;

(Python)

def A280660(n):

    m, k, l = 10**n, 1, 2

    while True:

        if 2*str(l).count('9') >= n:

            return k

        k += 1

        l = (l*2) % m # Chai Wah Wu, Jan 07 2017

CROSSREFS

Sequence in context: A195544 A248135 A307916 * A268186 A253130 A213549

Adjacent sequences:  A280657 A280658 A280659 * A280661 A280662 A280663

KEYWORD

nonn,base

AUTHOR

Michel Marcus, Jan 07 2017

EXTENSIONS

a(17)-a(30) from Alois P. Heinz, Jan 07 2017

a(31)-a(35) from Jon E. Schoenfield, Jan 07 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 12:53 EDT 2020. Contains 336323 sequences. (Running on oeis4.)