A070770 b + c + d where b >= c >= d >= 0 ordered by b then c then d.
0, 1, 2, 3, 2, 3, 4, 4, 5, 6, 3, 4, 5, 5, 6, 7, 6, 7, 8, 9, 4, 5, 6, 6, 7, 8, 7, 8, 9, 10, 8, 9, 10, 11, 12, 5, 6, 7, 7, 8, 9, 8, 9, 10, 11, 9, 10, 11, 12, 13, 10, 11, 12, 13, 14, 15, 6, 7, 8, 8, 9, 10, 9, 10, 11, 12, 10, 11, 12, 13, 14, 11, 12, 13, 14, 15, 16, 12, 13, 14, 15, 16, 17, 18, 7
Offset: 0
Examples
Triangle begins: 0, ; 1; 2, 3; ; 2; 3, 4; 4, 5, 6; ; 3; 4, 5, 5, 6, 7; 6, 7, 8, 9; ; 4; 5, 6; 6, 7, 8; 7, 8, 9, 10; 8, 9, 10, 11, 12; ; ...
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Maple
seq(seq(seq(b+c+d,d=0..c),c=0..b),b=0..10); # Robert Israel, Jun 21 2018
-
PARI
for(x=0,5,for(y=0,x,for(z=0,y,print1(x+y+z", ")))) \\ Charles R Greathouse IV, Sep 17 2015
-
Python
from math import isqrt, comb from sympy import integer_nthroot def A070770(n): return (m:=integer_nthroot(6*(n+1),3)[0])+(a:=n>=comb(m+2,3))+(k:=isqrt(b:=(c:=n+1-comb(m+a+1,3))<<1))-((b<<2)<=(k<<2)*(k+1)+1)+c-2-comb(k+(b>k*(k+1)),2) # Chai Wah Wu, Dec 11 2024