OFFSET
0,1
COMMENTS
REFERENCES
D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360.
FORMULA
a(n) = m if n < binomial(m+1,4) and a(n) = m+1 otherwise where m = 1+floor((24*(n+2))^(1/4)). - Chai Wah Wu, Dec 10 2024
PROG
(Python)
from math import comb
from sympy import integer_nthroot
def A194882(n): return (m:=integer_nthroot(24*(n+2), 4)[0]+1)+(n>=comb(m+1, 4)) # Chai Wah Wu, Dec 10 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 04 2011
STATUS
approved