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.

A099355 From P-positions in a certain game.

Original entry on oeis.org

0, 4, 10, 14, 21, 25, 27, 31, 33, 38, 44, 48, 55, 59, 61, 65, 67, 71, 74, 78, 84, 89, 92, 96, 102, 107, 110, 114, 120, 124, 131, 135, 137, 141, 143, 148, 154, 158, 165, 169, 171, 175, 177, 181, 184, 188, 194, 199, 202, 206, 212, 217, 220, 224, 230, 235, 237
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 - 1] + a[n] + (-1)^b[n - 1] - (-1)^a[n - 1] + 3];
    Table[b[n], {n, 0, 70}] (* Jean-François Alcover, Mar 10 2023, after Nathaniel Johnston *)

Formula

See A099354.