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!)
A244852 Least number k > 0 such that 3^k begins with exactly n consecutive increasing digits. 3

%I #16 Nov 24 2015 17:38:13

%S 1,17,149,146,7997,45419,3972963,27487124,406680034

%N Least number k > 0 such that 3^k begins with exactly n consecutive increasing digits.

%e 3^17 = 129140163 begins with 2 consecutive increasing digits ('12'). Thus a(2) = 17.

%o (Python)

%o def a(n):

%o ..for k in range(1,10**5):

%o ....st = str(3**k)

%o ....count = 0

%o ....if len(st) > n:

%o ......for i in range(len(st)):

%o ........if int(st[i]) == int(st[i+1])-1:

%o ..........count += 1

%o ........else:

%o ..........break

%o ......if count == n:

%o ........return k

%o n = 0

%o while n < 10:

%o ..print(a(n),end=', ')

%o ..n += 1

%Y Cf. A244848, A244849, A244851.

%K nonn,base,fini,full

%O 1,2

%A _Derek Orr_, Jul 07 2014

%E a(7)-a(9) from _Hiroaki Yamanouchi_, Jul 10 2014

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 May 12 15:25 EDT 2024. Contains 372482 sequences. (Running on oeis4.)