OFFSET
0,3
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
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;
;
...
MAPLE
seq(seq(seq(b+c+d, d=0..c), c=0..b), b=0..10); # Robert Israel, Jun 21 2018
PROG
(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
CROSSREFS
KEYWORD
AUTHOR
Henry Bottomley, May 06 2002
STATUS
approved