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

A340960 Number of ways to write n as an ordered sum of 4 primes.

Original entry on oeis.org

1, 4, 6, 8, 13, 16, 22, 24, 22, 32, 34, 40, 47, 48, 56, 68, 70, 76, 90, 84, 111, 112, 126, 120, 144, 120, 176, 140, 184, 148, 226, 168, 264, 184, 262, 196, 313, 192, 352, 208, 366, 256, 418, 240, 473, 260, 496, 324, 536, 300, 616, 308, 634, 348, 670, 348, 772, 364, 786, 412
Offset: 8

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 4):
    seq(a(n), n=8..67);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 67; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^4, {x, 0, nmax}], x] // Drop[#, 8] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^4.

A340961 Number of ways to write n as an ordered sum of 5 primes.

Original entry on oeis.org

1, 5, 10, 15, 25, 36, 50, 65, 70, 90, 110, 125, 155, 170, 200, 241, 270, 300, 350, 375, 435, 500, 530, 600, 640, 696, 760, 850, 840, 985, 990, 1170, 1160, 1370, 1250, 1570, 1445, 1760, 1600, 2000, 1710, 2340, 1950, 2555, 2165, 2876, 2320, 3340, 2560, 3595, 2880, 3985, 3050
Offset: 10

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 5):
    seq(a(n), n=10..62);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 62; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^5, {x, 0, nmax}], x] // Drop[#, 10] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^5.

A340962 Number of ways to write n as an ordered sum of 6 primes.

Original entry on oeis.org

1, 6, 15, 26, 45, 72, 106, 150, 186, 236, 306, 366, 455, 540, 636, 782, 912, 1056, 1236, 1410, 1617, 1896, 2106, 2400, 2696, 2976, 3348, 3716, 4026, 4446, 4917, 5340, 5982, 6380, 7017, 7476, 8377, 8640, 9765, 9936, 11202, 11496, 13132, 12930, 15117, 14672, 17178, 16800, 19696
Offset: 12

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 6):
    seq(a(n), n=12..60);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 60; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^6, {x, 0, nmax}], x] // Drop[#, 12] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^6.

A340963 Number of ways to write n as an ordered sum of 7 primes.

Original entry on oeis.org

1, 7, 21, 42, 77, 133, 210, 316, 434, 574, 770, 980, 1239, 1547, 1876, 2331, 2828, 3367, 4032, 4746, 5565, 6574, 7602, 8757, 10136, 11480, 13132, 14882, 16646, 18662, 20951, 23268, 26082, 28861, 31787, 35218, 38745, 42532, 46403, 50883, 54810, 60613, 65016, 71302, 76069
Offset: 14

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 7):
    seq(a(n), n=14..58);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 58; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^7, {x, 0, nmax}], x] // Drop[#, 14] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^7.

A340964 Number of ways to write n as an ordered sum of 8 primes.

Original entry on oeis.org

1, 8, 28, 64, 126, 232, 392, 624, 925, 1296, 1800, 2416, 3158, 4088, 5152, 6504, 8142, 9976, 12216, 14784, 17738, 21296, 25272, 29736, 35023, 40768, 47328, 54832, 62728, 71744, 81796, 92736, 105078, 118664, 132924, 149424, 167002, 186144, 206852, 229272, 253023
Offset: 16

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 8):
    seq(a(n), n=16..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^8, {x, 0, nmax}], x] // Drop[#, 16] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^8.

A340965 Number of ways to write n as an ordered sum of 9 primes.

Original entry on oeis.org

1, 9, 36, 93, 198, 387, 696, 1170, 1845, 2740, 3960, 5562, 7566, 10125, 13248, 17133, 22014, 27774, 34776, 43173, 53010, 64869, 78696, 94617, 113415, 134946, 159552, 188164, 219960, 256041, 297180, 342846, 394614, 452595, 516276, 587997, 667938, 755109, 852444
Offset: 18

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 9):
    seq(a(n), n=18..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^9, {x, 0, nmax}], x] // Drop[#, 18] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^9.

A340966 Number of ways to write n as an ordered sum of 10 primes.

Original entry on oeis.org

1, 10, 45, 130, 300, 622, 1185, 2100, 3495, 5480, 8266, 12100, 17140, 23730, 32155, 42802, 56400, 73180, 93820, 119250, 149872, 187090, 231765, 284490, 347335, 421332, 507580, 608840, 725500, 859450, 1014473, 1190700, 1392100, 1621710, 1879950, 2172610, 2503580
Offset: 20

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; local r, p; r, p:= 0, 2;
          if n=0 then `if`(k=0, 1, 0) elif k<1 then 0 else
          while p<=n do r:= r+b(n-p, k-1); p:= nextprime(p) od; r fi
        end:
    a:= n-> b(n, 10):
    seq(a(n), n=20..56);  # Alois P. Heinz, Jan 31 2021
  • Mathematica
    nmax = 56; CoefficientList[Series[Sum[x^Prime[k], {k, 1, nmax}]^10, {x, 0, nmax}], x] // Drop[#, 20] &

Formula

G.f.: (Sum_{k>=1} x^prime(k))^10.

A224344 Number T(n,k) of compositions of n using exactly k primes (counted with multiplicity); triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 2, 5, 1, 3, 8, 5, 5, 13, 13, 1, 7, 23, 27, 7, 11, 39, 52, 25, 1, 17, 65, 99, 66, 9, 27, 106, 186, 151, 41, 1, 40, 177, 340, 323, 133, 11, 61, 293, 608, 666, 358, 61, 1, 92, 482, 1076, 1330, 867, 236, 13, 142, 781, 1894, 2581, 1971, 737, 85, 1
Offset: 0

Views

Author

Alois P. Heinz, May 23 2013

Keywords

Examples

			A(5,1) = 8: [2,1,1,1], [1,2,1,1], [1,1,2,1], [1,1,1,2], [3,1,1], [1,3,1], [1,1,3], [5].
Triangle T(n,k) begins:
   1;
   1;
   1,   1;
   1,   3;
   2,   5,   1;
   3,   8,   5;
   5,  13,  13,   1;
   7,  23,  27,   7;
  11,  39,  52,  25,   1;
  17,  65,  99,  66,   9;
  27, 106, 186, 151,  41,  1;
  40, 177, 340, 323, 133, 11;
  ...
		

Crossrefs

Column k=0 gives: A052284.
Row sums are: A011782.
Row lengths are: A008619.
T(floor(n/2)) = A093178(n).
T(2n,n-1) = A001844(n-1) for n>0.

Programs

  • Maple
    T:= proc(n) option remember; local j; if n=0 then 1
          else []; for j to n do zip((x, y)->x+y, %,
          [`if`(isprime(j), 0, NULL), T(n-j)], 0) od; %[] fi
        end:
    seq(T(n), n=0..16);
  • Mathematica
    zip[f_, x_List, y_List, z_] :=  With[{m = Max[Length[x], Length[y]]},  Thread[f[PadRight[x, m, z], PadRight[y, m, z]]]]; T[n_] := T[n] =  Module[{j, pc}, If[n == 0, {1}, pc = {}; For[j = 1, j <= n, j++, pc = zip[Plus, pc, Join[If[PrimeQ[j], {0}, {}], T[n-j]], 0]]; pc]]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)

Formula

Sum_{k=1..floor(n/2)} k * T(n,k) = A102291(n).

A347741 Number of compositions (ordered partitions) of n into at most 4 prime parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 2, 6, 6, 10, 15, 15, 24, 25, 31, 36, 35, 45, 50, 55, 63, 69, 73, 90, 91, 99, 113, 114, 130, 143, 144, 153, 166, 159, 195, 179, 213, 191, 253, 216, 279, 236, 288, 247, 343, 248, 377, 275, 397, 318, 456, 307, 503, 342, 524, 401, 572, 379, 641, 396, 667
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 11 2021

Keywords

Crossrefs

Programs

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

Formula

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

A347742 Number of compositions (ordered partitions) of n into at most 5 prime parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 2, 6, 6, 10, 16, 20, 34, 40, 56, 72, 85, 110, 120, 145, 173, 194, 228, 260, 291, 340, 383, 414, 480, 518, 579, 653, 696, 759, 835, 875, 973, 1041, 1093, 1201, 1269, 1406, 1448, 1617, 1593, 1818, 1822, 2035, 1997, 2318, 2166, 2647, 2453, 2897, 2689, 3277
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 11 2021

Keywords

Crossrefs

Programs

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

Formula

a(n) = Sum_{k=1..5} A121303(n,k) for n >= 2. - Alois P. Heinz, Sep 11 2021
Showing 1-10 of 16 results. Next