login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062602 Number of ways of writing n = p+c with p prime and c nonprime (1 or a composite number). 14
0, 0, 1, 1, 0, 2, 1, 2, 2, 1, 4, 3, 3, 3, 4, 2, 6, 3, 5, 4, 6, 3, 8, 3, 7, 4, 9, 5, 9, 4, 8, 7, 9, 4, 11, 3, 11, 9, 10, 6, 12, 5, 11, 8, 12, 7, 14, 5, 13, 7, 15, 9, 15, 6, 14, 10, 16, 9, 16, 5, 15, 13, 16, 8, 18, 6, 18, 15, 17, 9, 19, 8, 18, 12, 19, 11, 21, 7, 21, 14, 20, 13, 22, 7, 21, 14 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

LINKS

Donovan Johnson, Table of n, a(n) for n = 1..10000

Index entries for sequences related to Goldbach conjecture

FORMULA

a(n+1) = SUM(A010051(k)*A005171(n-k+1): 1<=k<=n). [From Reinhard Zumkeller, Nov 05 2009]

a(n) + A061358(n) + A062610(n) = A004526(n). - R. J. Mathar, Sep 10 2021

EXAMPLE

n = 22 has floor(n/2) = 11 partitions of form n = a + b; 3 partitions are of prime + prime [3 + 19 = 5 + 17 = 11 + 11], 3 partitions are of prime + nonprime [2 + 20 = 7 + 15 = 13 + 9], 5 partitions are nonprime + nonprime [1 + 21 = 4 + 18 = 6 + 16 = 8 + 14 = 10 + 12]. So a(22) = 3.

MATHEMATICA

Table[Length[Select[Range[Floor[n/2]], (PrimeQ[#] && Not[PrimeQ[n - #]]) || (Not[PrimeQ[#]] && PrimeQ[n - #]) &]], {n, 80}] (* Alonso del Arte, Apr 21 2013 *)

Table[Length[Select[IntegerPartitions[n, {2}], AnyTrue[#, PrimeQ] && !AllTrue[ #, PrimeQ]&]], {n, 90}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 19 2020 *)

CROSSREFS

Cf. A061358, A014092, A062610, A224712.

Sequence in context: A242210 A035369 A129719 * A123148 A173410 A166548

Adjacent sequences:  A062599 A062600 A062601 * A062603 A062604 A062605

KEYWORD

nonn,easy

AUTHOR

Labos Elemer, Jul 04 2001

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 25 09:35 EDT 2022. Contains 356977 sequences. (Running on oeis4.)