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 A331195 #57 Nov 24 2024 01:23:46 %S A331195 0,0,0,1,0,0,1,1,0,1,1,1,2,0,0,2,1,0,2,1,1,2,2,0,2,2,1,2,2,2,3,0,0,3, %T A331195 1,0,3,1,1,3,2,0,3,2,1,3,2,2,3,3,0,3,3,1,3,3,2,3,3,3,4,0,0,4,1,0,4,1, %U A331195 1,4,2,0,4,2,1,4,2,2,4,3,0,4,3,1,4,3,2,4,3,3,4,4,0,4,4,1,4,4,2,4,4,3,4,4,4,5,0,0 %N A331195 Three-column table read by rows: triples (i,j,k) in order sorted from the left. %H A331195 Mehmet A. Ates, <a href="/A331195/b331195.txt">Table of n, a(n) for n = 0..10000</a> %F A331195 a(3*n) = A056556(n). %F A331195 a(3*n+1) = A056557(n). %F A331195 a(3*n+2) = A056558(n). %e A331195 For n=[0,1,2] to n=[12,13,14], a[n,n+1,n+2] counts up as such: [0,0,0], [1,0,0], [1,1,0], [1,1,1], [2,0,0], etc. %t A331195 ThreeDVectors = List[]; %t A331195 SeqSize = 10; %t A331195 For[i = 0, i <= SeqSize, i++, %t A331195 For[j = 0, j <= i, j++, %t A331195 For[k = 0, k <= j, k++, %t A331195 AppendTo[ThreeDVectors, {i, j, k}] %t A331195 ] %t A331195 ] %t A331195 ]; %t A331195 Flatten[ThreeDVectors] %o A331195 (Python) %o A331195 from math import comb, isqrt %o A331195 from sympy import integer_nthroot %o A331195 def A331195(n): return (m:=integer_nthroot((n<<1)+6,3)[0])-(n<3*comb(m+2,3)) if not (a:=n%3) else (k:=isqrt(r:=(b:=n//3)+1-comb((m:=integer_nthroot((n<<1)-1,3)[0])-(b<comb(m+2,3))+2,3)<<1))-((r<<2)<=(k<<2)*(k+1)+1) if a==1 else (r:=(b:=n//3)-comb((m:=integer_nthroot((n<<1)-3,3)[0])+(b>=comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2) # _Chai Wah Wu_, Nov 23 2024 %Y A331195 Cf. A056556, A056557, A056558, A330709. %Y A331195 See A372667 for the norms of these triples. %K A331195 nonn,easy,tabf %O A331195 0,13 %A A331195 _Mehmet A. Ates_, Jun 08 2020