A360010 First part of the n-th weakly decreasing triple of positive integers sorted lexicographically. Each n > 0 is repeated A000217(n) times.
1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 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, 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, 8, 8, 8
Offset: 1
Keywords
Examples
Triples begin: (1,1,1), (2,1,1), (2,2,1), (2,2,2), (3,1,1), (3,2,1), (3,2,2), (3,3,1), (3,3,2), (3,3,3), ...
Crossrefs
Programs
-
Mathematica
nn=9;First/@Select[Tuples[Range[nn],3],GreaterEqual@@#&]
-
Python
from math import comb from sympy import integer_nthroot def A360010(n): return (m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3)) # Chai Wah Wu, Nov 04 2024
Formula
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + log(2)/4. - Amiram Eldar, Feb 18 2024
a(n) = m+1 if n>binomial(m+2,3) and a(n) = m otherwise where m = floor((6n)^(1/3)). - Chai Wah Wu, Nov 04 2024