A347221 Square array T(s,t), s >= 0, t >= 0, read by downward antidiagonals: T(s,t) is the number of nonnegative ordered triples (a,b,c) satisfying a+b+c <= s and a*b*c <= t.
1, 1, 4, 1, 4, 10, 1, 4, 10, 19, 1, 4, 10, 20, 31, 1, 4, 10, 20, 32, 46, 1, 4, 10, 20, 35, 47, 64, 1, 4, 10, 20, 35, 50, 65, 85, 1, 4, 10, 20, 35, 53, 68, 86, 109, 1, 4, 10, 20, 35, 56, 71, 89, 110, 136, 1, 4, 10, 20, 35, 56, 77, 92, 113, 137, 166
Offset: 0
Examples
T(2,0) = 10: (0,0,0), (0,0,1), (0,0,2), (0,1,0), (0,1,1), (0,1,2), (0,2,0), (1,0,0), (1,0,1), (2,0,0). T(0,1) = 1: (0,0,0). Array T(s,t) begins: 1, 1, 1, 1, 1, 1, 1, 1, 1, ... 4, 4, 4, 4, 4, 4, 4, 4, 4, ... 10, 10, 10, 10, 10, 10, 10, 10, 10, ... 19, 20, 20, 20, 20, 20, 20, 20, 20, ... 31, 32, 35, 35, 35, 35, 35, 35, 35, ... 46, 47, 50, 53, 56, 56, 56, 56, 56, ... 64, 65, 68, 71, 77, 77, 83, 83, 84, ... 85, 86, 89, 92, 98, 101, 107, 107, 114, ... 109, 110, 113, 116, 122, 125, 134, 134, 141, ...
Links
- Vo Hoang Anh, O(t^(5/9)) C++ Code
- Vo Hoang Anh, Power Regression C++ Code
- Codeforces, Algorithm discussion
- MathStackExchange, Math discussion
- D. H. J. Polymath, Deterministic methods to find primes, arXiv:1009.3956 [math.NT], 2012.
- Richard Sladkey, A Successive Approximation Algorithm for Computing the Divisor Summatory Function, arXiv:1206.3369 [math.NT], 2012.
Crossrefs
Programs
-
C
int T(int s, int t) { int cnt = 0; for (int a = 0; a <= s; ++a) for (int b = 0; b <= s - a; ++b) for (int c = 0; c <= s - a - b; ++c) if (a * b * c <= t) ++cnt; return cnt; }
-
Mathematica
Table[Function[s, Sum[Boole[a b c <= t], {a, 0, s}, {b, 0, s - a}, {c, 0, s - a - b}]][n - t], {n, 0, 10}, {t, n, 0, -1}] // Flatten (* Michael De Vlieger, Aug 25 2021 *)
-
PARI
T(s, t) = sum(a=0, s, sum(b=0, s-a, sum(c=0, s-a-b, a*b*c <= t))); \\ Michel Marcus, Aug 25 2021
Formula
T(s,t) = Sum_{a=0..s} Sum_{b=0..s-a} Sum_{c=0..s-a-b} [a*b*c<=t], where [] is the Iverson bracket.
T(n, n) = A347252(n).
T(0, t) = A000012(t).
T(s, 0) = A005448(s).
T(s, t) = (3s^2 + 3s) / 2 + A061201(t) + 1, for s > t + 1 > 1.
T(s, 1) = (3s^2 + 3s) / 2 + 2 = A139482(s + 2), for s > t + 1 > 1.
T(s, 2) = (3s^2 + 3s) / 2 + 5 = A124011(s), for s > t + 1 > 2.
T(s, t) = T(s + k, t) - 3*k*s - 3*A000217(k), for s > t + 1 > 5.
T(t + 2 - k, t) = T(t + 2, t) - 3*k*s - 6k + 3*A000217(k), for 0 <= 2k <= (t-1), for t > 4.
When n > 4, T(n, n) = T(n + 2, n) - 6n - 15 = A347252(n) = Sum_{k=1..n} floor(n/k)*A000005(k) + (3n^2 + 3n - 10) / 2 = A061201(n) + (3n^2 + 3n - 10) / 2 = (1/2)n(6g^2 + (6g-2)log(n) - 6g - 6g1 + log^2(n) + 2) + (3n^2)/2 + (3n)/2 - 5 + O(sqrt(n)) where g is the Euler-Mascheroni number and g1 is the first Stieltjes constant.
Comments