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!)
A062303 Number of ways writing the n-th prime as a sum of two nonprimes. 1
1, 0, 1, 1, 1, 2, 2, 3, 3, 5, 6, 7, 8, 9, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21, 24, 25, 26, 26, 27, 27, 33, 34, 36, 37, 40, 41, 42, 44, 45, 47, 49, 50, 53, 54, 54, 55, 59, 64, 65, 66, 66, 68, 69, 72, 74, 76, 78, 79, 80, 81, 82, 85, 91, 92, 93, 93, 99, 101, 105, 106, 106, 108 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
A062610(A000040(n)) = number of [nonprime+composite] partitions of p(n).
EXAMPLE
n=10,p(10)=29 has 14 partitions of form a+b=29; 1+28=4+25=8+21=9+20=14+15 are the 5 relevant partitions, so a(10)=5.
MATHEMATICA
Table[c = 0; Do[If[i + j == Prime[n] && ! PrimeQ[i] && ! PrimeQ[j], c = c + 1], {i, Prime[n] - 1}, {j, i}]; c, {n, 72}] (* Jayanta Basu, Apr 22 2013 *)
cnpQ[{a_, b_}]:=(!PrimeQ[a]&&CompositeQ[b])||(!PrimeQ[b]&&CompositeQ[a]); Join[{1}, Table[Length[Select[IntegerPartitions[Prime[n], {2}], cnpQ]], {n, 2, 80}]] (* Harvey P. Dale, Sep 30 2018 *)
CROSSREFS
Sequence in context: A332668 A206439 A097450 * A180682 A227426 A229950
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 05 2001
EXTENSIONS
Offset and name corrected by Sean A. Irvine, Mar 25 2023
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 March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)