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-5 of 5 results.

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

A295781 T(n,k)=Number of nXk 0..1 arrays with each 1 adjacent to 0 or 2 king-move neighboring 1s.

Original entry on oeis.org

2, 3, 3, 5, 9, 5, 8, 19, 19, 8, 13, 49, 56, 49, 13, 21, 123, 198, 198, 123, 21, 34, 297, 665, 1059, 665, 297, 34, 55, 739, 2213, 5263, 5263, 2213, 739, 55, 89, 1825, 7479, 25529, 37897, 25529, 7479, 1825, 89, 144, 4491, 25105, 127731, 262707, 262707, 127731
Offset: 1

Views

Author

R. H. Hardin, Nov 27 2017

Keywords

Comments

Table starts
..2....3.....5.......8.......13.........21..........34............55
..3....9....19......49......123........297.........739..........1825
..5...19....56.....198......665.......2213........7479.........25105
..8...49...198....1059.....5263......25529......127731........630988
.13..123...665....5263....37897.....262707.....1905471......13577504
.21..297..2213...25529...262707....2602065....27085621.....276224518
.34..739..7479..127731..1905471...27085621...409525082....6037613762
.55.1825.25105..630988.13577504..276224518..6037613762..128171125105
.89.4491.84326.3118368.96726819.2819029784.89072774496.2722986415966

Examples

			Some solutions for n=5 k=4
..0..0..0..0. .0..0..0..0. .0..0..1..0. .0..0..0..1. .0..0..0..0
..0..1..0..0. .0..0..0..1. .0..0..0..0. .1..1..0..0. .1..0..1..0
..0..0..0..0. .0..0..0..0. .1..0..0..0. .1..0..0..1. .0..0..1..1
..1..1..0..0. .1..1..0..0. .1..1..0..1. .0..0..1..1. .1..0..0..0
..1..0..0..1. .0..1..0..0. .0..0..0..0. .0..0..0..0. .1..1..0..0
		

Crossrefs

Column 1 is A000045(n+2).
Column 2 is A102001(n+1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +a(n-2)
k=2: a(n) = a(n-1) +2*a(n-2) +4*a(n-3)
k=3: a(n) = 2*a(n-1) +3*a(n-2) +6*a(n-3) -3*a(n-4) +2*a(n-5)
k=4: [order 10]
k=5: [order 22]
k=6: [order 43]
k=7: [order 91]

A279682 The maximum number of coins that can be processed in n weighings where all coins are real except for one LHR-coin.

Original entry on oeis.org

1, 3, 9, 19, 49, 123, 297, 707, 1697, 4043, 9561, 22547, 53073, 124571, 291721, 682083, 1592577, 3713643, 8650425, 20132275, 46818225, 108804923, 252718825, 586701827, 1361496929, 3158352139, 7324384281, 16981143379, 39360789521
Offset: 0

Views

Author

Tanya Khovanova and Konstantin Knop, Dec 16 2016

Keywords

Comments

An LHR-coin is a coin that can change its weight periodically from light to heavy to real to light.
Also the number of outcomes of n weighings such that every even-numbered imbalance that is not the last one must be followed by a balance or every odd-numbered imbalance that is not the last one must be followed by a balance.
The first seven terms coincide with sequence A102001, which counts all the outcomes that don't have three imbalances in a row.
This sequence also counts the possible outcomes starting in the light or heavy state, and for the coins starting in the real state the possible number of outcomes is a subset for coins starting in the light state.

Examples

			Consider a(7): in addition to outcomes that do not have three imbalances in a row, we are not allowed to have any outcomes like <<=<=<<, in which the first (odd-numbered imbalance) and the fourth (even-numbered imbalance) are both followed by an imbalance. We can replace a less-than sign with a greater-than sign. That means a(7) = A102001(7) - 32 = 739 - 32 = 707.
		

Crossrefs

Programs

  • Magma
    I:=[1,3,9,19,49]; [n le 5 select I[n] else 3*Self(n-1)-Self(n-2)+Self(n-3)- 2*Self(n-4)-8*Self(n-5): n in [1..30]]; // Vincenzo Librandi, Dec 18 2016
    
  • Mathematica
    LinearRecurrence[{3, -1, 1, -2, -8}, {1, 3, 9, 19, 49}, 30]
  • PARI
    Vec((1 + x^2 - 6*x^3)/((1 + x)*(1 - 2*x)*(1 - 2*x + x^2 - 4*x^3)) + O(x^40)) \\ Colin Barker, Dec 19 2016

Formula

a(n) = 3*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) - 8*a(n-5).
G.f.: (1 + x^2 - 6*x^3)/((1 + x)*(1 - 2*x)*(1 - 2*x + x^2 - 4*x^3)). - Ilya Gutkovskiy, Dec 17 2016

A103770 A weighted tribonacci sequence, (1,3,9).

Original entry on oeis.org

1, 1, 4, 16, 37, 121, 376, 1072, 3289, 9889, 29404, 88672, 265885, 796537, 2392240, 7174816, 21520369, 64574977, 193709428, 581117680, 1743420757, 5230158649, 15690480040, 47071742800, 141214610761, 423644159521, 1270933677004
Offset: 0

Views

Author

Paul Barry, Feb 15 2005

Keywords

Comments

The weighted tribonacci (1,r,r^2) with g.f. 1/(1 - x - r*x^2 - r^2*x^3) has general term Sum_{k=0..n} T(n-k,k)r^k.
Correspondence: a(n) = b(n+2)*3^n, where b(n) is the sequence of the arithmetic means of the previous three terms defined by b(n) = (1/3)*(b(n-1) + b(n-2) + b(n-3)) with initial values b(0)=0, b(1)=0, b(2)=1; the g.f. for b(n) is B(x) := x^2/(1-(x^1+x^2+x^3)/3), so the g.f. A(x) for a(n) satisfies A(x) = B(3*x)/(3*x)^2. Because b(n) converges to the limit lim_{x->1} (1-x)*B(x) = (1/6)*(b(0) + 2*b(1) + 3*b(2)) = 1/2, it follows that a(n)/3^n also converges to 1/2. This correspondence is valid in general (with necessary changes) for weighted sequences of order (1, p, p^2, p^3, p^4, ..., p^(p-1)) with integer p > 0. Forming such sequences c(n) := c(n-1) + p^1*c(n-2) + ... + p^(p-1)*c(n-p) the limit of c(n)/p^n is 2/(p+1) (see also A001045). - Hieronymus Fischer, Feb 04 2006
a(n)/3^n equals the probability that n will occur as a partial sum in a randomly-generated infinite sequence of 1s, 2s and 3s. The limiting ratio is 1/2. - Bob Selcoe, Jul 05 2013
Number of compositions of n into one sort of 1's, three sorts of 2's, and nine sorts of 3's. - Joerg Arndt, Jul 06 2013
Using the Markov Chain {{0, 1, 0}, {0, 0, 1}, {1/3, 1/3, 1/3}} and raising it to the n-th power can generate this sequence when looking at the element in the third row and third column and reading the numerator. - Robert P. P. McKone, May 25 2021

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 3, 9}, {1, 1, 4}, {1, 27}] (* Robert P. P. McKone, May 25 2021 *)

Formula

G.f.: 1/(1 - x - 3*x^2 - 9*x^3).
a(n) = Sum_{k=0..n} T(n-k, k)*3^k, T(n, k) = trinomial coefficients (A027907).
a(n) = Sum_{k=0..n} 3^(n-k) * (Sum_{i=0..floor((n-k)/2)} C(n-k-i, i)*C(k, n-k-i)). - Paul Barry, Apr 26 2005
a(n)/3^n converges to 1/2. - Hieronymus Fischer, Feb 02 2006
a(n) = a(n-1) + 3*a(n-2) + 9*a(n-3), n >= 3; a(0)=1, a(1)=1, a(2)=4. - Hieronymus Fischer, Feb 04 2006
a(n) = 3^n + b(n) + b(n-1), with b(n) = (-1)^A121262(n+1)*A088137(n+1). - Ralf Stephan, May 20 2007

A103425 a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3).

Original entry on oeis.org

1, 3, 5, 15, 41, 123, 365, 1095, 3281, 9843, 29525, 88575, 265721, 797163, 2391485, 7174455, 21523361, 64570083, 193710245, 581130735, 1743392201, 5230176603, 15690529805, 47071589415, 141214768241, 423644304723, 1270932914165
Offset: 0

Views

Author

Paul Barry, Feb 05 2005

Keywords

Comments

Binomial transform of A103424.
This is a (3, 1, -3) weighted tribonacci sequence, cf. A102001. The current sequence contains primes, including 3, 5, 41, 21523361. Is there an (a, b, c) weighted tribonacci sequence with a, b, c relatively prime which is prime-free? The general linear third-order recurrence equation x(n) = a*x(n-1) + b*x(n-2) + c*x(n-3) has a solution in terms of roots of a cubic polynomial, see Weisstein. - Jonathan Vos Post, Feb 05 2005

Formula

G.f.: (1-5x^2)/((1-x^2)(1-3x)).
E.g.f.: exp(x)(1+sinh(2x)).
a(n) = 1 + (3^n - (-1)^n)/2.
Showing 1-5 of 5 results.