OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..500
Peter D. Loly and Ian D. Cameron, Frierson's 1907 Parameterization of Compound Magic Squares Extended to Orders 3^L, L = 1, 2, 3, ..., with Information Entropy, arXiv:2008.11020 [math.HO], 2020.
Index entries for linear recurrences with constant coefficients, signature (10,-9).
FORMULA
a(n) = 9*a(n-1) + 9.
a(n) = 9*(9^n-1)/8 = sum_{j=1..n} 9^j = a(n-1)+9^n = 9*A002452(n) = A002452(n+1)-1; write A000918(n+1) in base 2 and read as if written in base 9. - Henry Bottomley, Aug 30 2001
a(n) = 10*a(n-1)-9*a(n-2). G.f.: 9*x / ((x-1)*(9*x-1)). - Colin Barker, Sep 26 2013
EXAMPLE
For n=2, the numbers from 1 to 99 which *have* 0 as a digit are the 9 numbers 10, 20, 30, ..., 90. So a(1) = 99 - 9 = 90.
MATHEMATICA
Table[9(9^n - 1)/8, {n, 0, 20}]
LinearRecurrence[{10, -9}, {0, 9}, 30] (* Harvey P. Dale, Mar 22 2019 *)
PROG
(Magma) [9*(9^n-1)/8: n in [0..20]]; // Vincenzo Librandi, Jul 04 2011
(PARI) a(n)=9^(n+1)\8 \\ Charles R Greathouse IV, Aug 25 2014
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Odimar Fabeny, Mar 10 2000
EXTENSIONS
More terms and revised description from James A. Sellers, Mar 13 2000
More terms and revised description from Robert G. Wilson v, Apr 14 2003
More terms from Colin Barker, Sep 26 2013
STATUS
approved