A015521 a(n) = 3*a(n-1) + 4*a(n-2), a(0) = 0, a(1) = 1.
0, 1, 3, 13, 51, 205, 819, 3277, 13107, 52429, 209715, 838861, 3355443, 13421773, 53687091, 214748365, 858993459, 3435973837, 13743895347, 54975581389, 219902325555, 879609302221, 3518437208883, 14073748835533
Offset: 0
Examples
G.f. = x + 3*x^2 + 13*x^3 + 51*x^4 + 205*x^5 + 819*x^6 + 3277*x^7 + 13107*x^8 + ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- A. Abdurrahman, CM Method and Expansion of Numbers, arXiv:1909.10889 [math.NT], 2019.
- Jean-Paul Allouche, Jeffrey Shallit, Zhixiong Wen, Wen Wu, and Jiemeng Zhang, Sum-free sets generated by the period-k-folding sequences and some Sturmian sequences, arXiv:1911.01687 [math.CO], 2019.
- J. Borowska and L. Lacinska, Recurrence form of determinant of a heptadiagonal symmetric Toeplitz matrix, J. Appl. Math. Comp. Mech. 13 (2014) 19-16, remark 2 for permanent of tridiagonal Toeplitz matrices a=3, b=2.
- Ji Young Choi, A Generalization of Collatz Functions and Jacobsthal Numbers, J. Int. Seq., Vol. 21 (2018), Article 18.5.4.
- E. M. García-Caballero, S. G. Moreno, and M. P. Prophet, A complete view of Viète-like infinite products with Fibonacci and Lucas numbers, Applied Mathematics and Computation 247 (2014) 703-711.
- Dale Gerdemann, Fractal generated from (3,4) recursion A015521, YouTube Video, Dec 4, 2014.
- F. P. Muga II, Extending the Golden Ratio and the Binet-de Moivre Formula, March 2014; Preprint on ResearchGate.
- Index entries for linear recurrences with constant coefficients, signature (3,4).
Crossrefs
Programs
-
Magma
[Floor(4^n/5-(-1)^n/5): n in [0..30]]; // Vincenzo Librandi, Jun 24 2011
-
Maple
seq(round(4^n/5),n=0..25) # Mircea Merca, Dec 28 2010
-
Mathematica
k=0;lst={k};Do[k=4^n-k;AppendTo[lst, k], {n, 0, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *) LinearRecurrence[{3,4}, {0,1}, 30] (* Harvey P. Dale, Jun 26 2012 *) CoefficientList[Series[x/((1 - 4 x) (1 + x)), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
-
PARI
a(n) = 4^n/5-(-1)^n/5; \\ Altug Alkan, Jan 08 2016
-
PARI
first(n) = Vec(x/(1 - 3*x - 4*x^2) + O(x^n), -n) \\ Iain Fox, Dec 30 2017
-
Python
def A015521(n): return ((1<<(n<<1))|1)//5 # Chai Wah Wu, Jun 28 2023
-
Sage
[lucas_number1(n,3,-4) for n in range(0, 24)] # Zerinvary Lajos, Apr 22 2009
Formula
From Paul Barry, Apr 02 2003: (Start)
a(n) = (4^n - (-1)^n)/5.
E.g.f.: (exp(4*x) - exp(-x))/5. (End)
a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*5^(k-1). - Paul Barry, May 13 2003
a(2*n) = 4*a(2*n-1) - 1, a(2*n+1) = 4*a(2*n) + 1. In general this is true for all sequences of the type a(n) + a(n+1) = q^(n): i.e., a(2*n) = q*a(2n-1) - 1 and a(2*n+1) = q*a(2*n) + 1. - Amarnath Murthy, Jul 15 2003
From Emeric Deutsch, Apr 01 2004: (Start)
a(n) = 4^(n-1) - a(n-1).
G.f.: x/(1-3*x - 4*x^2). (End)
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*3^(n-2k)*4^k. - Paul Barry, Jul 29 2004
a(n) = 4*a(n-1) - (-1)^n, n > 0, a(0)=0. - Paul Barry, Aug 25 2004
a(n) = Sum_{k=0..n} A155161(n,k)*2^(n-k), n >= 1. - Philippe Deléham, Jan 27 2009
a(n) = round(4^n/5). - Mircea Merca, Dec 28 2010
The logarithmic generating function 1/5*log((1+x)/(1-4*x)) = x + 3*x^2/2 + 13*x^3/3 + 51*x^4/4 + ... has compositional inverse 5/(4+exp(-5*x)) - 1, the e.g.f. for a signed version of A213127. - Peter Bala, Jun 24 2012
a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-5)^k = (4^n - (-1)^n)/5 = (-1)^(n-1)*Sum_{k=0..n-1} (-4)^k. Equals (-1)^(n-1)*Phi(n,-4), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - Tom Copeland, Apr 14 2014
a(n+1) = 2^(2*n) - a(n), a(0) = 0. - Ben Paul Thurston, Dec 25 2015
a(n) = A247281(n)/5. - Altug Alkan, Jan 08 2016
From Kengbo Lu, Jul 27 2020: (Start)
a(n) = 3*Sum_{k=0..n-1} a(k) + 1 if n odd; a(n) = 3*Sum_{k=0..n-1} a(k) if n even.
a(n) = F(n) + 2*Sum_{k=0..n-1} a(k)*F(n-k) + 3*Sum_{k=0..n-2} a(k)*F(n-k-1), where F(n) denotes the Fibonacci numbers.
a(n) = F(n) + Sum_{k=0..n-1} a(k)*(L(n-k) + F(n-k+1)), where F(n) denotes the Fibonacci numbers and L(n) denotes the Lucas numbers.
a(n) = 3^(n-1) + 4*Sum_{k=0..n-2} 3^(n-k-2)*a(k).
a(m+n) = a(m)*a(n+1) + 4*a(m-1)*a(n).
a(2*n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)*3^(2n-2i-2j-1)*4^(i+j). (End)
Comments