cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

User: Richard Joseph Boland

Richard Joseph Boland's wiki page.

Richard Joseph Boland has authored 4 sequences.

A362083 Numbers k such that, via a residue based measure M(k) (see Comments), k is deficient, k+1 is abundant, and abs(M(k)) + abs(M(k+1)) reaches a new maximum.

Original entry on oeis.org

11, 17, 19, 47, 53, 103, 347, 349, 557, 1663, 1679, 2519, 5039, 10079, 15119, 25199, 27719, 55439, 110879, 166319, 277199, 332639, 554399, 665279, 720719, 1441439, 2162159, 3603599, 4324319, 7207199, 8648639, 10810799, 21621599, 36756719, 61261199, 73513439, 122522399, 147026879
Offset: 1

Author

Richard Joseph Boland, Apr 17 2023

Keywords

Comments

The residue-based quantifier function, M(k), measures either abundance (sigma(k) > 2*k), or deficiency (sigma(k) < 2*k), of a positive integer k. The measure is defined by M(k) = (k+1)*(1 - zeta(2)/2) - 1 - (Sum_{j=1..k} k mod j)/k. It follows from the known facts that Sum_{j=1..k} (sigma(j) + k mod j) = k^2 and that the average order of sigma(k)/k is Pi^2/6 = zeta(2) (see derivation below).
M(k) ~ 0 when sigma(k) ~ 2*k and for sufficiently large k, M(k) is positive when k is an abundant number (A005101) and negative when k is a deficient number (A005100). The terms of this sequence are the deficient k such that k+1 is abundant and abs(M(k)) + abs(M(k+1)) achieves a new maximum, somewhat analogous to A335067 and A326393.

Examples

			The first few terms with measure sums and factorizations generated by the Mathematica program:
0.90610439514731535319   35  {{5,1},{7,1}}   36   {{2,2},{3,2}}
1.1735781643159997761    59  {{59,1}}        60   {{2,2},{3,1},{5,1}}
1.3642976724582397229   119  {{7,1},{17,1}} 120   {{2,3},{3,1},{5,1}}
1.3954100615479538209   179  {{179,1}}      180   {{2,2},{3,2},{5,1}}
1.4600817810807682323   239  {{239,1}}      240   {{2,4},{3,1},{5,1}}
1.6088158511317518390   359  {{359,1}}      360   {{2,3},{3,2},{5,1}}
1.7153941935887132383   719  {{719,1}}      720   {{2,4},{3,2},{5,1}}
1.7851979872921589879   839  {{839,1}}      840   {{2,3},{3,1},{5,1},{7,1}}
		

Crossrefs

Cf. A362081 (analogous to superabundant A004394), A362082 (superdeficient).

Programs

  • Mathematica
    Clear[max, Rp, R, seqtable, Mp, M];max = -1; Rp = 0; Mp = -0.644934066; seqtable = {};
    Do[R = Rp + 2 k - 1 - DivisorSigma[1, k];
     M = N[(k)*(1 - Zeta[2]/2) - 1  - R/k, 20];
     If[DivisorSigma[1, k - 1] < 2 (k - 1) && DivisorSigma[1, k] > 2 k &&
       Abs[Mp] + Abs[M] > max, max = Abs[Mp] + Abs[M];
      Print[max, "   ", k - 1, "   ", FactorInteger[k - 1], "   ", k,
       "   ", FactorInteger[k]]; AppendTo[seqtable, {k - 1, k}]]; Rp = R;
     Mp = M, {k, 2, 1000000000}]; seq = Flatten[seqtable]; Table[seq[[2 j - 1]], {j, 1, Length[seq]/2}]

Formula

Derived starting with lemmas 1-3:
1) Sum_{j=1..k} (sigma(j) + k mod j) = k^2.
2) The average order of sigma(k)/k is Pi^2/6 = zeta(2).
3) R(k) = Sum_{j=1..k} k mod j, so R(k)/k is the average order of (k mod j).
Then:
Sum_{j=1..k} sigma(j) ~ zeta(2)*Sum_{j=1..k} j = zeta(2)*(k^2+k)/2.
R(k)/k ~ k - k*zeta(2)/2 - zeta(2)/2.
0 ~ (k+1)*(1 - zeta(2)/2) - 1 - R(k)/k.
Thus M(k) = (k+1)*(1 - zeta(2)/2) - 1 - R(k)/k is a measure of variance about sigma(k) ~ 2*k corresponding to M(k) ~ 0.

A362082 Numbers k achieving record deficiency via a residue-based measure, M(k) = (k+1)*(1 - zeta(2)/2) - 1 - ( Sum_{j=1..k} k mod j )/k.

Original entry on oeis.org

1, 5, 11, 23, 47, 59, 167, 179, 359, 503, 719, 1439, 5039, 6719, 7559, 15119, 20159, 52919, 75599, 83159, 166319, 415799, 720719, 831599, 1081079, 2162159, 4324319, 5266799, 7900199, 10533599, 18345599, 28274399, 41081039, 136936799, 205405199, 410810399
Offset: 1

Author

Richard Joseph Boland, Apr 17 2023

Keywords

Comments

M(k) = (k+1)*(1 - zeta(2)/2) - 1 - ( Sum_{j=1..k} k mod j )/k is a measure of either abundance (sigma(k) > 2*k), or deficiency (sigma(k) < 2*k), of a positive integer k. The measure follows from the known facts that Sum_{j=1..k} (sigma(j) + k mod j) = k^2 and that the average order of sigma(k)/k is Pi^2/6 = zeta(2) (see derivation below).
M(k) ~ 0 when sigma(k) ~ 2*k and for sufficiently large k, M(k) is positive when k is an abundant number (A005101) and negative when k is a deficient number (A005100).
The terms of this sequence are the deficient k for which M(k) < M(m) for all m < k and may be thought of as "superdeficient", contra-analogous to the superabundant numbers A004394 utilizing sigma(k)/k as the measure of abundance, which is otherwise not particularly meaningful as a deficiency measure.
15119=13*1163 is the first term that is composite and subsequently, up to 1000000000, roughly half of the terms are composite.

Examples

			First few terms with their M(k) measure and factorizations as generated by the Mathematica program:
    1   -0.64493406684822643647   {{1,1}}
    5   -0.73480220054467930942   {{5,1}}
   11   -0.86960440108935861883  {{11,1}}
   23   -1.0000783673961085420   {{23,1}}
   47   -1.0528856894638174541   {{47,1}}
   59   -1.1107338698535727552   {{59,1}}
  167   -1.1984137110594038972  {{167,1}}
  179   -1.2619431113124463216  {{179,1}}
  359   -1.3499704727921791778  {{359,1}}
  503   -1.3722914063892448936  {{503,1}}
  719   -1.4363475145965658088  {{719,1}}
		

Crossrefs

Cf. A362081 (analogous to superabundant A004394).
Cf. A362083 (analogous to A335067, A326393).

Programs

  • Mathematica
    Clear[min, Rp, R, seqtable, M]; min = 1; Rp = 0; seqtable = {};
    Do[R = Rp + 2 k - 1 - DivisorSigma[1, k];
      M = N[(k + 1)*(1 - Zeta[2]/2) - 1 - R/k, 20];
      If[M < min, min = M; Print[k, "   ", min, "   ", FactorInteger[k]];
       AppendTo[seqtable, k]];
      Rp = R, {k, 1, 1000000000}];
    Print[seqtable]
  • PARI
    M(n) = (n+1)*(1 - zeta(2)/2) - 1 - sum(k=2, n, n%k)/n;
    lista(nn) = my(m=+oo, list=List()); for (n=1, nn, my(mm = M(n)); if (mm < m, listput(list, n); m = mm);); Vec(list); \\ Michel Marcus, Apr 21 2023

Formula

Derived starting with lemmas 1-3:
1) Sum_{j=1..k} (sigma(j) + k mod j) = k^2.
2) The average order of sigma(k)/k is Pi^2/6 = zeta(2).
3) R(k) = Sum_{j=1..k} k mod j, so R(k)/k is the average order of (k mod j).
Then:
Sum_{j=1..k} sigma(j) ~ zeta(2)*Sum_{j=1..k} j = zeta(2)*(k^2+k)/2.
R(k)/k ~ k - k*zeta(2)/2 - zeta(2)/2.
0 ~ (k+1)*(1 - zeta(2)/2) - 1 - R(k)/k.
Thus M(k) = (k+1)*(1 - zeta(2)/2) - 1 - R(k)/k is a measure of variance about sigma(k) ~ 2*k corresponding to M(k) ~ 0.

A362081 Numbers k achieving record abundance (sigma(k) > 2*k) via a residue-based measure M(k) (see Comments), analogous to superabundant numbers A004394.

Original entry on oeis.org

1, 2, 4, 6, 12, 24, 30, 36, 72, 120, 360, 420, 840, 1680, 2520, 4032, 5040, 10080, 25200, 32760, 65520, 98280, 194040, 196560, 388080, 942480, 1801800, 3160080, 3603600, 6320160, 12640320, 24504480, 53721360, 61981920, 73513440, 115315200, 122522400, 189909720, 192099600, 214885440
Offset: 1

Author

Richard Joseph Boland, Apr 08 2023

Keywords

Comments

The residue-based quantifier function, M(k) = (k+1)*(1 - zeta(2)/2) - 1 - ( Sum_{j=1..k} k mod j )/k, measures either abundance (sigma(k) > 2*k), or deficiency (sigma(k) < 2*k), of a positive integer k. It follows from the known facts that Sum_{j=1..k} (sigma(j) + k mod j) = k^2 and that the average order of sigma(k)/k is Pi^2/6 = zeta(2) (see derivation below).
M(k) ~ 0 when sigma(k) ~ 2*k and for sufficiently large k, M(k) is positive when k is an abundant number (A005101) and negative when k is a deficient number (A005100). The terms of this sequence are the abundant k for which M(k) > M(m) for all m < k, analogous to the superabundant numbers A004394, which utilize sigma(k)/k as the measure. However, sigma(k)/k does not give a meaningful measure of deficiency, whereas M(k) does, thus a sensible notion of superdeficient (see A362082).

Examples

			The abundance measure is initially negative, becoming positive for k > 30. Initial measures with factorizations from the Mathematica program:
   1  -0.64493406684822643647   {{1,1}}
   2  -0.46740110027233965471   {{2,1}}
   4  -0.36233516712056609118   {{2,2}}
   6  -0.25726923396879252765   {{2,1},{3,1}}
  12  -0.10873810118013850374   {{2,2},{3,1}}
  24  -0.10334250226949712257   {{2,3},{3,1}}
  30  -0.096478036147509765322  {{2,1},{3,1},{5,1}}
  36   0.068719763307810925260  {{2,2},{3,2}}
  72   0.12657322670640173542   {{2,3},{3,2}}
		

Crossrefs

Programs

  • Mathematica
    Clear[max, Rp, R, seqtable, M];
    max = -1; Rp = 0; seqtable = {};
    Do[R = Rp + 2 k - 1 - DivisorSigma[1, k];
      M = N[(k + 1)*(1 - Zeta[2]/2) - 1 - R/k, 20];
      If[M > max, max = M; Print[k, "   ", max, "   ", FactorInteger[k]];
       AppendTo[seqtable, k]];
      Rp = R, {k, 1, 1000000000}];
    Print[seqtable]
  • PARI
    M(n) = (n+1)*(1 - zeta(2)/2) - 1 - sum(k=2, n, n%k)/n;
    lista(nn) = my(m=-oo, list=List()); for (n=1, nn, my(mm = M(n)); if (mm > m, listput(list, n); m = mm);); Vec(list); \\ Michel Marcus, Apr 21 2023

Formula

Derived starting with lemmas 1-3:
1) Sum_{j=1..k} (sigma(j) + k mod j) = k^2.
2) The average order of sigma(k)/k is Pi^2/6 = zeta(2).
3) R(k) = Sum_{j=1..k} k mod j, so R(k)/k is the average order of (k mod j).
Then:
Sum_{j=1..k} sigma(j) ~ zeta(2)*Sum_{j=1..k} j = zeta(2)*(k^2+k)/2.
R(k)/k ~ k - k*zeta(2)/2 - zeta(2)/2.
0 ~ (k+1)*(1 - zeta(2)/2) - 1 - R(k)/k.
Thus M(k) = (k+1)*(1 - zeta(2)/2) - 1 - R(k)/k is a measure of variance about sigma(k) ~ 2*k corresponding to M(k) ~ 0.

A347187 Triangle read by rows T(n,k), (n,k>=0), with row/diagonal sums to overpartitions/partitions isomorphic to binomial coefficient sums to 2^n/F(n) (Fibonacci numbers) on Pascal's triangle.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 3, 6, 3, 1, 1, 3, 8, 8, 3, 1, 1, 3, 9, 14, 9, 3, 1, 1, 3, 9, 19, 19, 9, 3, 1, 1, 3, 9, 21, 32, 21, 9, 3, 1, 1, 3, 9, 22, 42, 42, 22, 9, 3, 1, 1, 3, 9, 22, 48, 66, 48, 22, 9, 3, 1, 1, 3, 9, 22, 50, 87, 87, 50, 22, 9, 3, 1
Offset: 0

Author

Richard Joseph Boland, Aug 21 2021

Keywords

Comments

The rows sum to overpartitions (A015128). All T(n,k) intersected by the diagonal line drawn on points {T(n,0), T(n-1,1)} sum to unrestricted partitions of n (A000041). The same lines drawn on Pascal's triangle produce the well-known sums to 2^n and to the Fibonacci numbers, resp.
The central T(2n,n) are A035592.
The triangle is found via a generalization of Euler's pentagonal number theorem over 2 positive integer parameters alpha and beta (a,b here) *[1]. Substituting the quadratic f(a,b,k)=((a+b)k^2-(b-a)k)/2 in place of f(k)=(3k^2-k)/2 (the quadratic of the generalized pentagonal numbers (A001318)) produces partition functions, p(a,b,n), and sigma sum of divisors functions, s(a,b,n), restricted to counting/summing only partitions/divisors with parts equivalent to 0, a or b mod (a+b). Only integers 0 < a < b are considered, to avoid duplicates. The base case is given when a=1, b=2, with corresponding Euler recurrences for unrestricted partitions and sum of divisors (A000203) functions. All other b > a cases produce the mod-restricted analogs. The coefficients of the a,b-generalized recurrences, analogous to A010815, are given by directly inverting the sequence of the mod-restricted partitions, i.e., inverting the a,b-partition generating function. The a=b cases are considered separately because the a=b=1 case yields the overpartitions function and a naturally defined "overdivisors" function.
Let the sequences of P(i+1,i+2,j) over j >= 0 be the i-th rows over i >= 0 to produce this table:
1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 231, ...
1, 0, 1, 1, 1, 2, 2, 3, 4, 4, 7, 6, 10, 11, 13, 18, 19, ...
1, 0, 0, 1, 1, 0, 1, 2, 1, 1, 3, 3, 2, 3, 6, 4, 4, ...
1, 0, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 1, 3, 3, 1, 1, ...
1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 2, 1, 0, 0, 1, 3, ...
1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 2, 1, 0, 0, ...
1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 2, 1, ...
1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, ...
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, ...
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, ...
The finite sequences of the T(n,k) rows appear in order on every row of the table, with i zeros between each T(n,0). As j increases, n eventually exceeds i on a given table row and the triangle rows then overlap and sum. Sequence A000041, as the first table row, for example, is constructed by padding every row of the triangle with n zeros and summing them into a single sequence. Using T(n,k) = p(n+1, n+2, 2*binomial(n+1,2)+k) ensures i is sufficiently large to avoid overlaps.
A recursive method of generating the triangle is found by first observing that since the rows sum to overpartitions (let this be O_p(n)), the recursion for O_p(n) may be used, but must operate on whole rows rather than singular values, so must also specify a correct offset for the starting point of each row when added in the recursive sum. Since overpartitions are given when a=b=1, the recurrence for O_p(n) can be derived by substituting into the a,b-generalized Euler recurrence for p(a,b,n), given by p(a,b,n) = p(a,b,n-f(a,b,1)) + p(a,b,n-f(a,b,-1)) - p(a,b,n-f(a,b,2)) - p(a,b,n-f(a,b,-2)) ..., to produce p(1,1,n) = O_p(n) = 2*O_p(n-1) - 2*O_p(n-4) + 2*O_p(n-9) - ... = Sum_{j=1..floor(sqrt(n))} (-1)^(j+1)*2*O_p(n-j^2). The coefficients of this recurrence may also be derived by direct examination of the inverse of the sequence of overpartitions, i.e., the coefficients of the q-series with g.f. Product_{k>=1} (1-q^k)/(1+q^k) *[2][3]. It follows by induction that each 2*O_p(n-j^2) term is composed of 2 copies of a previous row, with different offsets given by binomial(j,2) and binomial(j+1,2). Thus, with O_p(0)=T(0,0)=1 by definition, we obtain: T(n,k) = Sum_{j=1..floor(sqrt(n))} (-1)^(j+1)*(T(n-j^2, k - binomial(j,2)) + T(n-j^2, k - binomial(j+1,2))).
Analogous to the row/diagonal sums, all a,b-generalized partition values, p(a, b, n), may be computed by summing the T(n,k) given on the integral points of the line y = ((a-b)*x + n)/a, where the left edge of the triangle is taken as the y-axis, +y is in the down direction and (y,x) are proxies for (n,k). The generalization's duplicate values, given by the b > a cases, correspond to lines with positive slope, giving the p(b, a, n) as sums of the T(n,k) on integral points on the lines y = ((b-a)*x + n)/b. The lines of the duplicates are the reflections about the triangle's T(2n,n) symmetry axis. Were the symmetry axis to be taken as the y-axis, the slopes of mutually reflected lines would have the same magnitudes with opposite signs. With the Cartesian approach here, the T(n,k) summing to p(a,b,n) appear on lines with rational, negative slopes on the open interval m = (-oo, 0), with unrestricted partitions given on m = -1 lines. Overpartitions are given on m=0 and the T(n,k) summing to the duplicates, p(b,a,n), then appear on positively sloped lines over the open interval m = (0,1), with unrestricted partitions given again on lines with m = 1/2.
The lines containing the T(n,k) summing to p(a,b,n), when mapped to Pascal's triangle, correspond to a,b-generalized Fibonacci numbers, given by F(a, b, 0) = 1, F(a, b, n) = F(a, b, n-a) + F(a, b, n-b). Swapping a and b then produces the reflected duplicates, F(b, a, n), in the same manner that the p(b, a, n) duplicate values are produced.
For fixed k, T(n, k) = T(n, n-k) increase with n to maximum "eventual" values, given by A000716.
[1] H. Leung demonstrates the generalization for the a=1 cases, with applications to Bell Polynomials (see ref.).
[2] R. da Silva and P. Sakai provide another proof of the overpartitions recurrence in their paper (see ref.).
[3] Merca derives the overpartitions recurrence directly from an identity attributed to Gauss (see ref.).

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  3,  1;
  1,  3,  6,  3,  1;
  1,  3,  8,  8,  3,  1;
  1,  3,  9, 14,  9,  3,  1;
  1,  3,  9, 19, 19,  9,  3,  1;
  1,  3,  9, 21, 32, 21,  9,  3,  1;
  1,  3,  9, 22, 42, 42, 22,  9,  3,  1;
  1,  3,  9, 22, 48, 66, 48, 22,  9,  3,  1;
  1,  3,  9, 22, 50, 87, 87, 50, 22,  9,  3,  1;
		

Crossrefs

Cf. A015128 (row sums), A007318, A000079, A000041 (diagonal sums), A000045, A001318, A000203, A010815, A000716.

Programs

  • Mathematica
    (* via a,b mod restricted partition functions *)
    lim = 20; P[a_,b_,n_] := P[a,b,n] = (F[k_] := ((a+b)k^2 + (a-b)k)/2;
    P[a, b, 0] = 1; If[n == 0, 1, Sum[(-1)^(k+1)
      (If[n-F[k] < 0, 0, P[a,b,n-F[k]]] +
       If[n-F[-k] < 0, 0, P[a,b,n-F[-k]]]), {k,1,n}]]);
    T[n_,k_] := T[n,k] =
    (If[k < 0 || k > n, 0, P[n+1, n+2, 2 Binomial[n+1, 2]+k]]);
    MatrixForm[Table[Table[T[n, k], {k,0,n}], {n,0,lim}]]
    (* via direct recursion *)
    lim = 20;
    T[n_,k_]:=T[n,k]=(T[0,0]=1;
    If[n==0 && k==0, 1, Sum[(-1)^(j+1)(If[k-Binomial[j, 2] < 0, 0, T[n-j^2, k-Binomial[j, 2]]] + If[k-Binomial[j+1, 2] < 0, 0, T[n-j^2, k-Binomial[j+1, 2]]]), {j, 1, Floor[n^(1/2)]}]]);
    MatrixForm[Table[Table[T[n,k],{k,0,n}],{n,0,lim}]]
    (* via a recursion operating on the triangle row sequences *)
    lim=20;S[0]={1};
    Table[S[n]=Sum[(-1)^(j+1)(PadRight[PadLeft[S[n-j^2],n+1-Binomial[j,2]],n+1] + PadRight[PadLeft[S[n-j^2],n+1-Binomial[j+1,2]],n+1]),{j,1,Floor[n^(1/2)]}],{n,1,lim}];
    MatrixForm[Table[S[n],{n,0,lim}]]
    (* p(a,b,n) (and p(b,a,n)) via summing select T(n,k) from the triangle held in memory. *)
    memlim = 300;
    S[0] = {1}; Table[
    S[n] = Sum[(-1)^(j + 1) (PadRight[
           PadLeft[S[n - j^2], n + 1 - Binomial[j, 2]], n + 1] +
          PadRight[PadLeft[S[n - j^2], n + 1 - Binomial[j + 1, 2]],
           n + 1]), {j, 1, Floor[n^(1/2)]}], {n, 1, memlim}];
    y[a_, b_, x_, n_] := -((b - a)/a) x + n/a;
    p[a_, b_, n_] := (x = 0; P = 0;
      If[n == 0, P = 1,
       While[x <= y[a, b, x, n],
        If[y[a, b, x, n] == Floor[y[a, b, x, n]],
         P += If[x > y[a, b, x, n], 0, S[y[a, b, x, n]][[x + 1]]]];
        x += 1]]; P)
  • PARI
    T(n,k) = if (!n && !k, 1, sum(j=1, sqrtint(n), (-1)^(j+1)*(T(n-j^2, k - binomial(j,2)) + T(n-j^2, k - binomial(j+1,2))))); \\ Michel Marcus, Aug 26 2021

Formula

Via a,b mod restricted partition function:
T(n,k) = p(n+1, n+2, 2*binomial(n+1,2)+k), where
p(a,b,n) is the n-th coefficient of the q-series with g.f. Product_{k>=1|k==0,k==a or k==b (mod (a+b))} 1/(1-q^k), or
p(a,b,n) can be computed using its Euler recurrence given by:
p(a,b,n) = Sum_{k>=1|n-f(a,b,k)>=0} (-1)^(k+1)*(p(a,b,n-f(a,b,k)) + p(a,b,n-f(a,b,-k))), where, if n-f(a,b,-k)<0, p(a,b,n-f(a,b,-k))=0 and
f(a,b,k) = ((a+b)*k^2-(b-a)*k)/2.
Via direct recursion:
T(0,0) = 1;
T(n,k) = Sum_{j=1..floor(sqrt(n))} (-1)^(j+1)*(T(n-j^2, k - binomial(j,2)) + T(n-j^2, k - binomial(j+1,2))).
p(a,b,n) (also p(b,a,n)) via sums of T(n,k) on integral lattice points of y(x) = -((b-a)/a)*x + n/a:
p(a, b, n) = Sum_{ x| 0 <= x <= y(x),
y(x)| y(x) = floor(y(x)) } T(y(x), x).