OFFSET
1,2
COMMENTS
The sequence is the difference between the tetrahedral number (A000292) and the cubic number (A000578) such that terms are of the form A000292(i)-A000578(j), where A000292(i) >= A000578(j) >= 0.
It appears that sequence terms are more scarce than prime numbers. The number of terms in this sequence (n) and the number of prime numbers up to a(n) are shown in the figure attached in the LINKS section. It can be seen that, for a(n) > 304, n is less than pi(a(n)), where pi is the prime counting function.
LINKS
FORMULA
The difference between the i-th tetrahedral number, t(i), and j-th cubic number, c(j) is d = i*(i+1)*(i+2)/6 - j^3, where i, j >=1 and t(i) >= c(j).
EXAMPLE
a(1)=0 because t(1)-c(1)=1-1=0;
a(2)=2 because t(3)-c(2)=10-8=2;
a(7)=12 because t(4)-c(2)=20-8=12, and t(39)-c(22)=10660-10648=12;
a(19)=55 because t(6)-c(1)=56-1=55, and t(4669)-c(2570)=16974593055-16974593000=55.
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Jun 21 2020
STATUS
approved