%I #16 Feb 04 2024 13:14:54
%S 2,1,3,0,2,2,9,7,2,1,1,5,5,7,7,9
%N a(n) is the first digit (from the left) to appear n times in succession in the decimal representation of the Lucas(A217166(n)).
%t 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 *)
%o (Python)
%o def A217176(n):
%o ....if n == 1:
%o ........return 2
%o ....else:
%o ........l, y, x = [str(d)*n for d in range(10)], 2, 1
%o ........for m in range(1,10**9):
%o ............s = str(x)
%o ............for k in range(10):
%o ................if l[k] in s:
%o ....................return k
%o ............y, x = x, y+x
%o ........return 'search limit reached'
%o # _Chai Wah Wu_, Dec 17 2014
%Y Cf. A217166.
%Y Cf. A000032, A215732, A215733, A215734, A215735, A215736, A215737.
%K nonn,base,hard
%O 1,1
%A _V. Raman_, Sep 27 2012
%E a(11) from _Chai Wah Wu_, Dec 17 2014
%E a(12)-a(16) from _Nick Hobson_, Feb 03 2024