|
|
A217176
|
|
a(n) is the first digit (from the left) to appear n times in succession in the decimal representation of the Lucas(A217166(n)).
|
|
2
|
|
|
2, 1, 3, 0, 2, 2, 9, 7, 2, 1, 1, 5, 5, 7, 7, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
k = 0; Join[{2}, Table[While[d = IntegerDigits[LucasL[k]]; prt = Partition[Differences[d], n - 1, 1]; ! MemberQ[prt, Table[0, {n - 1}]], k++]; d[[Position[prt, Table[0, {n - 1}]][[1, 1]]]], {n, 2, 8}]] (* T. D. Noe, Oct 03 2012 *)
|
|
PROG
|
(Python)
....if n == 1:
........return 2
....else:
........l, y, x = [str(d)*n for d in range(10)], 2, 1
........for m in range(1, 10**9):
............s = str(x)
............for k in range(10):
................if l[k] in s:
....................return k
............y, x = x, y+x
........return 'search limit reached'
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,hard
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|