login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339558 Number of divisors of 2n that are the average of a pair of twin primes. 1
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, 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, 2, 1, 0, 5, 0, 1, 3, 1, 0, 3, 0, 1, 2, 1, 0, 4, 0, 1, 1, 1, 0, 7, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
a(n) = Sum_{d|(2*n)} c(d+1) * c(d-1), where c is the prime characteristic (A010051).
EXAMPLE
a(6) = 3; There are 3 divisors of 2*6 = 12 that are the average of twin primes, namely 4, 6 and 12.
MAPLE
f:= proc(n) nops(select(t -> isprime(t-1) and isprime(t+1), numtheory:-divisors(2*n))) end proc:
map(f, [$1..100]); # Robert Israel, Jan 06 2021
MATHEMATICA
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}]
PROG
(PARI) a(n) = sumdiv(2*n, d, (d>1) && (bigomega(d^2-1)==2)); \\ Michel Marcus, Dec 16 2020
CROSSREFS
Sequence in context: A242869 A224878 A129555 * A147755 A307195 A231188
KEYWORD
easy,nonn
AUTHOR
Wesley Ivan Hurt, Dec 08 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:32 EDT 2024. Contains 371914 sequences. (Running on oeis4.)