This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A127321 #19 Nov 05 2024 12:18:07 %S A127321 0,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, %T A127321 3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, %U A127321 4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 %N A127321 First 4-dimensional hyper-tetrahedral coordinate; repeat m C(m+3,3) times; 4-D analog of A056556. %C A127321 If {(W,X,Y,Z)} are 4-tuples of nonnegative integers with W>=X>=Y>=Z ordered by W, X, Y and Z, then W=A127321(n), X=A127322(n), Y=A127323(n) and Z=A127324(n). These sequences are the four-dimensional analogs of the three-dimensional A056556, A056557 and A056558. %H A127321 Michael De Vlieger, <a href="/A127321/b127321.txt">Table of n, a(n) for n = 0..10625</a>, showing all instances of m=0..21. %F A127321 For W>=0, a(A000332(W+3)) = a(A000332(W+4)-1) = W A127321(n+1) = A127321(n)==A127324(n) ? A127321(n)+1 : A127321(n). %F A127321 a(n) = floor(sqrt(5/4 + sqrt(24*n+1)) - 3/2). - _Ridouane Oudra_, Oct 21 2021 %F A127321 a(n) = m-2 if n<binomial(m+2,4) and a(n) = m-1 otherwise where m = floor((24*(n+2))^(1/4)). # _Chai Wah Wu_, Nov 04 2024 %e A127321 a(23)=3 because a(A000332(3+3)) = a(A000332(3+4)-1) = 3, so a(15) = a(34) = 3. %e A127321 Table of A127321, A127322, A127323, A127324: %e A127321 n W,X,Y,Z %e A127321 0 0,0,0,0 %e A127321 1 1,0,0,0 %e A127321 2 1,1,0,0 %e A127321 3 1,1,1,0 %e A127321 4 1,1,1,1 %e A127321 5 2,0,0,0 %e A127321 6 2,1,0,0 %e A127321 7 2,1,1,0 %e A127321 8 2,1,1,1 %e A127321 9 2,2,0,0 %e A127321 10 2,2,1,0 %e A127321 11 2,2,1,1 %e A127321 12 2,2,2,0 %e A127321 13 2,2,2,1 %e A127321 14 2,2,2,2 %e A127321 15 3,0,0,0 %e A127321 16 3,1,0,0 %e A127321 17 3,1,1,0 %e A127321 18 3,1,1,1 %e A127321 19 3,2,0,0 %e A127321 20 3,2,1,0 %e A127321 21 3,2,1,1 %e A127321 22 3,2,2,0 %e A127321 23 3,2,2,1 %t A127321 Array[Floor[Sqrt[5/4 + Sqrt[24*# + 1]] - 3/2] &, 105, 0] (* or *) %t A127321 Flatten@ Array[ConstantArray[#, Binomial[# + 3, 3]] &, 6, 0] (* _Michael De Vlieger_, Oct 21 2021 *) %o A127321 (Python) %o A127321 from math import comb %o A127321 from sympy import integer_nthroot %o A127321 def A127321(n): return (m:=integer_nthroot(24*(n+2),4)[0]-2)+(n>=comb(m+4,4)) # _Chai Wah Wu_, Nov 04 2024 %Y A127321 Cf. A127322, A127323, A127324, A056556, A056557, A056558, A000332, A000292, A000217. %K A127321 nonn %O A127321 0,6 %A A127321 _Graeme McRae_, Jan 10 2007 %E A127321 Name corrected by _Ridouane Oudra_, Oct 21 2021