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.

Previous Showing 11-20 of 22 results. Next

A316219 Number of triangles of weight prime(n) in the multiorder of integer partitions of prime numbers into prime parts.

Original entry on oeis.org

1, 1, 3, 6, 15, 31, 92, 161, 464, 2347, 3987, 18202, 50136, 81722, 214976, 903048, 3684567, 5842249, 23206424, 57341256, 89938662, 343306266, 829972421, 3084219358, 17375700038, 40920517008, 62656899579, 146415515992, 223442878751, 518427758704, 9544240589455, 21746920337606
Offset: 1

Views

Author

Gus Wiseman, Jun 26 2018

Keywords

Comments

A prime partition is an integer partition of a prime number into prime parts. Then a(n) is the number of sequences of prime partitions whose sums are weakly decreasing and sum to the n-th prime number.

Crossrefs

Programs

  • Mathematica
    nn=20;
    pen[n_]:=pen[n]=SeriesCoefficient[Product[1/(1-x^p),{p,Select[Range[n],PrimeQ]}],{x,0,n}]
    Table[Sum[Times@@pen/@p,{p,Select[IntegerPartitions[Prime[n]],And@@PrimeQ/@#&]}],{n,nn}]
  • PARI
    P(n,f)={1/prod(k=1, n, 1 - f(k)*x^prime(k) + O(x*x^prime(n)))}
    seq(n)={my(p=P(n, i->1), q=P(n, i->polcoef(p, prime(i)))); vector(n, k, polcoef(q, prime(k)))} \\ Andrew Howroyd, Jan 16 2023

Extensions

Terms a(16) and beyond from Andrew Howroyd, Jan 16 2023

A299168 Number of ordered ways of writing n-th prime number as a sum of n primes.

Original entry on oeis.org

1, 0, 0, 0, 5, 6, 42, 64, 387, 5480, 10461, 113256, 507390, 1071084, 4882635, 44984560, 382362589, 891350154, 7469477771, 33066211100, 78673599501, 649785780710, 2884039365010, 22986956007816, 306912836483025, 1361558306986280, 3519406658042964
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 04 2018

Keywords

Examples

			a(5) = 5 because fifth prime number is 11 and we have [3, 2, 2, 2, 2], [2, 3, 2, 2, 2], [2, 2, 3, 2, 2], [2, 2, 2, 3, 2] and [2, 2, 2, 2, 3].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember;
          `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
          `if`(isprime(j), b(n-j, t-1), 0), j=1..n)))
        end:
    a:= n-> b(ithprime(n), n):
    seq(a(n), n=1..30);  # Alois P. Heinz, Feb 13 2021
  • Mathematica
    Table[SeriesCoefficient[Sum[x^Prime[k], {k, 1, n}]^n, {x, 0, Prime[n]}], {n, 1, 27}]

Formula

a(n) = [x^prime(n)] (Sum_{k>=1} x^prime(k))^n.

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[#]]] &]

A168470 Number of partitions of prime(n) into prime parts smaller than itself.

Original entry on oeis.org

0, 0, 1, 2, 5, 8, 16, 22, 39, 86, 110, 218, 335, 412, 613, 1082, 1849, 2197, 3629, 5006, 5860, 9281, 12487, 19231, 33438, 43708, 49870, 64670, 73505, 94624, 221264, 279515, 394169, 441249, 766261, 853691, 1175343, 1608013, 1975107, 2675924, 3605665, 3977860
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 26 2009

Keywords

Comments

The difference between this sequence and A056768 is that the number itself (unpartitioned) is not counted.

Crossrefs

Formula

a(n) = A056768(n) - 1. - R. J. Mathar, Nov 27 2009

Extensions

a(7) corrected and sequence extended by R. J. Mathar, Nov 27 2009

A276687 Number of prime plane trees of weight prime(n).

Original entry on oeis.org

1, 1, 2, 4, 11, 30, 122, 336, 1412, 15129, 44561, 417542, 2479120, 7540843, 35983502, 451454834, 5313515136, 16809858904, 190077477328, 1124302066470, 3521811953565, 38563707677633, 240966297786218, 3192420711942298, 95433674596402663, 567734580765228356
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2016

Keywords

Comments

A prime plane tree is either (case 1) a prime number, or (case 2) a sequence of prime plane trees whose weights are an integer partition of a prime number, where the weight of a tree is the sum of weights of its branches. Prime plane trees are "multichains" in the multiorder of integer partitions of prime numbers into prime parts (A056768).

Examples

			The a(5) = 11 prime plane trees of weight A000040(5) = 11 are: {11, (3,3,5), (3,3,(2,3)), (2,2,7), (2,2,(2,5)), (2,2,(2,(2,3))), (2,2,(2,2,3)), (2,3,3,3), (2,2,2,5), (2,2,2,(2,3)), (2,2,2,2,3)}.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i=2, 0,
           b(n, prevprime(i)))+`if`(i>n, 0, b(n-i, i)*(1+
          `if`(i>2, b(i, prevprime(i)), 0))))
        end:
    a:= n-> `if`(n<3, 1, 1+b(ithprime(n), ithprime(n-1))):
    seq(a(n), n=1..40);  # Alois P. Heinz, Sep 15 2016
  • Mathematica
    n=20;
    ser=Product[1/(1-c[Prime[i]]*x^Prime[i]),{i,1,n}];
    sys=Table[c[Prime[i]]==Expand[SeriesCoefficient[ser,{x,0,Prime[i]}]-c[Prime[i]]+1],{i,1,n}];
    Block[{c},Set@@@sys]

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[#]]&]

A316525 Numbers whose average of prime factors is prime.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 20, 21, 23, 25, 27, 29, 31, 32, 33, 37, 41, 43, 44, 47, 49, 53, 57, 59, 60, 61, 64, 67, 68, 69, 71, 73, 79, 81, 83, 85, 89, 93, 97, 101, 103, 105, 107, 109, 112, 113, 116, 121, 125, 127, 128, 129, 131, 133, 137, 139
Offset: 1

Views

Author

Gus Wiseman, Jul 05 2018

Keywords

Comments

Prime factors counted with multiplicity. - Harvey P. Dale, Sep 28 2018

Examples

			60 = 2*2*3*5 has average of prime factors (2+2+3+5)/4 = 3, which is prime, so 60 belongs to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],PrimeQ[Mean[If[#==1,{},Flatten[Cases[FactorInteger[#],{p_,k_}:>Table[p,{k}]]]]]]&]
    Select[Range[200],PrimeQ[Mean[Flatten[Table[#[[1]],#[[2]]]&/@ FactorInteger[ #]]]]&] (* Harvey P. Dale, Sep 28 2018 *)
  • PARI
    isok(n) = {my(f=factor(n)); iferr(isprime(sum(k=1, #f~, f[k,1]*f[k,2])/sum(k=1, #f~, f[k,2])), E, 0);} \\ Michel Marcus, Jul 06 2018

A331901 Number of compositions (ordered partitions) of the n-th prime into distinct prime parts.

Original entry on oeis.org

1, 1, 3, 3, 1, 3, 25, 9, 61, 91, 99, 151, 901, 303, 1759, 3379, 5239, 4713, 8227, 12901, 12537, 23059, 65239, 159421, 232369, 489817, 351237, 726295, 564363, 1101883, 2517865, 6916027, 11825821, 4942227, 27166753, 21280053, 39547957, 52630273, 113638975
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 31 2020

Keywords

Examples

			a(4) = 3 because we have [7], [5, 2] and [2, 5].
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i, t) option remember; `if`(s(i)`if`(p>n, 0, b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
        end:
    a:= n-> b(ithprime(n), n, 0):
    seq(a(n), n=1..42);  # Alois P. Heinz, Jan 31 2020
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
    b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0, If[n == 0, t!, Function[p, If[p > n, 0, b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
    a[n_] := b[Prime[n], n, 0];
    Array[a, 42] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

Formula

a(n) = A219107(A000040(n)).

A096066 Triangle read by rows, 1<=k<=n: T(n,k) is the number of occurrences of the k-th prime in partitions of the n-th prime into primes.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 3, 1, 1, 1, 10, 6, 2, 1, 1, 16, 9, 4, 2, 1, 1, 37, 22, 11, 6, 2, 1, 1, 54, 32, 15, 9, 3, 2, 1, 1, 107, 65, 32, 19, 7, 5, 2, 1, 1, 266, 165, 84, 50, 22, 15, 7, 5, 2, 1, 353, 219, 112, 69, 30, 21, 10, 7, 3, 1, 1, 779, 487, 254, 157, 73, 52, 27, 19, 10, 3, 2, 1, 1270, 795, 420, 261, 124, 90, 49, 36, 19, 7, 5, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 21 2004

Keywords

Examples

			n=5, A000040(5)=11 with A056768(5)=6 partitions into primes:
T(5,1)=10 prime(1)=2 in 7+2+2=5+2+2+2=3+3+3+2=3+2+2+2+2,
T(5,2)=6 prime(2)=3: in 5+3+3=3+3+3+2=3+2+2+2+2,
T(5,3)=2 prime(3)=5: in 5+3+3=5+2+2+2,
T(5,4)=1 prime(4)=7: in 7+2+2.
Triangle begins:
  1;
  0,  1;
  1,  1, 1;
  3,  1, 1, 1;
  10, 6, 2, 1, 1;
  ...
		

Crossrefs

Cf. A056768.

Programs

  • Mathematica
    ip[p_] := ip[p] = IntegerPartitions[p, All, Select[Range[p], PrimeQ]] // Flatten;
    T[n_, k_] := Count[ip[Prime[n]], Prime[k]];
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 23 2021 *)

Formula

T(n,n) = 1.

Extensions

Name modified by Jean-François Alcover, Sep 23 2021
Previous Showing 11-20 of 22 results. Next