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

A372264 a(n) = n! - n^2 + 2n - 1.

Original entry on oeis.org

1, 1, 2, 15, 104, 695, 5004, 40271, 362816, 3628719, 39916700, 479001479, 6227020656, 87178291031, 1307674367804, 20922789887775, 355687428095744, 6402373705727711, 121645100408831676, 2432902008176639639, 51090942171709439600, 1124000727777607679559, 25852016738884976639516
Offset: 1

Views

Author

Tanya Khovanova and the MIT PRIMES STEP junior group, Apr 24 2024

Keywords

Comments

The number of distinct cards in a deck that has each card twice to perform the n-card trick, where the assistant chooses the hidden card. This number corresponds to a particular strategy, where if there is a duplicate card, then the assistant puts one of those duplicates on the far left and hides the other. The assistant then arranges all the other cards in nondecreasing order. If there are no duplicates, the strategy is similar to the standard one.

Crossrefs

Programs

  • Mathematica
    Table[(n! - n^2 + 2 n - 1), {n, 1, 25}]
  • Python
    from math import factorial
    def A372264(n): return factorial(n)-(n-1)**2 # Chai Wah Wu, May 02 2024

Formula

E.g.f.: 1/(1 - x) - exp(x)*(1 - x + x^2). - Stefano Spezia, Jun 06 2024

A372265 a(n) = floor((2*n - 3 + sqrt(1 + 4*n!))/2).

Original entry on oeis.org

0, 2, 4, 7, 14, 31, 76, 207, 609, 1913, 6327, 21896, 78922, 295272, 1143549, 4574158, 18859692, 80014850, 348776594, 1559776287, 7147792837, 33526120102, 160785623566, 787685471345, 3938427356638, 20082117944270, 104349745809099, 552166953567254, 2973510046012938, 16286585271694984
Offset: 1

Views

Author

Tanya Khovanova and the MIT PRIMES STEP junior group, Apr 24 2024

Keywords

Comments

Information-theoretic bound on the largest card deck with which one can perform an n-card trick, when the assistant chooses two cards to hide.
The bound is based on the following argument: The assistant has n choose 2 ways to pick the hidden cards and (n-2)! ways to arrange the rest of the cards. The number of strategies can't be smaller than the number of potential guesses by the magician which is d - n + 2 choose 2, where d is the deck size.

Examples

			For n=3, the equation on the deck size becomes the following: d-1 choose 2 can't exceed 3. Thus, a(3) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[(2 n - 3 + Sqrt[1 + 4 n!])/2], {n, 30}]

A372266 a(n) = floor((2*n - 3 + sqrt(1 + 8*(n - 2)!))/2).

Original entry on oeis.org

2, 3, 4, 7, 11, 21, 44, 107, 292, 861, 2704, 8946, 30964, 111611, 417574, 1617219, 6468832, 26671628, 113158082, 493244584, 2205856773, 10108505566, 47413093736, 227385209476, 1113955476453, 5569777382171, 28400403557955, 147572825753404, 780881994429038
Offset: 2

Views

Author

Tanya Khovanova and the MIT PRIMES STEP junior group, Apr 24 2024

Keywords

Comments

An information-theoretic bound on the largest card deck with which one can perform an n-card trick in which the audience chooses two cards to hide.
The bound is based on the following argument: The assistant has (n-2)! ways to arrange the cards. This number can't be smaller than the number of potential guesses by the magician which is binomial(d - n + 2, 2), where d is the deck size.

Examples

			For n=3, the constraint on the deck size becomes: binomial(d-1, 2) can't exceed 1!=1. Thus a(3) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[(2 k - 3 + Sqrt[1 + 8 (k - 2)!])/2], {k, 2, 30}]
Showing 1-3 of 3 results.