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.

A061836 a(n) = smallest k>0 such that k+n divides k!.

Original entry on oeis.org

1, 5, 4, 3, 4, 5, 6, 5, 4, 6, 5, 7, 6, 7, 6, 5, 8, 7, 6, 5, 4, 7, 8, 7, 6, 5, 9, 8, 7, 7, 6, 9, 8, 7, 6, 5, 9, 8, 7, 6, 8, 7, 6, 11, 10, 9, 10, 9, 8, 7, 10, 9, 8, 7, 6, 5, 7, 13, 12, 11, 10, 9, 8, 7, 8, 7, 6, 13, 12, 11, 10, 9, 8, 7, 6, 9
Offset: 0

Views

Author

Robert G. Wilson v, Jun 22 2001

Keywords

Comments

Comments from M. F. Hasler, Feb 20 2020 (Start)
The index at which any n > 2 appears for the last time is given by A005096(n) = n! - n.
For m>2, a(n) > m for n > A005096(m).
The integer 1 appears only once as a(0), the integer 2 is the only positive integer which never appears. (End)
It would be nice to have an estimate for the growth of the upper envelope of this sequence - what is lim sup a(n)? The answer seems to be controlled by A333537. - N. J. A. Sloane, Apr 12 2020
Paul Zimmermann suggests that perhaps a(n) is O(log(n)^2). My estimate was n^(1/3), although that seems a bit low. - N. J. A. Sloane, Apr 09 2020

Crossrefs

Cf. A332584 for a "concatenation in base 10" variant.
See also A005096, A332558 (essentially identical to this one).
For records, see A333532 and A333533 (and A333537).

Programs

  • Mathematica
    f[n_] := (k = 1; While[ !IntegerQ[ k! / (k + n) ], k++ ]; k); Table[ f[n], {n, 0, 75} ]
  • PARI
    a(n) = my (f=1); for (k=1, oo, if ((f*=k)%(n+k)==0, return (k))) \\ Rémy Sigrist, Feb 17 2020

Extensions

"k>0" added to definition at the suggestion of Chai Wah Wu, Apr 09 2020. - N. J. A. Sloane, Apr 22 2020