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.

A278950 Start with X = prime(n). Repeatedly replace X with X - ceiling(X/n); a(n) is the number of steps to reach a number <= ceiling(n*log(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 5, 5, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 7, 6, 6, 5, 7, 8, 8, 7, 7, 7, 6, 7, 8, 8, 8, 7, 8, 7, 7, 8, 9, 9, 9, 8, 10, 10, 11, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 13, 12, 12, 12, 12, 12, 12, 11, 11, 12, 13, 12, 13, 12, 13, 13, 13, 15, 15, 16, 16, 16, 15, 15, 16, 16, 16, 15, 15, 15, 15, 14, 15, 16, 15, 15, 15, 15, 14, 15, 15, 15, 16, 16, 16, 17, 18
Offset: 2

Views

Author

Vladimir Shevelev, Dec 02 2016

Keywords

Comments

The sequence is based on the well known Rosser's inequality, prime(n) >= ceiling(n*log(n)), n >= 2, and the Een Eigen Rij algorithm (cf. A278586).

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ NestWhileList[# - Ceiling[#/n] &, Prime@ n, # > Ceiling[n*Log[ n]] &] - 1; Array[f, 80, 2] (* Robert G. Wilson v, Dec 02 2016 *)
  • PARI
    a(n,x=prime(n))=my(t=ceil(log(n)*n),s); while(x>t, x -= (x-1)\n + 1; s++); s \\ Charles R Greathouse IV, Dec 02 2016

Extensions

More terms from Peter J. C. Moses, Dec 02 2016