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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A084360 Number of partitions of n into pair of parts whose difference is a prime. 1
 0, 0, 0, 1, 1, 1, 2, 1, 3, 1, 3, 1, 4, 1, 5, 1, 5, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,7 COMMENTS Order of set A = { (p,q): p+q = n, q>=p and q-p is a prime}. a(1) = a(2) = 0; for even n >= 4, a(n) = 1; for odd n >= 3, a(n) = pi(n-1) - 1, where pi(n) = A000720(n) is the prime counting function. - Wesley Ivan Hurt, Feb 01 2013 LINKS Antti Karttunen, Table of n, a(n) for n = 1..20000 FORMULA a(n) = ( pi(n-1)-2 )*( n mod 2 ) + 1 + floor(1/n) - floor(n/2)*floor(2/n). - Wesley Ivan Hurt, Feb 01 2013 a(n) = Sum_{i=1..floor(n/2)} A010051(n-2i). - Wesley Ivan Hurt, Apr 10 2018 EXAMPLE a(7) = 2 and the partitions are (1,6) and (2,5). MATHEMATICA a[1] = a[2] = 0; a[n_] := If[EvenQ[n], 1, PrimePi[n - 1] - 1]; Array[a, 90] (* Jean-François Alcover, Nov 24 2016, after Wesley Ivan Hurt *) PROG (PARI) A084360(n) = if(n<=2, 0, if(!(n%2), 1, primepi(n-1)-1)); \\ Antti Karttunen, Jan 22 2020 CROSSREFS Cf. A000720, A010051, A082460. Sequence in context: A306248 A327513 A327530 * A082460 A318573 A344774 Adjacent sequences:  A084357 A084358 A084359 * A084361 A084362 A084363 KEYWORD nonn,easy AUTHOR Amarnath Murthy, May 27 2003 EXTENSIONS More terms from Michel ten Voorde, Jun 20 2003 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.

Last modified September 16 06:18 EDT 2021. Contains 347469 sequences. (Running on oeis4.)