login
Expansion of g.f.: (1+x)/(1-41*x).
50

%I #23 Sep 08 2022 08:45:49

%S 1,42,1722,70602,2894682,118681962,4865960442,199504378122,

%T 8179679503002,335366859623082,13750041244546362,563751691026400842,

%U 23113819332082434522,947666592615379815402,38854330297230572431482,1593027542186453469690762

%N Expansion of g.f.: (1+x)/(1-41*x).

%H Vincenzo Librandi, <a href="/A170761/b170761.txt">Table of n, a(n) for n = 0..600</a>

%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (41).

%F a(n) = Sum_{k=0..n} A097805(n,k)*(-1)^(n-k)*42^k. - _Philippe Deléham_, Dec 04 2009

%F a(0) = 1; for n>0, a(n) = 42*41^(n-1). - _Vincenzo Librandi_, Dec 05 2009

%F a(0)=1, a(1)=42, a(n) = 41*a(n-1). - _Vincenzo Librandi_, Dec 10 2012

%F E.g.f.: (42*exp(41*x) - 1)/41. - _G. C. Greubel_, Oct 10 2019

%p k:=42; seq(`if`(n=0, 1, k*(k-1)^(n-1)), n = 0..25); # _G. C. Greubel_, Oct 10 2019

%t CoefficientList[Series[(1+x)/(1-41*x), {x, 0, 30}], x] (* _Vincenzo Librandi_, Dec 10 2012 *)

%t With[{k = 42}, Table[If[n==0, 1, k*(k-1)^(n-1)], {n, 0, 25}]] (* _G. C. Greubel_, Oct 10 2019 *)

%t Join[{1},NestList[41#&,42,20]] (* _Harvey P. Dale_, Feb 02 2022 *)

%o (PARI) vector(26, n, k=42; if(n==1, 1, k*(k-1)^(n-2))) \\ _G. C. Greubel_, Oct 10 2019

%o (Magma) k:=42; [1] cat [k*(k-1)^(n-1): n in [1..25]]; // _G. C. Greubel_, Oct 10 2019

%o (Sage) k=42; [1]+[k*(k-1)^(n-1) for n in (1..25)] # _G. C. Greubel_, Oct 10 2019

%o (GAP) k:=42;; Concatenation([1], List([1..25], n-> k*(k-1)^(n-1) )); # _G. C. Greubel_, Oct 10 2019

%Y Cf. A003945.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Dec 04 2009