%I #19 Sep 08 2022 08:45:10
%S 18,270,3438,40950,468558,5217030,56953278,612579510,6513215598,
%T 68618940390,717570463518,7458134171670,77123207545038,
%U 794108867905350,8146979811148158,83322818300333430,849905364703000878,8649148282327007910,87842334540943071198
%N Largest n-digit number minus the product of its digits; i.e., a(n) = 99999... (n 9's) - 9^n.
%H Vincenzo Librandi, <a href="/A083445/b083445.txt">Table of n, a(n) for n = 2..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (20, -109, 90).
%F a(n) = (10^n - 1) - 9^n.
%F a(n) = 20*a(n-1) - 109*a(n-2) + 90*a(n-3) with a(2)=18, a(3)=270, a(4)=3438. - _Harvey P. Dale_, Sep 05 2015
%F G.f.: 18*x^2*(1 - 5*x) / ((1 - x)*(1 - 9*x)*(1 - 10*x)). - _Colin Barker_, Jul 29 2017
%t Table[10^n-9^n-1,{n,2,20}] (* or *) LinearRecurrence[{20,-109,90},{18,270,3438},20] (* _Harvey P. Dale_, Sep 05 2015 *)
%o (Magma) [(10^n-1)-9^n: n in [2..20]]; // _Vincenzo Librandi_, Jul 29 2017
%o (PARI) Vec(18*x^2*(1 - 5*x) / ((1 - x)*(1 - 9*x)*(1 - 10*x)) + O(x^30)) \\ _Colin Barker_, Jul 29 2017
%Y Cf. A083446.
%K base,easy,nonn
%O 2,1
%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 01 2003
%E More terms from _Michel ten Voorde_ Jun 13 2003