OFFSET
1,1
COMMENTS
a(n) = 1 if and only if n is in A006512. - Robert Israel, Apr 04 2018
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..3000
MAPLE
a:= n-> `if`(isprime(ithprime(n)-2), 1, 0):
seq(a(n), n=1..105); # Alois P. Heinz, Oct 02 2020
MATHEMATICA
Table[Sum[(PrimePi[Prime[n] - i] - PrimePi[Prime[n] - i - 1]) (PrimePi[i] - PrimePi[i - 1]), {i, Floor[Prime[n]/2]}], {n, 100}] (* Wesley Ivan Hurt, Apr 04 2018 *)
PROG
(PARI) a(n) = isprime(prime(n) - 2) \\ David A. Corneth, Apr 04 2018
(GAP) P:=Filtered([1..1000], IsPrime);; a:=List(List(List(P, i -> Partitions(i, 2)), k -> Filtered(k, i -> IsPrime(i[1]) and IsPrime(i[2]))), Length); # Muniru A Asiru, Apr 05 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 05 2001
EXTENSIONS
Offset changed to 1 by David A. Corneth, Apr 04 2018
STATUS
approved