cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A302479 Number of partitions of n into two distinct nonprime parts.

Original entry on oeis.org

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
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 08 2018

Keywords

Examples

			a(16) = 3; 16 = 15+1 = 12+4 = 10+6, which are distinct nonprimes.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    A302479(n) = sum(k=1,(n-1)\2,!(isprime(k)+isprime(n-k))); \\ Antti Karttunen, Nov 25 2022

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