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-5 of 5 results.

A316154 Number of integer partitions of prime(n) into a prime number of prime parts.

Original entry on oeis.org

0, 0, 1, 2, 3, 5, 9, 12, 19, 39, 50, 93, 136, 166, 239, 409, 682, 814, 1314, 1774, 2081, 3231, 4272, 6475, 11077, 14270, 16265, 20810, 23621, 30031, 68251, 85326, 118917, 132815, 226097, 251301, 342448, 463940, 565844, 759873, 1015302, 1117708, 1787452, 1961624
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Examples

			The a(7) = 9 partitions of 17 into a prime number of prime parts: (13,2,2), (11,3,3), (7,7,3), (7,5,5), (7,3,3,2,2), (5,5,3,2,2), (5,3,3,3,3), (5,2,2,2,2,2,2), (3,3,3,2,2,2,2).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, p, c) option remember; `if`(n=0 or p=2,
          `if`(n::even and isprime(c+n/2), 1, 0),
          `if`(p>n, 0, b(n-p, p, c+1))+b(n, prevprime(p), c))
        end:
    a:= n-> b(ithprime(n)$2, 0):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jun 26 2018
  • Mathematica
    Table[Length[Select[IntegerPartitions[Prime[n]],And[PrimeQ[Length[#]],And@@PrimeQ/@#]&]],{n,20}]
    (* Second program: *)
    b[n_, p_, c_] := b[n, p, c] = If[n == 0 || p == 2, If[EvenQ[n] && PrimeQ[c + n/2], 1, 0], If[p>n, 0, b[n - p, p, c + 1]] + b[n, NextPrime[p, -1], c]];
    a[n_] := b[Prime[n], Prime[n], 0];
    Array[a, 50] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(p=vector(n,k,prime(k))); my(v=Vec(1/prod(k=1, n, 1 - x^p[k]*y + O(x*x^p[n])))); vector(n, k, sum(i=1, k, polcoeff(v[1+p[k]], p[i])))} \\ Andrew Howroyd, Jun 26 2018

Formula

a(n) = A085755(A000040(n)). - Alois P. Heinz, Jun 26 2018

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jun 26 2018

A316185 Number of strict integer partitions of the n-th prime into a prime number of prime parts.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 2, 2, 3, 5, 5, 6, 8, 10, 13, 18, 20, 26, 32, 34, 45, 54, 66, 90, 106, 117, 135, 142, 165, 269, 311, 375, 398, 546, 579, 689, 823, 938, 1107, 1301, 1352, 1790, 1850, 2078, 2153, 2878, 3811, 4241, 4338, 4828, 5495, 5637, 7076, 8000, 9032
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Examples

			The a(14) = 8 partitions of 43 into a prime number of distinct prime parts: (41,2), (31,7,5), (29,11,3), (23,17,3), (23,13,7), (19,17,7), (19,13,11), (17,11,7,5,3).
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n=0, 0,
         `if`(isprime(n), n, h(n-1)))
        end:
    b:= proc(n, i, c) option remember; `if`(n=0,
          `if`(isprime(c), 1, 0), `if`(i<2, 0, b(n, h(i-1), c)+
          `if`(i>n, 0, b(n-i, h(min(n-i, i-1)), c+1))))
        end:
    a:= n-> b(ithprime(n)$2, 0):
    seq(a(n), n=1..56);  # Alois P. Heinz, May 26 2021
  • Mathematica
    Table[Length[Select[IntegerPartitions[Prime[n]],And[UnsameQ@@#,PrimeQ[Length[#]],And@@PrimeQ/@#]&]],{n,10}]
    (* Second program: *)
    h[n_] := h[n] = If[n == 0, 0, If[PrimeQ[n], n, h[n - 1]]];
    b[n_, i_, c_] := b[n, i, c] = If[n == 0,
         If[PrimeQ[c], 1, 0], If[i < 2, 0, b[n, h[i - 1], c] +
         If[i > n, 0, b[n - i, h[Min[n - i, i - 1]], c + 1]]]];
    a[n_] := b[Prime[n], Prime[n], 0];
    Array[a, 56] (* Jean-François Alcover, Jun 11 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(p=vector(n, k, prime(k))); my(v=Vec(prod(k=1, n, 1 + x^p[k]*y + O(x*x^p[n])))); vector(n, k, sum(i=1, k, polcoeff(v[1+p[k]], p[i])))} \\ Andrew Howroyd, Jun 26 2018

Formula

a(n) = A045450(A000040(n)).

Extensions

More terms from Alois P. Heinz, Jun 26 2018

A316091 Heinz numbers of integer partitions of prime numbers.

Original entry on oeis.org

3, 4, 5, 6, 8, 11, 14, 15, 17, 18, 20, 24, 26, 31, 32, 33, 35, 41, 42, 44, 45, 50, 54, 56, 58, 59, 60, 67, 69, 72, 74, 80, 83, 92, 93, 95, 96, 106, 109, 114, 119, 122, 124, 127, 128, 141, 143, 145, 152, 153, 157, 158, 161, 170, 174, 177, 179, 182, 188, 191
Offset: 1

Views

Author

Gus Wiseman, Jun 24 2018

Keywords

Comments

Also the union of prime-indexed rows of A215366.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			Sequence of all integer partitions of prime numbers begins (2), (1, 1), (3), (2, 1), (1, 1, 1), (5), (4, 1), (3, 2), (7), (2, 2, 1), (3, 1, 1), (2, 1, 1, 1), (6, 1).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_] := If[n == 1, {}, Flatten[Cases[FactorInteger[n],{p_, k_} :> Table[PrimePi[p], {k}]]]]; Select[Range[100], PrimeQ[Total[primeMS[#]]] &]

A316153 Heinz numbers of integer partitions of prime numbers into a prime number of prime parts.

Original entry on oeis.org

15, 33, 45, 93, 153, 177, 275, 327, 369, 405, 425, 537, 603, 605, 775, 831, 891, 1025, 1059, 1125, 1413, 1445, 1475, 1641, 1705, 1719, 1761, 2057, 2075, 2319, 2511, 2577, 2979, 3175, 3179, 3189, 3459, 3485, 3603, 3609, 3825, 3925, 4299, 4475, 4497, 4565, 4581
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of integer partitions of prime numbers into a prime number of prime parts, preceded by their Heinz numbers, begins:
   15: (3,2)
   33: (5,2)
   45: (3,2,2)
   93: (11,2)
  153: (7,2,2)
  177: (17,2)
  275: (5,3,3)
  327: (29,2)
  369: (13,2,2)
  405: (3,2,2,2,2)
  425: (7,3,3)
  537: (41,2)
  603: (19,2,2)
  605: (5,5,3)
  775: (11,3,3)
  831: (59,2)
  891: (5,2,2,2,2)
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[1000],And[PrimeQ[PrimeOmega[#]],PrimeQ[Total[primeMS[#]]],And@@PrimeQ/@primeMS[#]]&]

A316151 Heinz numbers of strict integer partitions of prime numbers into prime parts.

Original entry on oeis.org

3, 5, 11, 15, 17, 31, 33, 41, 59, 67, 83, 93, 109, 127, 157, 177, 179, 191, 211, 241, 277, 283, 327, 331, 353, 367, 401, 431, 461, 509, 537, 547, 563, 587, 599, 617, 709, 739, 773, 797, 831, 859, 877, 919, 967, 991, 1031, 1059, 1063, 1087, 1153, 1171, 1201
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of strict integer partitions of prime numbers into prime parts, preceded by their Heinz numbers, begins:
   3: (2)
   5: (3)
  11: (5)
  15: (3,2)
  17: (7)
  31: (11)
  33: (5,2)
  41: (13)
  59: (17)
  67: (19)
  83: (23)
  93: (11,2)
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],And[SquareFreeQ[#],PrimeQ[Total[primeMS[#]]],And@@PrimeQ/@primeMS[#]]&]
Showing 1-5 of 5 results.