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.

Showing 1-4 of 4 results.

A062602 Number of ways of writing n = p+c with p prime and c nonprime (1 or a composite number).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jul 04 2001

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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 *)

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

A224713 The number of unordered partitions {a, b} of the even numbers 2n such that a or b is composite and the other is prime.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 4, 5, 3, 6, 4, 3, 8, 6, 4, 7, 7, 4, 7, 9, 5, 10, 9, 4, 12, 8, 6, 14, 9, 7, 11, 11, 7, 13, 13, 6, 14, 15, 5, 16, 15, 10, 18, 13, 9, 16, 16, 11, 16, 15, 9, 18, 19, 6, 23, 20, 10, 24, 17, 13, 21, 22, 16, 19, 19, 12, 23, 24
Offset: 1

Views

Author

J. Stauduhar, Apr 20 2013

Keywords

Examples

			For n = 3, 2n=6.  In the set {{5, 1}, {4, 2}, {3, 3}}, {4, 2} is the only partition that satisfies the requirements, so a(3) = 1.
For n = 10, 2n=20 and we have partitions {18, 2}, {15, 5}, and {11, 9}, so a(10) = 3.
		

Crossrefs

Subsequence of A224712.

Programs

A224714 The number of unordered partitions {a,b} of the odd numbers 2n-1 such that one of a and b is composite and the other is prime.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 3, 4, 6, 5, 6, 8, 7, 9, 9, 8, 9, 11, 11, 10, 12, 11, 12, 14, 13, 15, 15, 14, 16, 16, 15, 16, 18, 18, 17, 19, 18, 19, 21, 21, 20, 22, 21, 23, 23, 22, 24, 24, 24, 23, 25, 24, 25, 27, 26, 27, 29, 28, 30, 30, 30, 30, 30, 30, 29, 31, 30, 32, 32
Offset: 1

Views

Author

J. Stauduhar, Apr 21 2013

Keywords

Crossrefs

Subsequence of A224712.

A224715 The number of unordered partitions {a,b} of prime(n) such that a or b is a nonnegative composite and the other is prime.

Original entry on oeis.org

0, 0, 0, 1, 4, 3, 6, 5, 8, 9, 8, 11, 12, 11, 14, 15, 16, 15, 18, 19, 18, 21, 22, 23, 24, 25, 24, 27, 26, 29, 30, 31, 32, 31, 34, 33, 36, 37, 38, 39, 40, 39, 42, 41, 44, 43, 46, 47, 48, 47, 50, 51, 50, 53, 54, 55, 56, 55, 58, 59, 58, 61, 62, 63, 62, 65, 66
Offset: 1

Views

Author

J. Stauduhar, Apr 22 2013

Keywords

Examples

			For n = 5, prime(5) = 11. The pairwise partitions of 11 are {{10, 1}, {9, 2}, {8, 3}, {7, 4}, {6, 5}} and four partitions meet the requirements: {9, 2}, {8, 3}, {7, 4}, {6, 5}, so a(5) =  4.
		

Crossrefs

Subsequence of A224712.
Essentially the same as A062302.

Programs

  • Mathematica
    nn = 100; mx = Prime[nn]; ps = Prime[Range[nn]]; notPs = Complement[Range[2, mx], ps]; t2 = Table[0, {Range[mx]}]; Do[s = i + j; If[s <= mx, t2[[s]]++], {i, ps}, {j, notPs}];  t2[[ps]] (* T. D. Noe, Apr 23 2013 *)
Showing 1-4 of 4 results.