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 A339558 #17 Jun 03 2024 03:48:38 %S A339558 0,1,1,1,0,3,0,1,2,1,0,3,0,1,2,1,0,4,0,1,2,1,0,3,0,1,2,1,0,5,0,1,1,1, %T A339558 0,5,0,1,1,1,0,4,0,1,3,1,0,3,0,1,2,1,0,5,0,1,1,1,0,5,0,1,3,1,0,3,0,1, %U A339558 2,1,0,5,0,1,3,1,0,3,0,1,2,1,0,4,0,1,1,1,0,7,0 %N A339558 Number of divisors of 2n that are the average of a pair of twin primes. %H A339558 Robert Israel, <a href="/A339558/b339558.txt">Table of n, a(n) for n = 1..10000</a> %F A339558 a(n) = Sum_{d|(2*n)} c(d+1) * c(d-1), where c is the prime characteristic (A010051). %F A339558 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 * A241560 = 1.857671... . - _Amiram Eldar_, Jun 03 2024 %e A339558 a(6) = 3; There are 3 divisors of 2*6 = 12 that are the average of twin primes, namely 4, 6 and 12. %p A339558 f:= proc(n) nops(select(t -> isprime(t-1) and isprime(t+1), numtheory:-divisors(2*n))) end proc: %p A339558 map(f, [$1..100]); # _Robert Israel_, Jan 06 2021 %t A339558 Table[Sum[(PrimePi[2n/i + 1] - PrimePi[2n/i]) (PrimePi[2n/i - 1] - PrimePi[2n/i - 2]) (1 - Ceiling[2n/i] + Floor[2n/i]), {i, 2n}], {n, 100}] %o A339558 (PARI) a(n) = sumdiv(2*n, d, (d>1) && (bigomega(d^2-1)==2)); \\ _Michel Marcus_, Dec 16 2020 %o A339558 (PARI) a(n) = sumdiv(2*n, d, d > 1 && isprime(d-1) && isprime(d+1)); \\ _Amiram Eldar_, Jun 03 2024 %Y A339558 Cf. A000005, A010051, A014574, A241560, A284203. %K A339558 easy,nonn %O A339558 1,6 %A A339558 _Wesley Ivan Hurt_, Dec 08 2020