login
A243976
a(n) is the repeating digit in 3^A243975(n).
0
3, 6, 7, 3, 8, 8, 6, 5, 7, 8, 3, 4, 1, 3, 1, 7, 7, 7, 5, 4, 9, 8, 9, 1, 9, 6, 3, 2, 7, 0, 3, 3, 8, 1, 8, 2, 7, 7, 3, 0, 3, 5, 7, 0, 0, 3, 9, 7, 1, 7, 2, 9, 6, 1, 1, 3, 0, 9, 3, 0, 0, 9, 5, 9, 5, 0, 1, 6, 6, 2, 0, 9, 2, 1, 5, 6, 4, 6, 8, 6, 9, 9, 3, 2, 7, 7, 7, 0, 3, 1, 8, 5, 3, 0
OFFSET
1,1
COMMENTS
In case of a tie, choose the smaller integer.
EXAMPLE
3^A243975(4) = 3^29 = 68630377364883 contains four 3's. Thus A243975(4) = 29 and since the repeating digit is 3, a(4) = 3.
PROG
(Python)
def b():
..n = 1
..k = 1
..while k < 50000:
....st = str(3**k)
....if len(st) >= n:
......for a in range(10):
........count = 0
........for i in range(len(st)):
..........if st[i] == str(a):
............count += 1
........if count == n:
..........print(a, end=', ')
..........n += 1
..........k = 0
..........break
......k += 1
....else:
......k += 1
b()
CROSSREFS
Cf. A243975.
Sequence in context: A137427 A177035 A055102 * A198457 A264921 A098990
KEYWORD
nonn,base
AUTHOR
Derek Orr, Jun 16 2014
STATUS
approved