OFFSET
0,3
COMMENTS
For the general case, the sequence of numbers that are repdigits in base b > 1 satisfies the recurrence a(n) = (b+1)*a(n-b+1) - b*a(n-2*(b-1)) for n >= 2(b-1) with g.f.: (sum_{1 <= i < b} i*x^i)/(1 - (b+1)*x^(b-1) + bx^(2(b-1))). - Chai Wah Wu, May 30 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..700
Eric Weisstein's World of Mathematics, Repdigit.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,9,0,0,0,0,0,0,-8).
FORMULA
From Chai Wah Wu, May 30 2016: (Start)
a(n) = 9*a(n-7) - 8*a(n-14) for n > 13.
G.f.: x*(7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(8*x^14 - 9*x^7 + 1). (End)
Sum_{n>=1} 1/a(n) = (363/20) * A248725 = 2.92153624531838250201... - Amiram Eldar, Jan 21 2022
MATHEMATICA
Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 8], {n, 0, 40}, {d, 7}]]] (* Vincenzo Librandi, Feb 06 2014 *)
LinearRecurrence[{0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, -8}, {0, 1, 2, 3, 4, 5, 6, 7, 9, 18, 27, 36, 45, 54}, 50] (* Harvey P. Dale, Dec 09 2018 *)
PROG
(PARI) is(n)=#Set(digits(n, 8))==1 \\ Charles R Greathouse IV, Feb 15 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Feb 15 1999
EXTENSIONS
Changed offset from 1 to 0 by Vincenzo Librandi, Feb 06 2014
STATUS
approved