A334810 The number of even numbers between 4 and 2p that cannot be written as the sum of two primes less than or equal to the n-th prime number p.
0, 0, 0, 0, 1, 0, 1, 0, 1, 4, 1, 3, 2, 1, 1, 4, 7, 2, 4, 3, 1, 4, 3, 4, 6, 5, 2, 2, 0, 1, 8, 7, 8, 3, 8, 5, 5, 7, 5, 6, 7, 2, 8, 4, 3, 1, 7, 14, 10, 7, 4, 6, 3, 7, 8, 11, 14, 8, 6, 5, 3, 8, 14, 10, 7, 6, 11, 13, 15, 10, 7, 7, 9, 10, 11, 8, 9, 10, 7, 9, 13, 9, 13, 10, 9, 6, 6, 8, 7, 3, 2, 9, 10, 10, 10, 10, 8, 15, 9, 20
Offset: 1
Keywords
Examples
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.
Links
- Ya-Ping Lu, Table of n, a(n) for n = 1..100000
Crossrefs
Cf. A301776 (prime numbers p with the property that all even numbers n (2 < n <= 2p) are the sum of two primes <= p).
Programs
-
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 *)
Comments