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.

Showing 1-6 of 6 results.

A298826 a(n) = A298825(n)/n.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -2, 0, 0, 0, 0, 4, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -2
Offset: 1

Views

Author

Mats Granvik, Jan 27 2018

Keywords

Comments

From Mats Granvik, Apr 06 2019: (Start)
Positions of nonzero entries appear to be given by A001694.
The limit lim_{k->oo} Sum_{n=1..k} a(n)/n appears to converge to some number.
Sum_{n=1..30000} a(n)/n = 1.31897... This appears to be in agreement with:
(1/30000)*Sum_{n<=30000} log(A014963(n))*log(A014963(n+2)) = 1.30351...
If the limit can be proven to converge to a number greater than 1, then it is true that Sum_{n<=X} log(A014963(n))*log(A014963(n+2)) > X, where ">" means "greater than" as in usual inequality notation.
The twin prime conjecture, according to Terence Tao on his blog, is that Sum_{n<=X} log(A014963(n))*log(A014963(n+2)) >> X where ">>" means "asymptotically greater than". There he also says that the first Hardy Littlewood conjecture states that Sum_{n<=X} log(A014963(n))*log(A014963(n+h)) = S(h)*X + o(X), where "S(h)" is the singular series.
Compare this to the prime number theorem which is lim_{X->oo} (Sum_{n<=X} log(A014963(n)))/X = 1.
(End)

Crossrefs

Programs

  • Mathematica
    nn = 90;
    A = Table[Boole[Mod[n, k] == 0], {n, nn}, {k, nn}];
    B = Table[If[Mod[k, n] == 0, MoebiusMu[n]*n, 0], {n, nn}, {k, nn}];
    T = (A.B);
    TwinMangoldt = Table[a = T[[All, kk]];
        F1 = Table[If[Mod[n, k] == 0, a[[n/k]], 0], {n, nn}, {k, nn}];
        b = T[[All, kk + 2]];
        F2 = Table[ If[Mod[n, k] == 0, b[[n/k]], 0], {n, nn}, {k, nn}];
        (F1.F2)[[All, 1]], {kk, nn - 2}];
    TT = Transpose[TwinMangoldt];
    Table[Sum[TT[[n, k]], {k, n}]/n, {n, nn - 2}]
    (* This faster alternate conjectured program agrees with Antti Karttunen's precomputed list of numbers. *)
    nn = 108; b = 4*Select[Range[1, nn, 2], SquareFreeQ]; bb = Table[DivisorSigma[0, n]*(MoebiusMu[n] + Sum[If[b[[j]] == n, LiouvilleLambda[n]*2/3, 0], {j, 1, Length[b]}]), {n, 1, nn}];
    cc = Table[Sum[If[Mod[n, k] == 0, bb[[n/k]]*DivisorSigma[0, k], 0], {k, 1, n}], {n, 1, nn}] (* Mats Granvik, Mar 17 2019 *)
    (* Dirichlet generating function *) s=7; nn=2500; N[Zeta[s]^2*Product[(1 - 2 Prime[j]^(-s)), {j, 1, nn}]*(1 + Sum[1/2/2^(n*(s - 1)), {n, 2, nn}]), 40] (* Mats Granvik, Apr 06 2019 *)
  • PARI
    up_to = 256;
    DirConv(ma,h) = { my(u = matsize(ma)[1], md = matrix(u,u)); for(n=1,u-h,for(k=1,u,md[n,k] = sumdiv(k,d,ma[n,d]*ma[n+h,k/d]))); (md); };
    A298826list(up_to) = { my(h=2, matA = matrix(up_to+h,up_to+h,n,k,!(n%k)), matB = matrix(up_to+h,up_to+h,n,k,(!(k%n))*moebius(n)*n), matT = matA*matB, matD = DirConv(matT,2)); vector(up_to,i,(1/i)*sum(j=1,i,matD[j,i])); };
    v298826 = A298826list(up_to);
    A298826(n) = v298826[n]; \\ Antti Karttunen, Sep 30 2018

Formula

a(n) = Sum_{k=1..n} (A298674(k, n))/n = A298825(n)/n.
Conjecture: a(n) = (-1)^(n+1) * Sum_{d|n} A076479(d). - Daniel Suteu, Apr 04 2019
From Mats Granvik, Apr 06 2019: (Start)
The Dirichlet generating function, after Daniel Suteu above and Álvar Ibeas in A076479, appears to be: Sum_{n>=1} a(n)/n^s = zeta(s)^2*(Product_{j>=1} (1 - 2*prime(j)^(-s)))*(1 + Sum_{n>=2} ((1/2)/2^(n*(s - 1)))).
Conjectured formula: Let b(n) = 4*A056911(n) and c(n) = A000005(n)*A008683(n) + Sum_{j=1..length(b(1..N))} [b(j)=n]*A008836(n)*2/3) then a(n) = Sum_{k=1..n}[k|n] c(n/k)*A000005(k). (End)
Conjecture: a(n) = (-1)^(n+1) * Sum_{d|n} mu(d)*tau(d)*tau(n/d). - Ridouane Oudra, Nov 19 2019
The conjectured Dirichlet generating function simplifies to: Sum_{n>=1} a(n)/n^s = zeta(s)^2*(Product_{j>=1} (1 - 2*prime(j)^(-s)))*(1 + 2^(1 - s)/(2^s - 2)). - Steven Foster Clark, Sep 12 2022
Conjecture: abs(a(n)) = A361430(n). - Vaclav Kotesovec, Mar 12 2023
Conjecture: a(n) is multiplicative with a(p^e) = (-1)^p * (e-1) for prime p and e > 0. That conforms to the conjectured Dirichlet generating function (compare Steven Foster Clark, Sep 12 2022). - Werner Schulte, Jun 09 2025

Extensions

More terms from Antti Karttunen, Sep 30 2018

A298674 Square matrix read by antidiagonals up. Matrix of Dirichlet series associated with Sum_{n<=X} MangoldtLambda(n) * MangoldtLambda(n+2).

Original entry on oeis.org

1, 1, 2, 1, -2, -1, 1, 2, 2, 3, 1, -2, -1, -1, 2, 1, 2, -1, 3, 2, -2, 1, -2, 2, -1, -3, -4, 2, 1, 2, -1, 3, 2, -2, 2, 4, 1, -2, -1, -1, -3, 2, 2, 0, -3, 1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 1, -2, -1, -1, 2, 2, -5, 0, -3, -4, 2, 1, 2, -1, 3, -3, -2, 2, 4, -3, -6, 2, -3
Offset: 1

Views

Author

Mats Granvik, Jan 24 2018

Keywords

Comments

For n > 1: Sum_{k>=1} T(n,k) = log(A014963(n))*log(A014963(n+2)).
Triangular submatrix of this matrix is A298824.
Row sums of A298824 are found in A298825. A298825(n)/n = A298826(n). A298826 appears to be relevant to the heuristic for the twin prime conjecture.
By varying the prime gap "h" in the program it appears that prime gaps that are powers of "h" have the same row sums of the triangular submatrix, which in turn seems to imply that prime gaps equal to powers of "h" have the same density.

Examples

			The square matrix starts:
{
  {1,  2, -1,  3,  2, -2,  2,  4, -3,  4,  2, -3},
  {1, -2,  2, -1,  2, -4,  2,  0,  3, -4,  2, -2},
  {1,  2, -1,  3, -3, -2,  2,  4, -3, -6,  2, -3},
  {1, -2, -1, -1,  2,  2,  2,  0, -3, -4,  2,  1},
  {1,  2,  2,  3, -3,  4, -5,  4,  3, -6,  2,  6},
  {1, -2, -1, -1,  2,  2,  2,  0, -3, -4,  2,  1},
  {1,  2, -1,  3,  2, -2, -5,  4, -3,  4,  2, -3},
  {1, -2,  2, -1, -3, -4,  2,  0,  3,  6,  2, -2},
  {1,  2, -1,  3,  2, -2,  2,  4, -3,  4, -9, -3},
  {1, -2, -1, -1, -3,  2,  2,  0, -3,  6,  2,  1}
}
		

Crossrefs

Programs

  • Mathematica
    h = 2; nn = 14;
    A = Table[If[Mod[n, k] == 0, 1, 0], {n, nn}, {k, nn}];
    B = Table[If[Mod[k, n] == 0, MoebiusMu[n]*n, 0], {n, nn}, {k, nn}];
    T = (A.B);
    TableForm[TwinMangoldt = Table[a = T[[All, kk]];
        F1 = Table[If[Mod[n, k] == 0, a[[n/k]], 0], {n, nn}, {k, nn}];
        b = T[[All, kk + h]];
        F2 = Table[If[Mod[n, k] == 0, b[[n/k]], 0], {n, nn}, {k, nn}];
        (F1.F2)[[All, 1]], {kk, nn - h}]];
    Flatten[Table[TwinMangoldt[[n - k + 1, k]], {n, nn - h}, {k, n}]]

Formula

Let h = 2.
Let A(n,k) = 1 if n mod k = 0, otherwise 0.
Let B(n,k) = A008683(n)*n if k mod n = 0, otherwise 0.
Let T = A.B (where "." is matrix multiplication).
Take the Dirichlet convolution of a row in T(n,k) and a row in T(n+h,k) for n=1,2,3,4,5,... infinity, and form this matrix from the first columns of the convolutions. See Mathematica program for more precise description.

A298824 Triangle read by rows. The transpose of the upper triangular part of the square matrix A298674.

Original entry on oeis.org

1, 2, -2, -1, 2, -1, 3, -1, 3, -1, 2, 2, -3, 2, -3, -2, -4, -2, 2, 4, 2, 2, 2, 2, 2, -5, 2, -5, 4, 0, 4, 0, 4, 0, 4, 0, -3, 3, -3, -3, 3, -3, -3, 3, -3, 4, -4, -6, -4, -6, -4, 4, 6, 4, 6, 2, 2, 2, 2, 2, 2, 2, 2, -9, 2, -9, -3, -2, -3, 1, 6, 1, -3, -2, -3, 1, 6, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -11, 2, -11
Offset: 1

Views

Author

Mats Granvik, Jan 27 2018

Keywords

Examples

			Triangle begins:
  ==========================================================
  n\k|  1   2   3   4   5   6   7   8   9  10   11  12   13
  ---+------------------------------------------------------
   1 |  1
   2 |  2  -2
   3 | -1   2  -1
   4 |  3  -1   3  -1
   5 |  2   2  -3   2  -3
   6 | -2  -4  -2   2   4   2
   7 |  2   2   2   2  -5   2  -5
   8 |  4   0   4   0   4   0   4   0
   9 | -3   3  -3  -3   3  -3  -3   3  -3
  10 |  4  -4  -6  -4  -6  -4   4   6   4   6
  11 |  2   2   2   2   2   2   2   2  -9   2   -9
  12 | -3  -2  -3   1   6   1  -3  -2  -3   1    6   1
  13 |  2   2   2   2   2   2   2   2   2   2  -11   2  -11
		

Crossrefs

Row sums are A298825.
Cf. A298674.

Programs

  • Mathematica
    Transpose[UpperTriangularize[A298674]]

Formula

T(n,k) = A298674(k,n), n <= k.

A306653 a(n) = Sum_{m=1..n} Sum_{k=1..n} [k divides n]*[n/k divides m]*A008683(n/k)*n/k*[k divides m + 2^p]*A008683(k)*k, where p can be a positive integer: 1,2,3,4,5,...

Original entry on oeis.org

1, -2, -2, 2, -2, 4, -2, 0, 0, 4, -2, -4, -2, 4, 4, 0, -2, 0, -2, -4, 4, 4, -2, 0, 0, 4, 0, -4, -2, -8, -2, 0, 4, 4, 4, 0, -2, 4, 4, 0, -2, -8, -2, -4, 0, 4, -2, 0, 0, 0, 4, -4, -2, 0, 4, 0, 4, 4, -2, 8, -2, 4, 0, 0, 4, -8, -2, -4, 4, -8, -2, 0, -2, 4, 0, -4, 4, -8, -2, 0, 0, 4, -2, 8, 4
Offset: 1

Views

Author

Mats Granvik, Mar 03 2019

Keywords

Comments

It appears that for p=1 and p=2, a(n) is identically the same for all n except for n equal to multiples of 16. See A306652 for comparison.

Crossrefs

Programs

  • Mathematica
    (* Dirichlet Convolution. *)
    p=1;
    a[n_] := 1/n*Sum[Sum[If[Mod[n, k] == 0, 1, 0]*If[Mod[m, n/k] == 0, 1, 0]*If[Mod[m + 2^p, k] == 0, 1, 0]*MoebiusMu[n/k]*n/k*MoebiusMu[k]*k, {k, 1, n}], {m, 1, n}]; a /@ Range[85]
    (* conjectured faster program *)
    nn = 85;
    b = 4*Select[Range[1, nn, 2], SquareFreeQ];
    bb = Table[DivisorSigma[0, n]*(MoebiusMu[n] + Sum[If[b[[j]] == n, LiouvilleLambda[n]*2/3, 0], {j, 1, Length[b]}]), {n, 1, nn}]
  • PARI
    A306653(n) = (1/n)*sum(m=1, n, sumdiv(n, k, if( !(m%(n/k)) && !((m+(2^1))%k), n*moebius(n/k)*moebius(k),0))); \\ Antti Karttunen, Mar 15 2019

Formula

a(n) = 1/n * Sum_{m=1..n} Sum_{k=1..n} [k divides n]*[n/k divides m]*[k divides m + 2^p]*A008683(n/k)*n/k*A008683(k)*k, where p can be any positive integer: 1,2,3,4,5,...
a(n) = A000005(n)*(A008683(n) + Sum_{j=1..n} [4*A056911(j)=n]*A008836(n)*2/3) (conjectured formula verified for n=1..2500).
Dirichlet generating function, after Daniel Suteu in A298826 and Álvar Ibeas in A076479, appears to be: Sum_{n>=1} a(n)/n^s = (Product_{j>=1} (1 - 2*prime(j)^(-s)))*(1 + Sum_{n>=2} (1/2/2^(n*(s - 1)))). - Mats Granvik, Apr 07 2019
The conjectured Dirichlet generating function simplifies to: Sum_{n>=1} a(n)/n^s = (Product_{j>=1} (1 - 2*prime(j)^(-s)))*(1 + 2^(1 - s)/(2^s - 2)). - Steven Foster Clark, Sep 23 2022

A306652 a(n) = Sum_{m=1..n} Sum_{k=1..n} [k divides n]*[n/k divides m]*[k divides m + 4].

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 2, 4, 2, 8, 2, 4, 4, 10, 2, 4, 2, 8, 4, 4, 2, 12, 2, 4, 2, 8, 2, 8, 2, 14, 4, 4, 4, 8, 2, 4, 4, 12, 2, 8, 2, 8, 4, 4, 2, 20, 2, 4, 4, 8, 2, 4, 4, 12, 4, 4, 2, 16, 2, 4, 4, 14, 4, 8, 2, 8, 4, 8, 2, 12, 2, 4, 4, 8, 4, 8, 2, 20, 2, 4, 2, 16, 4
Offset: 1

Views

Author

Mats Granvik, Mar 03 2019

Keywords

Comments

According to the first Hardy-Littlewood conjecture, the cousin primes have the same asymptotic density as the twin primes. In an analogy of Dirichlet convolutions A147848 corresponds to the twin primes while this sequence corresponds to the cousin primes, and it appears that this sequence differs from A147848 at multiples of 16. See A306653 for comparison.

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Sum[If[Mod[n, k] == 0, If[Mod[m, n/k] == 0, 1, 0], 0]*If[Mod[m + 4, k/1] == 0, 1, 0], {k, 1, n}], {m, 1, n}]; a /@Range[85] (* Dirichlet Convolution. *)
    a[n_] := Sum[If[Mod[n, k] == 0, Sum[If[Mod[4, j] == 0, If[GCD[k, n/k] == j, j, 0], 0], {j, 1, n}], 0], {k, 1, n}]; a /@Range[85] (* GCD sum. *)
    a[n_] := Sum[If[Mod[4, j] == 0, j*Count[Divisors[n], d_ /; GCD[d, n/d] == j], 0], {j, 1, n}]; a /@Range[85] (* After Jean-François Alcover in A034444. *)
  • PARI
    A306652(n) = sum(m=1, n, sumdiv(n, k, !(m%(n/k)) && !((m+4)%k))); \\ Antti Karttunen, Mar 13 2019

Formula

a(n) = Sum_{m=1..n} Sum_{k=1..n} [k divides n]*[n/k divides m]*[k divides m + 4].
a(n) = Sum_{k=1..n}[k divides n]*Sum_{j=1..n}[j divides 4]*[GCD[k, n/k] = j]*j.

A316274 Nonzero terms in row sums of the lower triangular part of a square matrix formed by Dirichlet convolution of adjacent columns in the square matrix A191898.

Original entry on oeis.org

1, -4, -16, -9, -48, -25, -54, -128, 36, -49, -320, 144, -243, 100, 216, -121, -250, -768, 432, -169, 196, 400, 864, 225, -972, -1792, 1152, -289, 972, -686, -361, 784, 1200, 2592, 441, 484, 1000
Offset: 1

Views

Author

Mats Granvik, Jun 28 2018

Keywords

Comments

The motivation for this sequence is expression 1 in Terence Tao's blog post "Correlations of the von Mangoldt and higher divisor functions I. Long shift ranges".

Crossrefs

Cf. A191898.

Programs

  • Mathematica
    Clear[nn, h, a, n, d, b, m];
    nn = 500;
    h = 1;
    a[n_] := If[n < 1, 0, Sum[d MoebiusMu@d, {d, Divisors[n]}]];
    TableForm[Transpose[Table[{n, a[n]}, {n, 1, nn}]]];
    b = DeleteCases[
      Table[Sum[
        Sum[If[Mod[n, k] == 0, a[GCD[n/k, m]]*a[GCD[k, m + h]], 0], {k, 1,
           n}], {m, 1, n}], {n, 1, nn}], 0]

Formula

a(n) = A298825(A001694(n)). - Mats Granvik, Oct 08 2018
Showing 1-6 of 6 results.