OFFSET
1,1
COMMENTS
A232729(n) + a(n) = 9*10^(n-1).
LINKS
Robert Israel, Table of n, a(n) for n = 1..990
Index entries for linear recurrences with constant coefficients, signature (10,10,-100).
FORMULA
a(1) = 5, a(3) = 495, a(2*k+1) = 100*a(2*k-1), k > 1.
a(2) = 45, a(4) = 4905, a(2*k) = 110*a(2*k-2) - 1000*a(2*k-4), k > 2.
G.f. = 5*x*(1+x)*(1-x)^2 / ((1-10*x)*(1-10*x^2)). - M. F. Hasler, Nov 30 2013
From Colin Barker, Mar 20 2017: (Start)
a(n) = -45*(10^(n/2-2) - 11*10^(n-3)) for n>2 even.
a(n) = 99*2^(n-3)*5^(n-2) for n>2 odd.
a(n) = 10*a(n-1) + 10*a(n-2) - 100*a(n-3) for n>4. (End)
E.g.f.: (99*cosh(10*x) - 90*cosh(sqrt(10)*x) + 99*sinh(10*x) + 10*x - 9)/200. - Stefano Spezia, Oct 27 2022
EXAMPLE
There are 5 1-digit numbers (5,6,7,8,9) that yield a 2-digit number (10,12,14,16,18), so a(1)=5.
MAPLE
a[1]:=5: t[0]:= 0: t[1]:= 5:
for n from 2 to 50 do
a[n]:= 45*10^(n-2) + 9*t[n-2];
t[n]:= a[n] + t[n-2];
od:
seq(a[n], n=1..50); # Robert Israel, Apr 21 2016
MATHEMATICA
LinearRecurrence[{10, 10, -100}, {5, 45, 495, 4905}, 20] (* Harvey P. Dale, Feb 29 2024 *)
PROG
(PARI) Vec(5*x*(1+x)*(1-x)^2 / ((1-10*x)*(1-10*x^2)) + O(x^30)) \\ Colin Barker, Mar 20 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Lars Blomberg, Nov 29 2013
EXTENSIONS
G.f. corrected and empirical formulas proved by Robert Israel, Apr 21 2016
STATUS
approved