A255315 Lower triangular matrix describing the shape of a half hyperbola in the Dirichlet divisor problem.
1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 0, 2, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 0, 2, 2, 1, 1, 1, 1, 1, 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1
Offset: 1
Examples
1; 1, 1; 1, 1, 1; 0, 2, 1, 1; 0, 2, 1, 1, 1; 0, 1, 2, 1, 1, 1; 0, 1, 2, 1, 1, 1, 1; 0, 1, 1, 2, 1, 1, 1, 1; 0, 0, 2, 2, 1, 1, 1, 1, 1; 0, 0, 2, 1, 2, 1, 1, 1, 1, 1; 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1; 0, 0, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1;
Links
- Eric Weisstein's World of Mathematics, Dirichlet Divisor Problem
Programs
-
Mathematica
(* From Mats Granvik, Feb 21 2016: (Start) *) nn = 12; T = Table[ Sum[Table[ If[And[If[n*k <= r, If[n >= k, 1, 0], 0] == 1, If[(n + 1)*(k + 1) <= r, If[n >= k, 1, 0], 0] == 0], 1, 0], {n, 1, r}], {k, 1, r}], {r, 1, nn}]; Flatten[T] A006218a = Table[(n^2 - (2*Sum[Sum[T[[n, k]], {k, 1, kk}], {kk, 1, n}] - n)) + 2*n - Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])], {n, 1, nn}]; A006218b = -Table[(n^2 - (2* Sum[Sum[T[[n, n - k + 1]], {k, 1, kk}], {kk, 1, n}] - n)) - 2*n + Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])], {n, 1, nn}]; (A006218b - A006218a); (* (End) *) (* From Mats Granvik, May 28 2017: (Start) *) nn = 12; T = Table[ Sum[Table[ If[And[If[n*k <= r, If[n >= k, 1, 0], 0] == 1, If[(n + 1)*(k + 1) <= r, If[n >= k, 1, 0], 0] == 0], 1, 0], {n, 1, r}], {k, 1, r}], {r, 1, nn}]; Flatten[T] A006218a = Table[(n^2 - (2*Sum[T[[n, k]]*(n - k + 1), {k, 1, n}] - n)) + 2*n - Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])], {n, 1, nn}]; A006218b = Table[-((n^2 - (2*Sum[T[[n, n - k + 1]]*(n - k + 1), {k, 1, n}] - n)) - 2*n + Round[1 + (1/2)*(-3 + Sqrt[n] + Sqrt[1 + n])]), {n, 1, nn}]; (A006218b - A006218a); (* (End) *)
Formula
See Mathematica program.
Comments