login
A194882
Write n = C(i,4)+C(j,3)+C(k,2)+C(l,1) with i>j>k>l>=0; sequence gives i values.
6
3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
OFFSET
0,1
COMMENTS
Each n >= 0 has a unique representation as n = C(i,4)+C(j,3)+C(k,2)+C(l.1) with i>j>k>l>=0. This is the combinatorial number system of degree t = 4, where we get [A194882, A194883, A194884, A127324]. For degree t = 3 see A194847.
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