OFFSET
0,2
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
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
J. S. Myers, R. Schroeppel, S. R. Shannon, N. J. A. Sloane, and P. Zimmermann, Three Cousins of Recaman's Sequence, arXiv:2004:14000 [math.NT], April 2020.
N. J. A. Sloane, Table of n, a(n) for n = 0..100000
MATHEMATICA
f[n_] := (k = 1; While[ !IntegerQ[ k! / (k + n) ], k++ ]; k); Table[ f[n], {n, 0, 75} ]
PROG
(PARI) a(n) = my (f=1); for (k=1, oo, if ((f*=k)%(n+k)==0, return (k))) \\ Rémy Sigrist, Feb 17 2020
CROSSREFS
Cf. A332584 for a "concatenation in base 10" variant.
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jun 22 2001
EXTENSIONS
"k>0" added to definition at the suggestion of Chai Wah Wu, Apr 09 2020. - N. J. A. Sloane, Apr 22 2020
STATUS
approved