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.

A202177 Number of partitions p of n such that each part of p is prime and each part of the conjugate partition of p is also prime.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 1, 1, 2, 0, 2, 2, 2, 2, 3, 3, 0, 4, 2, 5, 2, 4, 3, 8, 2, 6, 4, 11, 0, 10, 4, 14, 2, 14, 4, 21, 2, 20, 5, 25, 0, 28, 6, 30, 2, 38, 5, 46, 0, 44, 4, 54, 0, 56, 6, 67, 2, 72, 4, 93, 2, 74, 7, 113, 0, 100, 8, 131, 0, 128
Offset: 1

Views

Author

Ben Branman, Jan 09 2013

Keywords

Examples

			For n=17, there are three valid partitions: (7,7,3), its conjugate partition (3,3,3,2,2,2,2), and the self-conjugate partition (5,5,3,2,2).
Thus a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    ConjugatePartition[l_List] :=
     Module[{i, r = Reverse[l], n = Length[l]},
      Table[n + 1 - Position[r, _?(# >= i &), Infinity, 1][[1, 1]], {i,
        l[[1]]}]];f[n_] := Select[Select[IntegerPartitions[n], And @@ (PrimeQ[#]) &],
      And @@ (PrimeQ[ConjugatePartition[#]]) &];a[n_] := Length[f[n]];Table[a[n],{n,1,40}]