A107583 a(n) = 3^n - 3*n.
1, 0, 3, 18, 69, 228, 711, 2166, 6537, 19656, 59019, 177114, 531405, 1594284, 4782927, 14348862, 43046673, 129140112, 387420435, 1162261410, 3486784341, 10460353140, 31381059543, 94143178758, 282429536409, 847288609368, 2541865828251, 7625597484906, 22876792454877
Offset: 0
Examples
Corresponding numbers m are 1, 3, 11133, 111111111111111111333, ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-7,3).
Programs
-
Magma
[3^n-3*n: n in [0..30]]; // Vincenzo Librandi, Oct 22 2011
-
Mathematica
Table[3^m-3*m, {m, 0, 20}]
-
PARI
a(n)=3^n-3*n \\ Charles R Greathouse IV, Sep 08 2012
Formula
From Elmo R. Oliveira, Sep 09 2024: (Start)
G.f.: (1 - 5*x + 10*x^2)/((1 - 3*x)*(1 - x)^2).
E.g.f.: exp(x)*(exp(2*x) - 3*x).
a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3) for n > 2. (End)
Extensions
Corrected by Charles R Greathouse IV, Sep 08 2012
Comments