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

A279673 The maximum number of coins that can be processed in n weighings where all coins are real except for one LHR-coin starting in the light state.

Original entry on oeis.org

1, 3, 9, 19, 41, 99, 233, 531, 1225, 2851, 6601, 15251, 35305, 81763, 189225, 437907, 1013641, 2346275, 5430537, 12569363, 29093289, 67339363, 155862889, 360759571, 835013705, 1932719395, 4473463369, 10354262163, 23965938537, 55471468387, 128394046889
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.
If an LHR-coin starts in the real state, then the maximum number of coins that can be processed in n weighings is a(n-1).
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.

Examples

			If we have three weighings we are not allowed to have outcomes that consist of three imbalances. That means a(3) = 27 - 8 = 19.
If we have four weighings we are not allowed the following outcomes: =<<<, <=<<, <<<=, <<<<, where any less-than sign can be interchanged with a greater-than sign. Thus a(4) = 81 - 3*8 - 16 = 41.
		

Crossrefs

Programs

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

Formula

a(n) = 2a(n-1) - a(n-2) + 4a(n-3).
G.f.: (1 + x + 4*x^2) / (1 - 2*x + x^2 - 4*x^3). - Colin Barker, Dec 17 2016

A279674 The maximum number of coins that can be processed in n weighings that all are real except for one LHR-coin starting in the heavy state.

Original entry on oeis.org

1, 3, 5, 11, 29, 67, 149, 347, 813, 1875, 4325, 10027, 23229, 53731, 124341, 287867, 666317, 1542131, 3569413, 8261963, 19123037, 44261763, 102448341, 237127067, 548852845, 1270371987, 2940399397, 6805838187, 15752764925, 36461289251, 84393166325, 195336103099
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 odd-numbered imbalance that is not the last one must be followed by a balance.

Examples

			If we have two weighings we are not allowed to have outcomes that consist of two imbalances. That means a(2) = 9 - 4 = 5.
If we have three weighings we are not allowed the following outcomes: =<<, <<=, <<<, where any less-than sign can be interchanged with a greater-than sign. Thus a(3) = 27 - 2*4 - 8 = 11.
		

Crossrefs

Programs

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

Formula

a(n) = 2*a(n-1) - a(n-2) + 4*a(n-3).
G.f.: (1 + x) / (1 - 2*x + x^2 - 4*x^3). - Colin Barker, Dec 17 2016

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

A279684 The maximum number of coins that can be processed in n weighings that all are real except for one LHR-coin starting in the heavy or real state.

Original entry on oeis.org

1, 3, 5, 15, 37, 87, 205, 495, 1173, 2759, 6493, 15263, 35749, 83575, 195181, 455247, 1060533, 2468391, 5740925, 13342975, 30993349, 71956951, 166991501, 387397551, 898427605, 2083016071, 4828379549, 11189823071, 25928070117, 60069313847, 139148806829
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 that start with a balance and 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.

Examples

			If we have two weighings we are not allowed to have outcomes that consist of two imbalances. That means a(2) = 9 - 4 = 5.
If we have three weighings we are not allowed the following outcomes: <<=, <<<, where any less-than sign can be interchanged with a greater-than sign. Thus a(3) = 27 - 4 - 8 = 15.
		

Crossrefs

Programs

  • Magma
    I:=[1,3,5,15,37]; [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..40]]; // Vincenzo Librandi, Dec 16 2016
  • Mathematica
    LinearRecurrence[{3, -1, 1, -2, -8}, {1, 3, 5, 15, 37}, 30]

Formula

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