%I #25 Sep 08 2022 08:45:32
%S 1,4,20,106,560,2914,14960,76066,384320,1933954,9707600,48653026,
%T 243613280,1219116994,6098749040,30503261986,152544909440,
%U 762810444034,3814310107280,19072324590946,95363945904800,476826699947074,2384154414150320,11920834820287906,59604362362631360,298022376621898114
%N a(n) = 5^n - 3^n + 2^n.
%C Constants are the prime numbers in decreasing order.
%H Vincenzo Librandi, <a href="/A135159/b135159.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (10,-31,30).
%F a(n) = 5^n - 3^n + 2^n.
%F From _Mohammad K. Azarian_, Jan 16 2009: (Start)
%F G.f.: 1/(1-5*x) - 1/(1-3*x) + 1/(1-2*x).
%F E.g.f.: exp(5*x) - exp(3*x) + exp(2*x). (End)
%F a(n) = 10*a(n-1) - 31*a(n-2) + 30*a(n-3). - _G. C. Greubel_, Sep 30 2016
%e a(4)=560 because 5^4=625, 3^4=81, 2^4=16 and 625-81+16=560.
%t lst={};Do[p=5^n-3^n+2^n;AppendTo[lst, p], {n, 0, 7^2}];lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 19 2008 *)
%t CoefficientList[Series[1/(1 - 5 x) - 1/(1 - 3 x) + 1/(1 - 2 x), {x, 0, 40}], x] (* _Vincenzo Librandi_, May 22 2014 *)
%t Table[5^n - 3^n + 2^n, {n,0,25}] (* or *) LinearRecurrence[{10, -31, 30}, {1, 4, 20}, 25] (* _G. C. Greubel_, Sep 30 2016 *)
%o (Magma) [5^n-3^n+2^n: n in [0..50]]; // _Vincenzo Librandi_, Dec 15 2010
%Y Cf. A000079, A000244, A000351, A007689.
%K nonn,easy
%O 0,2
%A _Omar E. Pol_, Nov 21 2007
%E More terms from _Vincenzo Librandi_, Dec 15 2010