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.

A370888 a(n) = (n-1)*(2*(n-2)!+1).

Original entry on oeis.org

3, 6, 15, 52, 245, 1446, 10087, 80648, 725769, 7257610, 79833611, 958003212, 12454041613, 174356582414, 2615348736015, 41845579776016, 711374856192017, 12804747411456018, 243290200817664019, 4865804016353280020, 102181884343418880021, 2248001455555215360022, 51704033477769953280023, 1240896803466478878720024
Offset: 2

Views

Author

Tanya Khovanova and PRIMES STEP junior group, Mar 05 2024

Keywords

Comments

The maximum deck size to perform the n-card trick using the Fitch Cheney method. This trick is known as the 5-card trick, where the maximum deck size is 52.
The method was later improved to serve a bigger deck described by A030495. In particular, the 5-card trick can be performed with the deck of size 124, and this size is the largest possible.
a(n) = A275929(n)-2.

References

  • Wallace Lee, Math Miracles, published by Seeman Printery, Durham, N.C., 1950.

Crossrefs

Programs

  • Mathematica
    Table[(k - 1) (2 Factorial[k - 2] + 1), {k, 2, 20}]

Formula

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

A371217 The maximum deck size to perform Colm Mulcahy's n-card trick.

Original entry on oeis.org

1, 4, 15, 52, 197, 896, 4987, 33216, 257161, 2262124, 22241671, 241476060, 2867551117, 36960108680, 513753523571, 7659705147976, 121918431264273, 2063255678027668, 36991535865656959, 700377953116334788, 13963866589144933461, 292421219327021540176, 6417047546280200867819
Offset: 1

Views

Author

Tanya Khovanova and PRIMES STEP junior group, Mar 15 2024

Keywords

Comments

With this card trick the magician's assistant gets n cards from a deck, hides one card, and displays the rest, where it is allowed to place some of the displayed cards face down. After that, the magician guesses the hidden card.
The trick for n = 4 was invented by Colm Mulcahy and is a variation of the Fitch Cheney trick. Surprisingly, the largest possible deck is the standard deck of 52 cards.

Examples

			Suppose the deck consists of 4 cards (1,2,3,4), and the assistant gets two cards. If the two cards contain 4, the assistant hides 4 and signals it with the other card face down. If there is no 4, then the cards are a and a+1 modulo 3. The assistant hides a+1, and signals it with a.
		

References

  • Wallace Lee, Math Miracles, published by Seeman Printery, Durham, N.C., 1950.
  • Colm Mulcahy, Mathematical card magic: fifty-two new effects, published by CRC press, 2013.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, n*(n^2-2*n+2),
          ((11*n^2-66*n-61)*a(n-1) -(17*n^2-155*n+134)*a(n-2)
           +(n-3)*(n-81)*a(n-3) +(n-4)*(5*n+26)*a(n-4))/(11*n-72))
        end:
    seq(a(n), n=1..23);  # Alois P. Heinz, Mar 18 2024
  • Mathematica
    Table[1 + (k - 1)(2 Sum[Binomial[k - 1, i] (i - 1)!, {i, 1, k - 1}] + 1), {k, 20}]
  • Python
    from math import factorial
    def A371217(n): return n+((n-1)*sum(factorial(n-1)//((i+1)*factorial(n-i-2)) for i in range(n-1))<<1) # Chai Wah Wu, May 02 2024

Formula

a(n) = 1 + (n-1)*(1 + 2*Sum_{i=1..n-1} (i-1)!*binomial(n-1, i)).
a(n) mod 2 = n mod 2 = A000035(n). - Alois P. Heinz, Mar 22 2024
a(n) ~ 2*exp(1)*(n-1)!. - Vaclav Kotesovec, Jul 27 2024
Showing 1-2 of 2 results.