The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A244851 Least number k > 0 such that 3^k begins with exactly n consecutive decreasing digits. 3

%I #13 Jul 12 2014 19:14:44

%S 1,7,314,1655,11569,383374,3052836,31843469,458415111,164840426684

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

%C The leading digit of the resulting powers of 3 are: 3, 2, 6, 4, 6, 7, 8, 7, 8, 9. - _Michel Marcus_, Jul 11 2014

%e 3^7 = 2187 begins with 2 consecutive decreasing digits ('21'). Thus a(2) = 7.

%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, A244852.

%K nonn,base,fini,full

%O 1,2

%A _Derek Orr_, Jul 07 2014

%E a(6)-a(10) from _Hiroaki Yamanouchi_, Jul 11 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 June 6 17:29 EDT 2024. Contains 373134 sequences. (Running on oeis4.)