OFFSET
1,2
COMMENTS
LINKS
Brady Haran and N. J. A. Sloane, What Number Comes Next? (2018), Numberphile video
N. J. A. Sloane, Illustration of initial terms.
Index entries for linear recurrences with constant coefficients, signature (1, 10, -10).
FORMULA
From Chai Wah Wu, Dec 14 2016: (Start)
a(n) = a(n-1) + 10*a(n-2) - 10*a(n-3) for n>4.
G.f.: x*(10*x^3 - 4*x^2 + x + 1)/((x - 1)*(10*x^2 - 1)). (End)
a(n) = ((26 - (13 - 4*sqrt(10))*(1 - (-1)^n))*sqrt(10^n) - 80)/90 for n>1, a(1)=1. - Bruno Berselli, Dec 15 2016
MATHEMATICA
Join[{1}, LinearRecurrence[{1, 10, -10}, {2, 8, 28}, 30]] (* Vincenzo Librandi, Dec 15 2016 *)
PROG
(Magma) I:=[1, 2, 8, 28]; [n le 4 select I[n] else Self(n-1)+10*Self(n-2)-10*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Dec 15 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Dec 14 2016, following a suggestion from Colin Stewart
STATUS
approved