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.

A054736 Smallest losing position after your opponent has taken k stones in a variation of "Fibonacci Nim".

Original entry on oeis.org

4, 8, 11, 15, 21, 29, 40, 55, 76, 105, 145, 200, 276, 381, 526, 726, 1002, 1383, 1909, 2635, 3637, 5020, 6929, 9564, 13201, 18221, 25150, 34714, 47915, 66136, 91286, 126000, 173915, 240051, 331337, 457337, 631252, 871303, 1202640, 1659977, 2291229, 3162532, 4365172
Offset: 1

Views

Author

Ken Levasseur, Apr 22 2000

Keywords

Comments

In Fibonacci Nim, the first player takes any number of stones (except all) and then each player takes no more than twice the number taken in the previous move. This sequence concerns the game where 2 is replaced by 3.

Examples

			If your opponent has just removed 1 or 2 stones from the pile leaving you with 8, then you lose. Any fewer stones after your opponent has taken 2 will be a win for you.
		

References

  • R. K. Guy, Fair Game: How to play impartial combinatorial games, COMAP's Mathematical Exploration Series, 1989; see p. 22.

Programs

  • Python
    MAXTERM=10**9
    cache, oldk = [MAXTERM], 1
    for nleft in range(1,MAXTERM+1):
      for k in range(1,nleft+1):
        if koldk:
        print(nleft)
        oldk=mk
    # Bert Dobbelaere, Apr 07 2024

Extensions

More terms from Bert Dobbelaere, Apr 07 2024