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.

A099353 From P-positions in a certain game.

Original entry on oeis.org

0, 2, 7, 12, 18, 25, 35, 45, 56, 68, 83, 98, 114, 131, 149, 170, 191, 213, 236, 260, 285, 313, 341, 370, 400, 431, 463, 496, 530, 565, 603, 641, 680, 720, 761, 803, 846, 890, 935, 983, 1031, 1080, 1130, 1181, 1233, 1286, 1340, 1395, 1451, 1510, 1569
Offset: 0

Views

Author

N. J. A. Sloane, Nov 16 2004

Keywords

Programs

  • Maple
    a:=proc(n) option remember: local j,t: if(n=0)then return 0: else t:=a(n-1)+1: for j from 0 to n-1 do if(t=b(j))then return t+1: elif(tNathaniel Johnston, Apr 28 2011
  • Mathematica
    a[n_] := a[n] = Module[{j, t}, If[n == 0, 0, t = a[n - 1] + 1; For[j = 0, j <= n - 1, j++, Which[t == b[j], Return[t + 1], t < b[j], Break[]]]; t]];
    b[n_] := b[n] = If[n == 0,  0, b[n - 1] + a[n] - Floor[(a[n - 1] + 1)/a[n]] + 2];
    Table[b[n], {n, 0, 50}] (* Jean-François Alcover, Mar 10 2023, after Nathaniel Johnston *)

Formula

See A099352.

A099356 From P-positions in a certain game.

Original entry on oeis.org

0, 1, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 0

Views

Author

N. J. A. Sloane, Nov 16 2004

Keywords

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember: local j, t: if(n=0)then return 0: else t:=a(n-1)+1: for j from 0 to n-1 do if(t=b(j))then return t+1: elif(tNathaniel Johnston, Apr 28 2011

Formula

Let a(n) = this sequence, b(n) = A099357. Then a(n) = the smallest number not in {a(0), b(0), a(1), b(1), ..., a(n-1), b(n-1)}; b(n) = b(n-1) + (-1)^a(n-1)*a(n-1) + a(n) + 1. Apart from initial zero, complement of A099357.

A099357 From P-positions in a certain game.

Original entry on oeis.org

0, 2, 5, 7, 18, 33, 51, 53, 75, 77, 103, 105, 135, 137, 171, 174, 176, 218, 220, 266, 268, 318, 320, 374, 376, 434, 436, 498, 500, 567, 637, 639, 713, 715, 793, 795, 877, 879, 965, 967, 1057, 1059, 1153, 1155, 1253, 1255, 1358, 1465, 1575, 1577
Offset: 0

Views

Author

N. J. A. Sloane, Nov 16 2004

Keywords

Comments

Table 10 in Fraenkel is incorrect from n=6 onward. - Nathaniel Johnston, Apr 28 2011

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember: local j, t: if(n=0)then return 0: else t:=a(n-1)+1: for j from 0 to n-1 do if(t=b(j))then return t+1: elif(tNathaniel Johnston, Apr 28 2011

Formula

See A099356.

Extensions

Edited and corrected by Nathaniel Johnston, Apr 28 2011

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