OFFSET
1,10
COMMENTS
This sequence is related to the Goldbach conjecture: any even number (m) greater than 4 can be written as the sum of two odd primes (i.e., m = p1 + p2). For any given prime number p, if the restriction (p1, p2 <= p) is applied, some even numbers less than 2p may not be written as the sum of two prime numbers. The prime numbers corresponding to a(n)=0 in this sequence are the seven prime numbers listed in A301776.
LINKS
Ya-Ping Lu, Table of n, a(n) for n = 1..100000
EXAMPLE
a(1)=0. The 1st prime is 2. Even number 4 can be written as 2+2.
a(2)=0. The 2nd prime is 3. Even numbers 4 and 6 can be written as: 4=2+2 and 6=3+3.
a(3)=0. The 3rd prime is 5. Even numbers between 4 and 10 are: 4=2+2, 6=3+3, 8=3+5, and 10=5+5.
a(5)=1. The 5th prime is 11. Among the 10 even numbers between 4 and 22, only 20 cannot be written as the sum of two primes <= 11.
a(10)=4. The 10th prime is 29. Four even numbers (44, 50, 54, and 56) between 4 and 58 cannot be written as the sum of two primes <= 29.
MATHEMATICA
a[n_] := Block[{p = Prime[n], r = Prime@ Range@ n}, Sum[Boole[{} == IntegerPartitions[2 k, {2}, r]], {k, 2, p}]]; Array[a, 83] (* Giovanni Resta, May 12 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, May 12 2020
STATUS
approved