|
|
A168141
|
|
a(n) = pi(n + 1) - pi(n - 2), where pi is the prime counting function.
|
|
1
|
|
|
1, 2, 2, 2, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Conjecture: a(n) = 2 for infinitely many n. This is equivalent to the twin prime conjecture. - Andrew Slattery, Apr 26 2020
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2 <=> n in { 2,3 } union { A014574 }.
|
|
MAPLE
|
# second Maple program:
a:= n-> add(`if`(isprime(n+i), 1, 0), i=-1..1):
|
|
MATHEMATICA
|
Table[PrimePi[n + 1] - PrimePi[n - 2], {n, 100}] (* Wesley Ivan Hurt, Apr 26 2020 *)
|
|
PROG
|
(PARI) a(n) = primepi(n+1) - primepi(n-2); \\ Michel Marcus, Apr 27 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|