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.
%I A306652 #21 May 05 2019 11:57:42 %S A306652 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, %T A306652 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, %U A306652 8,2,8,4,8,2,12,2,4,4,8,4,8,2,20,2,4,2,16,4 %N A306652 a(n) = Sum_{m=1..n} Sum_{k=1..n} [k divides n]*[n/k divides m]*[k divides m + 4]. %C A306652 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. %H A306652 Antti Karttunen, <a href="/A306652/b306652.txt">Table of n, a(n) for n = 1..20000</a> %H A306652 Mats Granvik, <a href="https://mathoverflow.net/q/308990/25104">Arithmetic properties of a sum related to the first Hardy-Littlewood conjecture</a> %F A306652 a(n) = Sum_{m=1..n} Sum_{k=1..n} [k divides n]*[n/k divides m]*[k divides m + 4]. %F A306652 a(n) = Sum_{k=1..n}[k divides n]*Sum_{j=1..n}[j divides 4]*[GCD[k, n/k] = j]*j. %t A306652 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. *) %t A306652 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. *) %t A306652 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. *) %o A306652 (PARI) A306652(n) = sum(m=1, n, sumdiv(n, k, !(m%(n/k)) && !((m+4)%k))); \\ _Antti Karttunen_, Mar 13 2019 %Y A306652 Cf. A147848, A306652, A298825, A008683. %K A306652 nonn %O A306652 1,2 %A A306652 _Mats Granvik_, Mar 03 2019