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

A333516
Irregular triangle read by rows in which row n lists the first A000217(n) terms of A002260, n >= 1.
9
1, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6
OFFSET
1,4
COMMENTS
a(n) equals the difference between n and the largest number less than n that can be expressed as the sum of the i-th triangular number and the j-th tetrahedral number for integers i < j.
FORMULA
a(n) = A002260(A124171(n)).
EXAMPLE
Triangle begins:
1;
1, 1, 2;
1, 1, 2, 1, 2, 3;
1, 1, 2, 1, 2, 3, 1, 2, 3, 4;
1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5;
1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6;
1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7;
...
MAPLE
T:= n-> seq([$1..i][], i=1..n):
seq(T(n), n=1..7); # Alois P. Heinz, Apr 10 2020
PROG
(Python)
from math import comb, isqrt
from sympy import integer_nthroot
def A333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))+1, 3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)), 2)+1 # Chai Wah Wu, Nov 10 2024
CROSSREFS
Row sums give A000292.
Right border gives A000027.
Sequence in context: A175190 A317685 A257540 * A228202 A308972 A137900
KEYWORD
nonn,easy,tabf
AUTHOR
Andrew Slattery, Mar 25 2020
STATUS
approved