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”).

A056556
First tetrahedral coordinate; repeat m (m+1)*(m+2)/2 times.
23
0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 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, 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, 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
OFFSET
0,5
COMMENTS
If {(X,Y,Z)} are triples of nonnegative integers with X >= Y >= Z ordered by X, Y and Z, then X=A056556(n), Y=A056557(n) and Z=A056558(n).
From Gus Wiseman, Jul 03 2019: (Start)
Also the maximum number of distinct multiplicities among integer partitions of n. For example, random partitions of 56 realizing each number of distinct multiplicities are:
1: (24,17,6,5,3,1)
2: (10,9,9,5,5,4,4,3,3,2,1,1)
3: (6,5,5,5,4,4,4,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
4: (28,5,5,3,3,3,2,2,1,1,1,1,1)
5: (13,4,4,4,4,4,3,3,3,2,2,2,2,2,2,1,1)
6: (6,5,5,4,4,4,3,3,3,3,2,2,2,2,2,1,1,1,1,1,1)
The maximum number of distinct multiplicities is 6, so a(56) = 6.
(End)
FORMULA
a(n) = floor(x) where x is the (largest real) solution to x^3 + 3x^2 + 2x - 6n = 0; a(A000292(n)) = n+1.
a(n+1) = a(n)+1 if a(n) = A056558(n), otherwise a(n). - Graeme McRae, Jan 09 2007
a(n) = floor(t/3 + 1/t - 1), where t = (81*n + 3*sqrt(729*n^2 - 3))^(1/3). - Ridouane Oudra, Mar 21 2021
a(n) = floor(t + 1/(3*t) - 1), where t = (6*n)^(1/3), for n>=1. - Ridouane Oudra, Nov 04 2022
a(n) = m if n>=binomial(m+2,3) and a(n) = m-1 otherwise where m = floor((6n+6)^(1/3)). - Chai Wah Wu, Nov 04 2024
EXAMPLE
3 is (3+1) * (3+2)/2 = 10 times in the sequence all these occurrences are in consecutive places. The first 3 is at position binomial(3 + 2, 3) = 10, the last one at binomial((3 + 1) + 2, 3) - 1. - David A. Corneth, Oct 14 2022
MATHEMATICA
Table[Table[m, {(m+1)(m+2)/2}], {m, 0, 7}] // Flatten (* Jean-François Alcover, Feb 28 2019 *)
PROG
(PARI) a(n)=my(t=polrootsreal(x^3+3*x^2+2*x-6*n)); t[#t]\1 \\ Charles R Greathouse IV, Feb 22 2017
(Python)
from math import comb
from sympy import integer_nthroot
def A056556(n): return (m:=integer_nthroot(6*(n+1), 3)[0])-(n<comb(m+2, 3)) # Chai Wah Wu, Nov 04 2024
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Jun 26 2000
EXTENSIONS
Incorrect formula deleted by Ridouane Oudra, Nov 04 2022
STATUS
approved