login
a(n) = (38^n - 1)/37.
3

%I #18 Aug 29 2024 17:51:16

%S 0,1,39,1483,56355,2141491,81376659,3092313043,117507895635,

%T 4465300034131,169681401296979,6447893249285203,245019943472837715,

%U 9310757851967833171,353808798374777660499,13444734338241551098963,510899904853178941760595,19414196384420799786902611

%N a(n) = (38^n - 1)/37.

%C Partial sums of powers of 38 (A009982).

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

%H <a href="/index/Par#partial">Index entries related to partial sums</a>.

%H <a href="/index/Q#q-numbers">Index entries related to q-numbers</a>.

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

%F From _Vincenzo Librandi_, Nov 07 2012: (Start)

%F G.f.: x/((1-x)*(1-38*x)).

%F a(n) = 39*a(n-1) - 38*a(n-2).

%F a(n) = floor(38^n/37). (End)

%F E.g.f.: exp(x)*(exp(37*x) - 1)/37. - _Elmo R. Oliveira_, Aug 29 2024

%t LinearRecurrence[{39, -38}, {0, 1}, 30] (* _Vincenzo Librandi_, Nov 07 2012 *)

%o (PARI) A218741(n)=38^n\37

%o (Magma) [n le 2 select n-1 else 39*Self(n-1) - 38*Self(n-2): n in [1..20]]; // _Vincenzo Librandi_, Nov 07 2012

%o (Maxima) A218741(n):=(38^n-1)/37$

%o makelist(A218741(n),n,0,30); /* _Martin Ettl_, Nov 07 2012 */

%Y Cf. similar sequences of the form (k^n-1)/(k-1): A000225, A003462, A002450, A003463, A003464, A023000, A023001, A002452, A002275, A016123, A016125, A091030, A135519, A135518, A131865, A091045, A218721, A218722, A064108, A218724-A218734, A132469, A218736-A218753, A133853, A094028, A218723.

%Y Cf. A009982.

%K nonn,easy

%O 0,3

%A _M. F. Hasler_, Nov 04 2012