%I #58 Nov 20 2023 08:20:27
%S 0,1,9,61,369,2101,11529,61741,325089,1690981,8717049,44633821,
%T 227363409,1153594261,5835080169,29443836301,148292923329,
%U 745759583941,3745977788889,18798608421181,94267920012849
%N a(n) = 5^n - 4^n.
%C Also, the number of numbers with at most n digits whose largest digit equals 4. - _M. F. Hasler_, May 03 2015
%C a(n) is divisible by 7 iff n is divisible by 6; for example: a(6) = 11529 = 7 * 1647 (see 'Les cahier du bac' or subtract A070365 and A153727 and locate zeros). - _Bernard Schott_, Oct 02 2020
%C a(n) is the number of n-digit numbers whose smallest decimal digit is 5. - _Stefano Spezia_, Nov 15 2023
%D Les Cahiers du Bac, Terminales C & E, Tome 1, 1985, Exercice 109, p. 18; Bac Rouen, Série C, 1978.
%H Muniru A Asiru, <a href="/A005060/b005060.txt">Table of n, a(n) for n = 0..200</a>
%H X. Acloque, <a href="http://www.fortunecity.fr/polynexus/index.html">Polynexus Numbers and other mathematical wonders</a> [broken link]
%H Samuele Giraudo, <a href="http://arxiv.org/abs/1603.01040">Pluriassociative algebras I: The pluriassociative operad</a>, arXiv:1603.01040 [math.CO], 2016.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (9,-20).
%F a(n) = 5*a(n-1) + 4^(n-1). - Xavier Acloque, Oct 20 2003
%F From _Mohammad K. Azarian_, Jan 14 2009: (Start)
%F G.f.: 1/(1-5*x) - 1/(1-4*x).
%F E.g.f.: e^(5*x) - e^(4*x). (End)
%F a(n) = 9*a(n-1) - 20*a(n-2), a(0)=0, a(1)=1. - _Vincenzo Librandi_, Jan 28 2011
%p a:=n->sum(4^(n-j)*binomial(n,j),j=1..n): seq(a(n), n=0..18); # _Zerinvary Lajos_, Jan 04 2007
%t a[n_]:=5^n-4^n; a[Range[0,60]] (* _Vladimir Joseph Stephan Orlovsky_, Jan 27 2011 *)
%t LinearRecurrence[{9,-20},{0,1},30] (* _Harvey P. Dale_, Oct 01 2016 *)
%o (Sage) [lucas_number1(n, 9, 20) for n in range(21)] # _Zerinvary Lajos_, Apr 23 2009
%o (PARI) a(n)=5^n-4^n \\ _M. F. Hasler_, May 03 2015
%o (GAP) List([0..20],n->5^n - 4^n); # _Muniru A Asiru_, Mar 04 2018
%Y Cf. A070365, A153727.
%K nonn,easy
%O 0,3
%A _N. J. A. Sloane_