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!)
A217186 a(n) is the number of digits in the decimal representation of the smallest power of 3 that contains n consecutive identical digits. 1
1, 6, 16, 16, 131, 257, 1014, 3684, 10875, 51142, 51142, 304989 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Number of digits in 3^k is equal to floor(1 + k*log_10(3)).
LINKS
MATHEMATICA
k = 0; Join[{1}, Table[While[d = IntegerDigits[3^k]; prt = Partition[Differences[d], n - 1, 1]; ! MemberQ[prt, Table[0, {n - 1}]], k++]; Length[d], {n, 2, 8}]] (* T. D. Noe, Oct 03 2012 *)
PROG
(Python)
def A217186(n):
....l, x = [str(d)*n for d in range(10)], 1
....for m in range(10**9):
........s = str(x)
........for k in l:
............if k in s:
................return len(s)
........x *= 3
....return 'search limit reached'
# Chai Wah Wu, Dec 17 2014
CROSSREFS
Sequence in context: A222884 A230949 A231023 * A101239 A242331 A335226
KEYWORD
nonn,base,more
AUTHOR
V. Raman, Sep 27 2012
EXTENSIONS
a(12) from Chai Wah Wu, Dec 17 2014
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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)