cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A102001 A weighted tribonacci, (1,2,4).

Original entry on oeis.org

1, 3, 9, 19, 49, 123, 297, 739, 1825, 4491, 11097, 27379, 67537, 166683, 411273, 1014787, 2504065, 6178731, 15246009, 37619731, 92826673, 229050171, 565182441, 1394589475, 3441155041, 8491063755, 20951731737, 51698479411, 127566197905, 314770083675
Offset: 1

Views

Author

Gary W. Adamson, Dec 23 2004

Keywords

Comments

A102000 is generated from a 4 X 4 matrix, same format. A102002 is another recursive (1,2,4) sequence, generated from the matrix [0 1 0 / 0 0 1 / 4 2 1]. a(n)/a(n-1) tends to 2.46750385... an eigenvalue of M and a root of the characteristic polynomial x^3 - x^2 - 2x - 4.
With offset=0, a(n) is the number of length n sequences on alphabet {0,1,2} such that every set of three consecutive elements contains at least one 2. - Geoffrey Critzer, Feb 01 2012
Number of words of length n over the alphabet {1,2,3} such that no three odd letters appear consecutively. - Armend Shabani, Feb 28 2017

Examples

			a(6) = 123 since M^6 * [1 0 0] = [123 98 76].
a(6) = 123 = 49 + 2*19 + 4*9 = a(5) + 2*a(4) + 4*a(3).
		

Programs

  • Mathematica
    nn=20; a=(1-(2x)^3)/(1-2x); b=x (1-(2x)^3)/(1-2x); CoefficientList[Series[a/(1-b),{x,0,nn}], x]  (* Geoffrey Critzer, Feb 01 2012 *)
    LinearRecurrence[{1,2,4},{1,3,9},40] (* Harvey P. Dale, Nov 02 2016 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; 4,2,1]^(n-1)*[1;3;9])[1,1] \\ Charles R Greathouse IV, Feb 28 2017

Formula

a(n) = a(n-1) + 2*a(n-2) + 4*a(n-3), n>3. a(n) = left term in M^n * [1 0 0], where M = the 3 X 3 matrix [1 1 1 / 2 0 0 / 0 2 0].
a(n) = Sum{k=0..n} T(n-k, k)2^k, T(n, k) = trinomial coefficients (A027907). - Paul Barry, Feb 15 2005
G.f.: x*(1+2*x+4*x^2) / (1-x-2*x^2-4*x^3). - Geoffrey Critzer, Feb 01 2012, corrected by Armend Shabani, Feb 28 2017
G.f.: 1/(1-x-2*x^2-4*x^3), including a(0)=1. - R. J. Mathar, Dec 08 2017

A102002 Weighted tribonacci (1,2,4), companion to A102001.

Original entry on oeis.org

1, 7, 13, 31, 85, 199, 493, 1231, 3013, 7447, 18397, 45343, 111925, 276199, 681421, 1681519, 4149157, 10237879, 25262269, 62334655, 153810709, 379529095, 936489133, 2310790159, 5701884805, 14069421655, 34716351901, 85662734431, 211373124853, 521564001319
Offset: 1

Views

Author

Gary W. Adamson, Dec 23 2004

Keywords

Comments

a(n)/a(n-1) tends to 2.46750385...an eigenvalue of M and a root of the characteristic polynomial x^3 - x^2 - 2x - 4. A102001 is generated from [1 1 1 / 2 0 0 / 0 2 0] but has the same characteristic polynomial and recursive multipliers (1,2,4). A101000 uses the recursive multipliers (1,2,4,8).

Examples

			a(6) = 199 = 85 + 2*31 + 4*13 = a(5) + 2*a(4) + 4*a(3).
a(6) = 199 since M^6 * [1 1 1] = [85 199 493] = [a(5) a(6) a(7)].
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,2,4}, {1,7,13}, 50] (* Harvey P. Dale, Apr 28 2012 *)
  • Sage
    from sage.combinat.sloane_functions import recur_gen3
    it = recur_gen3(1,1,1,1,2,4)
    [next(it) for i in range(32)]
    # Zerinvary Lajos, Jun 25 2008

Formula

a(n) = a(n-1) + 2*a(n-2) + 4*a(n-3), a>3. a(n) = center term in M^n * [1 1 1], where M = the 3X3 matrix [0 1 0 / 0 0 1 / 4 2 1]; M^n * [1 1 1] = [a(n-1) a(n) a(n+1)].
G.f.: -x*(4*x^2+6*x+1)/(4*x^3+2*x^2+x-1). [Harvey P. Dale, Apr 28 2012]

Extensions

More terms from Harvey P. Dale, Apr 28 2012
Showing 1-2 of 2 results.