A194848 Write n = C(i,3)+C(j,2)+C(k,1) with i>j>k>=0; sequence gives j values.
1, 1, 2, 2, 1, 2, 2, 3, 3, 3, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 1, 2, 2
Offset: 0
Keywords
References
- D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360.
Programs
-
Maple
See A194847.
-
Python
from math import isqrt, comb from sympy import integer_nthroot def A194848(n): return (k:=isqrt(r:=n+1-comb((m:=integer_nthroot(6*(n+1),3)[0])-(n
(k<<2)*(k+1)+1) # Chai Wah Wu, Nov 04 2024
Formula
Equals A056557(n) + 1.
Comments