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.

A285847 N-positions in the sum-from-product game.

Original entry on oeis.org

6, 8, 9, 10, 12, 14, 15, 18, 20, 21, 24, 26, 28, 30, 33, 35, 36, 38, 39, 40, 42, 44, 45, 48, 50, 51, 54, 56, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 84, 86, 87, 90, 91, 93, 95, 96, 98, 99, 100, 102, 104, 105, 108, 110, 111
Offset: 1

Views

Author

Tanya Khovanova and students, May 06 2017

Keywords

Comments

The sum-from-product game is played by two players alternating moves. Given a positive integer n, a player can choose any two integers a and b, such that ab=n. The player subtracts a+b from n, given that the result is positive. That is, the next player starts with a new number n-a-b. A player without a move loses.
Prime numbers are P-positions.
P-positions are A285304.

Examples

			Numbers 1, 2, 3, 4, 5, 7, 11 are P-positions as there are no legal moves. Therefore, 6 and 8 are N-positions, as the only move from 6 goes to 1, and the only move from 8 goes to 2. It follows that 16 is a P-position as there are two moves: 16-4-4 = 8, and 16-2-8 = 6: both are N-positions.
		

Crossrefs

Cf. A285304.

A340780 Losing positions n (P-positions) in the following game: two players take turns dividing the current value of n by either a prime power > 1 or by A007947(n) to obtain the new value of n. The winner is the player whose division results in 1.

Original entry on oeis.org

1, 12, 18, 20, 28, 44, 45, 50, 52, 63, 68, 75, 76, 92, 98, 99, 116, 117, 120, 124, 147, 148, 153, 164, 168, 171, 172, 175, 188, 207, 212, 216, 236, 242, 244, 245, 261, 264, 268, 270, 275, 279, 280, 284, 292, 312, 316, 325, 332, 333, 338, 356, 363, 369, 378, 387, 388
Offset: 1

Views

Author

Keywords

Comments

The game is equivalent to the game of Nim with the additional allowed move consisting of removing one object from each pile.

Crossrefs

Programs

  • Mathematica
    Clear[moves,los]; A003557[n_]:= {Module[{aux = FactorInteger[n], L=Length[FactorInteger[n]]},Product[aux[[i,1]]^(aux[[i, 2]]-1),{i, L}]]};
    moves[n_] :=moves[n] = Module[{aux = FactorInteger[n], L=Length[ FactorInteger [n]]}, Union[Flatten[Table[n/aux[[i,1]]^j, {i,1,L},{j,1,aux[[i,2]]}],1], A003557[n]]]; los[1]=True; los[m_] := los[m] = If[PrimeQ[m], False, Union@Flatten@Table[los[moves[m][[i]]], {i,1,Length[moves[m]]}] == {False}]; Select[Range[400], los]
Showing 1-2 of 2 results.