OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,10,-10).
FORMULA
a(n) = 1/3 * A133201(n).
a(n) = a(n-1)+10*a(n-3)-10*a(n-4). G.f.: 3*x*(x^2+x+1) / ((x-1)*(10*x^3-1)). [Colin Barker, Feb 01 2013]
MATHEMATICA
LinearRecurrence[{1, 0, 10, -10}, {0, 3, 6, 9}, 40] (* Harvey P. Dale, Oct 01 2018 *)
PROG
(Python)
def a(n): q, r = divmod(3*n, 9); return int(str(r) + "9"*q)
print([a(n) for n in range(31)]) # Michael S. Branicky, Feb 07 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paul Curtz, Oct 09 2007
STATUS
approved