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.

A145519 a(n) = Sum_{k=1..n} A145518(n,k).

Original entry on oeis.org

1, 2, 7, 19, 54, 134, 354, 838, 2057, 4794, 11232, 25412, 58075, 128670, 286152, 625829, 1365653, 2941088, 6331146, 13474533, 28642325, 60404681, 127082128, 265712673, 554608226, 1151374963, 2385950536, 4924685252, 10145267212, 20831428273, 42708248451
Offset: 0

Views

Author

Tilman Neumann, Oct 12 2008

Keywords

Comments

Row sums of A145518.
Also row sums of A129129, A215366.
a(n) = sum of the Heinz numbers of the partitions of n. The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the 3 partitions of 3, namely [3], [1,2], and [1,1,1] we get 5, 2*3=6, and 2*2*2=8, respectively; their sum is a(3) = 19. - Emeric Deutsch, Jun 09 2015

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i<2, 2^n,
          add(b(n-i*j, i-1)*ithprime(i)^j, j=0..iquo(n, i)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..35);  # Alois P. Heinz, Feb 19 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i < 2, 2^n, Sum[b[n-i*j, i-1]*Prime[i]^j, {j, 0, Quotient[n, i]}]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 24 2015, after Alois P. Heinz *)

Formula

G.f.: 1/Product_{i>=1}(1-prime(i)*x^i). - Vladeta Jovovic, Nov 09 2008
a(n) ~ c * 2^n, where c = Product_{k>=2} 1/(1 - prime(k)/2^k) = 50.412394245500690832088704444961002125578414895935257436317... . - Vaclav Kotesovec, Sep 10 2014, updated Apr 11 2020

Extensions

a(0) inserted by Alois P. Heinz, Feb 19 2013

A215366 Triangle T(n,k) read by rows in which n-th row lists in increasing order all partitions lambda of n encoded as Product_{i in lambda} prime(i); n>=0, 1<=k<=A000041(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 16, 11, 14, 15, 18, 20, 24, 32, 13, 21, 22, 25, 27, 28, 30, 36, 40, 48, 64, 17, 26, 33, 35, 42, 44, 45, 50, 54, 56, 60, 72, 80, 96, 128, 19, 34, 39, 49, 52, 55, 63, 66, 70, 75, 81, 84, 88, 90, 100, 108, 112, 120, 144, 160, 192, 256
Offset: 0

Views

Author

Alois P. Heinz, Aug 08 2012

Keywords

Comments

The concatenation of all rows (with offset 1) gives a permutation of the natural numbers A000027 with fixed points 1-6, 9, 10, 14, 15, 21, 22, 33, 49, 1095199, ... and inverse permutation A215501.
Number m is positioned in row n = A056239(m). The number of different values m, such that both m and m+1 occur in row n is A088850(n). A215369 lists all values m, such that both m and m+1 are in the same row.
The power prime(i)^j of the i-th prime is in row i*j for j in {0,1,2, ... }.
Column k=2 contains the even semiprimes A100484, where 10 and 22 are replaced by the odd semiprimes 9 and 21, respectively.
This triangle is related to the triangle A145518, see in both triangles the first column, the right border, the second right border and the row sums. - Omar E. Pol, May 18 2015

Examples

			The partitions of n=3 are {[3], [2,1], [1,1,1]}, encodings give {prime(3), prime(2)*prime(1), prime(1)^3} = {5, 3*2, 2^3} => row 3 = [5, 6, 8].
For n=0 the empty partition [] gives the empty product 1.
Triangle T(n,k) begins:
   1;
   2;
   3,  4;
   5,  6,  8;
   7,  9, 10, 12, 16;
  11, 14, 15, 18, 20, 24, 32;
  13, 21, 22, 25, 27, 28, 30, 36, 40, 48, 64;
  17, 26, 33, 35, 42, 44, 45, 50, 54, 56, 60, 72, 80, 96, 128;
  ...
Corresponding triangle of integer partitions begins:
  ();
  1;
  2, 11;
  3, 21, 111;
  4, 22, 31, 211, 1111;
  5, 41, 32, 221, 311, 2111, 11111;
  6, 42, 51, 33, 222, 411, 321, 2211, 3111, 21111, 111111;
  7, 61, 52, 43, 421, 511, 322, 331, 2221, 4111, 3211, 22111, 31111, 211111, 1111111;  - _Gus Wiseman_, Dec 12 2016
		

Crossrefs

Column k=1 gives: A008578(n+1).
Last elements of rows give: A000079.
Second to last elements of rows give: A007283(n-2) for n>1.
Row sums give: A145519.
Row lengths are: A000041.
Cf. A129129 (with row elements using order of A080577).
LCM of terms in row n gives A138534(n).
Cf. A112798, A246867 (the same for partitions into distinct parts).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i<2, [2^n],
           [seq(map(p->p*ithprime(i)^j, b(n-i*j, i-1))[], j=0..n/i)])
        end:
    T:= n-> sort(b(n, n))[]:
    seq(T(n), n=0..10);
    # (2nd Maple program)
    with(combinat): A := proc (n) local P, A, i: P := partition(n): A := {}; for i to nops(P) do A := `union`(A, {mul(ithprime(P[i][j]), j = 1 .. nops(P[i]))}) end do: A end proc; # the command A(m) yields row m. # Emeric Deutsch, Jan 23 2016
    # (3rd Maple program)
    q:= 7: S[0] := {1}: for m to q do S[m] := `union`(seq(map(proc (f) options operator, arrow: ithprime(j)*f end proc, S[m-j]), j = 1 .. m)) end do; # for a given positive integer q, the program yields rows 0, 1, 2,...,q. # Emeric Deutsch, Jan 23 2016
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i<2, {2^n}, Table[Function[#*Prime[i]^j] /@ b[n - i*j, i-1], {j, 0, n/i}] // Flatten]; T[n_] := Sort[b[n, n]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Mar 12 2015, after Alois P. Heinz *)
    nn=7;HeinzPartition[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]//Reverse];
    Take[GatherBy[Range[2^nn],Composition[Total,HeinzPartition]],nn+1] (* Gus Wiseman, Dec 12 2016 *)
    Table[Map[Times @@ Prime@ # &, IntegerPartitions[n]], {n, 0, 8}] // Flatten (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    \\ From M. F. Hasler, Dec 06 2016 (Start)
    A215366_row(n)=vecsort([vecprod([prime(p)|p<-P])|P<-partitions(n)]) \\ bug fix & syntax update by M. F. Hasler, Oct 20 2023
    A215366_vec(N)=concat(apply(A215366_row,[0..N])) \\ "flattened" rows 0..N (End)

Formula

Recurrence relation, explained for the set S(4) of entries in row 4: multiply the entries of S(3) by 2 (= 1st prime), multiply the entries of S(2) by 3 (= 2nd prime), multiply the entries of S(1) by 5 (= 3rd prime), multiply the entries of S(0) by 7 (= 4th prime); take the union of all the obtained products. The 3rd Maple program is based on this recurrence relation. - Emeric Deutsch, Jan 23 2016

A258323 Sum T(n,k) over all partitions lambda of n into k distinct parts of Product_{i:lambda} prime(i); triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 2, 0, 3, 0, 5, 6, 0, 7, 10, 0, 11, 29, 0, 13, 43, 30, 0, 17, 94, 42, 0, 19, 128, 136, 0, 23, 231, 293, 0, 29, 279, 551, 210, 0, 31, 484, 892, 330, 0, 37, 584, 1765, 852, 0, 41, 903, 2570, 1826, 0, 43, 1051, 4273, 4207, 0, 47, 1552, 6747, 6595, 2310
Offset: 0

Views

Author

Alois P. Heinz, May 26 2015

Keywords

Examples

			T(6,2) = 43 because the partitions of 6 into 2 distinct parts are {[5,1], [4,2]} and prime(5)*prime(1) + prime(4)*prime(2) = 11*2 + 7*3 = 22 + 21 = 43.
Triangle T(n,k) begins:
  1
  0,  2;
  0,  3;
  0,  5,   6;
  0,  7,  10;
  0, 11,  29;
  0, 13,  43,  30;
  0, 17,  94,  42;
  0, 19, 128, 136;
  0, 23, 231, 293;
  0, 29, 279, 551, 210;
		

Crossrefs

Row sums give A147655.
T(n*(n+1)/2,n) = A002110(n).
T(n^2,n) = A321267(n).

Programs

  • Maple
    g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, expand(
          add(g(n-i*j, i-1)*(ithprime(i)*x)^j, j=0..min(1, n/i)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(g(n$2)):
    seq(T(n), n=0..20);
  • Mathematica
    g[n_, i_] := g[n, i] = If[n==0, 1, If[i<1, 0, Expand[Sum[g[n-i*j, i-1] * (Prime[i]*x)^j, {j, 0, Min[1, n/i]}]]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][g[n, n]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Jan 06 2017, after Alois P. Heinz *)

A145520 Triangle read by rows: T2[n,k] = Sum_{partitions of n with k parts p(n, k; m_1, m_2, m_3, ..., m_n)} c(n; m_1, m_2, ..., m_n) * x_1^m_1 * x_2^m_2 * ... x^n*m_n, where x_i = i-th prime.

Original entry on oeis.org

2, 3, 4, 5, 18, 8, 7, 67, 72, 16, 11, 220, 470, 240, 32, 13, 697, 2625, 2420, 720, 64, 17, 2100, 13559, 20230, 10360, 2016, 128, 19, 6159, 66374, 152313, 120400, 39200, 5376, 256, 23, 17340, 313136, 1071168, 1235346, 602784, 135744, 13824, 512, 29, 47581
Offset: 1

Views

Author

Tilman Neumann, Oct 12 2008, Oct 13 2008, Sep 02 2009

Keywords

Comments

Here c(n; m_1, m_2, ..., m_n) = n! / (m_1!*1!^m_1 * m_2!*2!^m_2 * ... * m_n!*n!^m_n) is the number of ways to realize the partition p(n, k; m_1, m_2, m_3, ..., m_n).
Also the Bell transform of the prime numbers. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 29 2016

Examples

			Triangle begins:
:  2;
:  3,    4;
:  5,   18,     8;
:  7,   67,    72,    16;
: 11,  220,   470,   240,    32;
: 13,  697,  2625,  2420,   720,   64;
: 17, 2100, 13559, 20230, 10360, 2016, 128;
		

Crossrefs

Cf. A000040, A007446 (row sums), A145518.

Programs

  • Maple
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(x
          *binomial(n-1, j-1)*ithprime(j)*b(n-j), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n)):
    seq(T(n), n=1..10);  # Alois P. Heinz, May 27 2015
    # The function BellMatrix is defined in A264428.
    # Adds (1,0,0,0, ..) as column 0.
    BellMatrix(n -> ithprime(n+1), 9); # Peter Luschny, Jan 29 2016
  • Mathematica
    b[n_] := b[n] = Expand[If[n == 0, 1, Sum[x*Binomial[n - 1, j - 1]*Prime[j]* b[n - j], {j, 1, n}]]]; T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n]]; Table[T[n], {n, 1, 10}] // Flatten (* Jean-François Alcover, Jan 23 2016, after Alois P. Heinz *)
    BellMatrix[f_, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    rows = 12;
    B = BellMatrix[Function[n, Prime[n+1]], rows];
    Table[B[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 28 2018, after Peter Luschny *)
Showing 1-4 of 4 results.