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

A347743 Number of compositions (ordered partitions) of n into at most 6 prime parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 2, 6, 6, 10, 16, 20, 35, 46, 71, 98, 130, 182, 226, 295, 359, 430, 534, 626, 746, 880, 1019, 1196, 1392, 1574, 1815, 2063, 2313, 2655, 2941, 3275, 3669, 4017, 4441, 4917, 5295, 5852, 6365, 6957, 7575, 8198, 8839, 9511, 10374, 10958, 11931
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 11 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length@Flatten[Permutations/@IntegerPartitions[n,6,Prime@Range@PrimePi@n],1],{n,0,50}] (* Giorgos Kalogeropoulos, Sep 12 2021 *)

Formula

a(n) = Sum_{k=1..6} A121303(n,k) for n >= 2. - Alois P. Heinz, Sep 11 2021

A121304 Number of parts in all the compositions of n into primes (i.e., in all ordered sequences of primes having sum n).

Original entry on oeis.org

1, 1, 2, 5, 5, 14, 17, 32, 53, 76, 139, 198, 334, 515, 798, 1280, 1938, 3075, 4710, 7299, 11298, 17296, 26738, 40874, 62763, 96036, 146674, 224210, 341562, 520767, 792375, 1204951, 1831124, 2779234, 4217008, 6391663, 9683056, 14659038, 22177341
Offset: 2

Views

Author

Emeric Deutsch, Aug 06 2006

Keywords

Comments

a(n) = Sum_{k=1..floor(n/2)} k*A121303(n,k).

Examples

			a(8) = 17 because the compositions of 8 into primes are [3,5], [5,3], [2,3,3], [3,2,3], [3,3,2] and [2,2,2,2], having a total of 2+2+3+3+3+4 = 17 parts.
		

Crossrefs

Programs

  • Maple
    g:=sum(z^ithprime(i),i=1..53)/(1-sum(z^ithprime(i),i=1..53))^2: gser:=series(g,z=0,48): seq(coeff(gser,z,n),n=2..45);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0], add(
          `if`(isprime(j), (p->p+[0, p[1]])(b(n-j)), 0), j=1..n))
        end:
    a:= n-> b(n)[2]:
    seq(a(n), n=2..50);  # Alois P. Heinz, Nov 08 2013, revised Feb 12 2021
  • Mathematica
    nn=40;a[x_]:=Sum[x^Prime[n],{n,1,nn}];Drop[CoefficientList[Series[D[1/(1-y a[x]),y]/.y ->1,{x,0,nn}],x],2] (* Geoffrey Critzer, Nov 08 2013 *)
    Table[Length[Flatten[Union[Flatten[Permutations/@Select[ IntegerPartitions[ n], AllTrue[ #,PrimeQ]&],1]]]],{n,2,40}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 24 2016 *)
    b[n_] := b[n] = If[n == 0, {1, 0}, Sum[If[PrimeQ[j],
         Function[p, p+{0, p[[1]]}][b[n-j]], {0, 0}], {j, 1, n}]];
    a[n_] := b[n][[2]];
    a /@ Range[2, 50] (* Jean-François Alcover, Jun 01 2021, after Alois P. Heinz *)

Formula

G.f.: (Sum_{i>=1} z^prime(i))/(1 - Sum_{i>=1} z^prime(i))^2.

A347739 Number of compositions (ordered partitions) of n into at most 2 prime parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 1, 3, 2, 2, 3, 1, 2, 3, 3, 2, 4, 1, 4, 3, 4, 2, 5, 1, 6, 2, 5, 0, 4, 1, 6, 3, 4, 2, 7, 0, 8, 1, 3, 2, 6, 1, 8, 3, 6, 2, 7, 1, 10, 2, 8, 0, 6, 1, 10, 2, 6, 0, 7, 1, 12, 3, 5, 2, 10, 0, 12, 1, 4, 2, 10, 1, 12, 3, 9, 2, 10, 0, 14, 1, 8
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 11 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length@Flatten[Permutations/@IntegerPartitions[n,2,Prime@Range@PrimePi@n],1],{n,0,100}] (* Giorgos Kalogeropoulos, Sep 12 2021 *)

Formula

a(n) = Sum_{k=1..2} A121303(n,k) for n >= 2. - Alois P. Heinz, Sep 11 2021

A347740 Number of compositions (ordered partitions) of n into at most 3 prime parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 2, 6, 5, 6, 9, 7, 11, 9, 9, 12, 13, 13, 16, 15, 16, 21, 17, 22, 21, 23, 23, 30, 19, 31, 18, 33, 22, 39, 19, 39, 29, 43, 27, 48, 15, 52, 26, 51, 30, 56, 25, 67, 31, 62, 38, 67, 30, 82, 28, 77, 36, 79, 25, 88, 33, 90, 41, 95, 25, 105, 42, 106, 40, 99, 22
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 11 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Length@Flatten[Permutations/@IntegerPartitions[n,3,Prime@Range@PrimePi@n],1],{n,0,70}] (* Giorgos Kalogeropoulos, Sep 12 2021 *)

Formula

a(n) = Sum_{k=1..3} A121303(n,k) for n >= 2. - Alois P. Heinz, Sep 11 2021

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.

A341459 Number of compositions of n^2 into n prime parts.

Original entry on oeis.org

1, 0, 1, 4, 22, 241, 2696, 35218, 529888, 8998419, 169486964, 3496417024, 78344008779, 1891733424205, 48923563968087, 1347813311456319, 39371345548420060, 1214570579814316742, 39430967625404799740, 1343040950675651131103, 47862610677098010505554
Offset: 0

Views

Author

Alois P. Heinz, Feb 12 2021

Keywords

Examples

			a(3) = 4: 333, 225, 252, 522.
		

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(n^2, n):
    seq(a(n), n=0..22);
  • Mathematica
    b[n_, t_] := b[n, t] =
         If[n == 0, If[t == 0, 1, 0], If[t < 1, 0, Sum[
         If[PrimeQ[j], b[n-j, t-1], 0], {j, 1, n}]]];
    a[n_] := b[n^2, n];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)

Formula

a(n) = A121303(n^2,n).
Previous Showing 11-16 of 16 results.