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.

A321991 a(n) = round(1/frac(log(n!))) for n > 1; a(0) = a(1) = 0.

Original entry on oeis.org

0, 0, 1, 1, 6, 1, 2, 2, 2, 1, 10, 2, 1, 2, 5, 1, 1, 2, 3, 3, 3, 3, 2, 2, 1, 277, 4, 2, 1, 4, 2, 11, 2, 18, 2, 7, 1, 3, 1, 2, 3, 29, 1, 2, 3, 8, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 107, 6, 3, 2, 1, 1, 5, 2, 1, 1, 4, 2, 1, 5, 2, 1, 3, 1, 15, 2, 1, 3, 1, 5, 1, 6, 2, 7
Offset: 0

Views

Author

M. F. Hasler, Dec 03 2018

Keywords

Comments

Motivated by Stirling's approximation s(n) = n*log(n) - n - log(2*Pi*n)/2 of log(n!), known to verify s(n) + 1/(12n+1) < log(n!) < s(n) + 1/12n. s(n) has the same integer part as log(n!) for all 1 < n < 10^6 at least, cf. A025201, but if the fractional part of log(n!) is less than 1/(12n+1), the approximation would yield the next lower integer. The first such n must have a(n) > 12n, so it is necessarily a record in this sequence, even a record of the sequence (a(n)/n). a(24) = 277 is a close miss, 12*24 = 288.

Examples

			Records occur at a(2) = 1, a(4) = 6, a(10) = 10, a(25) = 277, a(589) = 760, a(2965) = 921, a(3295) = 988, a(3802) = 1326, a(8743) = 1516, a(10634) = 2458, a(15404) = 11472, a(31672) = 56377, a(152170) = 162958, a(307001) = 295209, a(704236) = 491928, a(862929) = 528736, a(904492) = 1612903, a(1356678) = 5098244, ...
Among these, only a(2) = 1, a(4) = 6, and a(25) = 277 set a record for a(n)/n. No value is known for which a(n)/n >= 12.
		

Crossrefs

Programs

  • PARI
    A321991(n)=if(n>1,1\/frac(lngamma(n+1)),0)