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!)
A302479 Number of partitions of n into two distinct nonprime parts. 11
0, 0, 0, 0, 1, 0, 1, 0, 1, 2, 1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 3, 5, 3, 5, 4, 6, 4, 6, 5, 7, 6, 6, 6, 9, 6, 10, 7, 8, 8, 10, 8, 11, 9, 10, 9, 12, 9, 13, 10, 13, 10, 13, 11, 15, 12, 14, 12, 16, 13, 18, 14, 15, 14, 18, 14, 20, 15, 16, 16, 20, 16, 21, 17, 20, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
LINKS
FORMULA
a(n) = Sum_{i=1..floor((n-1)/2)} (1 - c(i)) * (1 - c(n-i)), where c = A010051.
For n > 0, a(n) = A358638(n) - A005171(n). - Antti Karttunen, Nov 25 2022
EXAMPLE
a(16) = 3; 16 = 15+1 = 12+4 = 10+6, which are distinct nonprimes.
MATHEMATICA
Table[Sum[(1 - PrimePi[n - i] + PrimePi[n - i - 1]) (1 - PrimePi[i] + PrimePi[i - 1]), {i, Floor[(n - 1)/2]}], {n, 100}]
Table[Length[Select[IntegerPartitions[n, {2}], Length[Union[#]]==2&&Boole[PrimeQ[#]]=={0, 0}&]], {n, 80}] (* Harvey P. Dale, Dec 28 2023 *)
PROG
(PARI) A302479(n) = sum(k=1, (n-1)\2, !(isprime(k)+isprime(n-k))); \\ Antti Karttunen, Nov 25 2022
CROSSREFS
Sequence in context: A092335 A278912 A339186 * A029355 A029307 A161066
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 08 2018
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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)