OFFSET
1,2
FORMULA
EXAMPLE
For n = 4 there are 5 pairs of positive integers, each <= n=4, that sum to a prime: 1+1=2, 1+2=3, 2+3=5, 1+4=5 and 3+4=7.
MAPLE
A108954 := proc(n) numtheory[pi](2*n)-numtheory[pi](n) ; end: A140199 := proc(n) add( A108954(k), k=1..n) ; end: seq(A140199(n), n=1..80) ; # R. J. Mathar, Jun 19 2008
MATHEMATICA
Table[Count[Union[Sort/@Tuples[Range[n], {2}]], _?(PrimeQ[Total[#]]&)], {n, 60}] (* Harvey P. Dale, Mar 21 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 15 2008
EXTENSIONS
More terms from R. J. Mathar, Jun 19 2008
STATUS
approved