login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Write n = C(i,3)+C(j,2)+C(k,1) with i>j>k>=0; sequence gives j values.
11

%I #13 Nov 05 2024 03:11:45

%S 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,

%T 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,

%U 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

%N Write n = C(i,3)+C(j,2)+C(k,1) with i>j>k>=0; sequence gives j values.

%C See A194847.

%D D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360.

%F Equals A056557(n) + 1.

%p See A194847.

%o (Python)

%o from math import isqrt, comb

%o from sympy import integer_nthroot

%o def A194848(n): return (k:=isqrt(r:=n+1-comb((m:=integer_nthroot(6*(n+1),3)[0])-(n<comb(m+2,3))+2,3)<<1))+((r<<2)>(k<<2)*(k+1)+1) # _Chai Wah Wu_, Nov 04 2024

%Y The [i,j,k] values are [A194847, A194848, A056558].

%K nonn

%O 0,3

%A _N. J. A. Sloane_, Sep 03 2011