login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140199 a(n) = the number of pairs of (not necessarily distinct) positive integers j and k where j <= n and k <= n such that k+j is prime. 1
1, 2, 3, 5, 6, 8, 10, 12, 15, 19, 22, 26, 29, 32, 36, 41, 45, 49, 53, 57, 62, 68, 73, 79, 85, 91, 98, 105, 111, 118, 125, 132, 139, 147, 155, 164, 173, 182, 191, 201, 210, 220, 229, 238, 248, 258, 267, 276, 286, 296, 307, 319, 330, 342, 355, 368, 382, 396, 409, 422 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..60.

FORMULA

a(n) = sum{k=1 to n} A108954(k). (A108954(n) = pi(2n)-pi(n), where pi(n) is the number of primes that are <= n). a(n) = A071917(n)+1.

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

Cf. A108954, A071917.

Sequence in context: A006856 A249013 A211964 * A072190 A177445 A022826

Adjacent sequences:  A140196 A140197 A140198 * A140200 A140201 A140202

KEYWORD

nonn

AUTHOR

Leroy Quet, Jun 15 2008

EXTENSIONS

More terms from R. J. Mathar, Jun 19 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 27 20:49 EST 2021. Contains 349395 sequences. (Running on oeis4.)