login
a(n) = (31^n - 1)/30.
37

%I #21 Mar 12 2023 08:49:36

%S 0,1,32,993,30784,954305,29583456,917087137,28429701248,881320738689,

%T 27320942899360,846949229880161,26255426126284992,813918209914834753,

%U 25231464507359877344,782175399728156197665,24247437391572842127616,751670559138758105956097

%N a(n) = (31^n - 1)/30.

%C Partial sums of powers of 31 (A009975).

%H Vincenzo Librandi, <a href="/A218734/b218734.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/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (32,-31).

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

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

%F a(n) = 32*a(n-1) - 31*a(n-2) for n > 1.

%F a(n) = floor(31^n/30). (End)

%F E.g.f.: exp(16*x)*sinh(15*x)/15. - _Stefano Spezia_, Mar 11 2023

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

%o (PARI) a(n)=31^n\30

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

%o (Maxima) A218734(n):=(31^n-1)/30$

%o makelist(A218734(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-A218733, A132469, A218736-A218753, A133853, A094028, A218723.

%K nonn,easy

%O 0,3

%A _M. F. Hasler_, Nov 04 2012