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.

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

A347788 Number of compositions (ordered partitions) of n into at most 2 nonprime parts.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 13 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length@Flatten[Permutations/@IntegerPartitions[n,2,Select[Range@n,!PrimeQ@#&]],1],{n,0,70}] (* Giorgos Kalogeropoulos, Sep 13 2021 *)
  • PARI
    A347788(n) = if(n<2,1,!isprime(n)+sum(k=1,n-1,!(isprime(k)+isprime(n-k)))); \\ Antti Karttunen, Nov 25 2022

A358639 Number of partitions of n into at most 3 distinct nonprime parts.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 3, 2, 2, 3, 4, 5, 5, 4, 6, 7, 7, 8, 10, 9, 11, 13, 14, 14, 16, 15, 20, 20, 21, 21, 27, 26, 30, 29, 32, 33, 39, 35, 43, 42, 46, 46, 53, 49, 58, 58, 63, 61, 69, 64, 77, 75, 81, 78, 90, 85, 98, 95, 102, 100, 114, 106, 122, 116, 126, 124, 140
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 24 2022

Keywords

Crossrefs

A358640 Number of partitions of n into at most 4 distinct nonprime parts.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 3, 2, 2, 3, 4, 5, 5, 4, 6, 8, 8, 9, 11, 11, 13, 16, 17, 19, 21, 22, 26, 30, 30, 34, 39, 43, 47, 50, 53, 61, 67, 69, 76, 84, 89, 97, 106, 110, 121, 131, 139, 148, 160, 166, 181, 194, 204, 215, 233, 242, 262, 274, 289, 305, 329, 338, 361, 378
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 24 2022

Keywords

Crossrefs

Showing 1-4 of 4 results.