A101946 a(n) = 6*2^n - 3*n - 5.
1, 4, 13, 34, 79, 172, 361, 742, 1507, 3040, 6109, 12250, 24535, 49108, 98257, 196558, 393163, 786376, 1572805, 3145666, 6291391, 12582844, 25165753, 50331574, 100663219, 201326512, 402653101, 805306282, 1610612647, 3221225380, 6442450849, 12884901790
Offset: 0
Examples
a(4) = 79 = 4*34 - 5*13 + 2*4 = 4*a(3) - 5*a(2) + 2*a(1). a(4) = right term in M^4 * [1 1 1], since M^4 * [1 1 1] = [1 46 a(4)], where 46 = A033484(4).
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Joseph Breen and Emma Copeland, Non-orientable Nurikabe, arXiv:2506.12612 [math.CO], 2025. See pp. 1-2, 4.
- Madeleine Goertz and Aaron Williams, The Quaternary Gray Code and How It Can Be Used to Solve Ziggurat and Other Ziggu Puzzles, arXiv:2411.19291 [math.CO], 2024. See pp. 1, 3, 5, 7, 17, 38, 40.
- Kival Ngaokrajang, Illustration of initial terms
- Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
Programs
-
Magma
[6*2^n -3*n-5: n in [0..40]]; // G. C. Greubel, Feb 06 2022
-
Mathematica
a[0]=1; a[1]=4; a[2]=13; a[n_]:= a[n]= 4a[n-1] -5a[n-2] +2a[n-3]; Table[ a[n], {n, 0, 30}] (* Or *) a[n_] := (MatrixPower[{{1, 0, 0}, {2, 2, 0}, {1, 2, 1}}, n].{{1}, {1}, {1}})[[3, 1]]; Table[ a[n], {n, 0, 30}] (* Robert G. Wilson v, Jan 12 2005 *) Table[6*2^n-3n-5,{n,0,40}] (* or *) LinearRecurrence[{4,-5,2},{1,4,13},40] (* Harvey P. Dale, Jun 03 2017 *)
-
PARI
a(n) = if (n<1, 1, 5*(2^n-1)+a(n-1))\\ Kival Ngaokrajang, Sep 26 2014
-
PARI
Vec(-(2*x^2+1)/((x-1)^2*(2*x-1)) + O(x^100)) \\ Colin Barker, Sep 26 2014
-
Sage
[3*(2^(n+1) -n-2) +1 for n in (0..40)] # G. C. Greubel, Feb 06 2022
Formula
a(0)=1, a(1)=4, a(2)=13 and for n>2, a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
a(n) = right term in M^n * [1 1 1], where M = the 3X3 matrix [1 0 0 / 2 2 0 / 1 2 1]. M^n * [1 1 1] = [1 A033484(n) a(n)].
a(0) = 1, for n >= 1, a(n) = 3*A000225(n) + a(n-1). - Kival Ngaokrajang, Sep 26 2014
G.f.: (1+2*x^2)/((1-x)^2*(1-2*x)). - Colin Barker, Sep 26 2014
E.g.f.: 6*exp(2*x) - (5+3*x)*exp(x). - G. C. Greubel, Feb 06 2022
Extensions
New definition from Ralf Stephan, May 17 2007
Comments