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 19 results. Next

A296150 Triangle whose n-th row is the integer partition with Heinz number n.

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 1, 4, 1, 1, 1, 2, 2, 3, 1, 5, 2, 1, 1, 6, 4, 1, 3, 2, 1, 1, 1, 1, 7, 2, 2, 1, 8, 3, 1, 1, 4, 2, 5, 1, 9, 2, 1, 1, 1, 3, 3, 6, 1, 2, 2, 2, 4, 1, 1, 10, 3, 2, 1, 11, 1, 1, 1, 1, 1, 5, 2, 7, 1, 4, 3, 2, 2, 1, 1, 12, 8, 1, 6, 2, 3, 1, 1, 1, 13, 4
Offset: 1

Views

Author

Gus Wiseman, Feb 05 2018

Keywords

Comments

Same as A112798 with rows reversed. Row lengths are A001222. Rows sums are A056239.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of partitions begins: (), (1), (2), (11), (3), (21), (4), (111), (22), (31), (5), (211), (6), (41), (32), (1111), (7), (221).
		

Crossrefs

Programs

  • Maple
    f := n -> op(map(numtheory:-pi, sort(map(`$`@op, ifactors(n)[2]), `>`))):
    map(f, [$1..100]); # Robert Israel, Feb 09 2018
  • Mathematica
    Table[If[n===1,{},Join@@Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]],{n,50}]

A299202 Moebius function of the multiorder of integer partitions indexed by their Heinz numbers.

Original entry on oeis.org

0, 1, 1, -1, 1, -1, 1, 0, -1, -1, 1, 2, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 0, 1, 1, 3, 1, 0, -1, -1, -1, -1, 1, -1, -1, -1, 1, 2, 1, 1, 1, -1, 1, 0, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -3, 1, -1, 2, 0, -1, 2, 1, 1, -1, 3, 1, 2, 1, -1, 1, 1, -1, 2, 1, 1, -1, -1, 1, -5, -1, -1, -1, -1, 1, -4
Offset: 1

Views

Author

Gus Wiseman, Feb 05 2018

Keywords

Comments

By convention, mu() = 0.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Heinz number of (2,1,1) is 12, so mu(2,1,1) = a(12) = 2.
		

Crossrefs

Programs

  • Mathematica
    nn=120;
    ptns=Table[If[n===1,{},Join@@Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]],{n,nn}];
    tris=Join@@Map[Tuples[IntegerPartitions/@#]&,ptns];
    mu[y_]:=mu[y]=If[Length[y]===1,1,-Sum[Times@@mu/@t,{t,Select[tris,And[Length[#]>1,Sort[Join@@#,Greater]===y]&]}]];
    mu/@ptns

Formula

mu(y) = Sum_{g(t)=y} (-1)^d(t), where the sum is over all enriched p-trees (A289501, A299203) whose multiset of leaves is the integer partition y, and d(t) is the number of non-leaf nodes in t.

A299200 Number of twice-partitions whose domain is the integer partition with Heinz number n.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 4, 3, 7, 2, 11, 5, 6, 1, 15, 4, 22, 3, 10, 7, 30, 2, 9, 11, 8, 5, 42, 6, 56, 1, 14, 15, 15, 4, 77, 22, 22, 3, 101, 10, 135, 7, 12, 30, 176, 2, 25, 9, 30, 11, 231, 8, 21, 5, 44, 42, 297, 6, 385, 56, 20, 1, 33, 14, 490, 15, 60, 15, 627, 4
Offset: 1

Views

Author

Gus Wiseman, Feb 05 2018

Keywords

Comments

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

Examples

			The a(15) = 6 twice-partitions: (3)(2), (3)(11), (21)(2), (21)(11), (111)(2), (111)(11).
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat):
    a:= n-> mul(numbpart(pi(i[1]))^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..82);  # Alois P. Heinz, Jan 14 2021
  • Mathematica
    Table[Times@@Cases[FactorInteger[n],{p_,k_}:>PartitionsP[PrimePi[p]]^k],{n,100}]
  • PARI
    a(n) = {my(f = factor(n)); for (k=1, #f~, f[k, 1] = numbpart(primepi(f[k, 1]));); factorback(f);} \\ Michel Marcus, Feb 26 2018

Formula

Multiplicative with a(prime(n)) = A000041(n).

A357982 Replace prime(k) with A000009(k) in the prime factorization of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 3, 1, 4, 2, 2, 1, 5, 1, 6, 2, 2, 3, 8, 1, 4, 4, 1, 2, 10, 2, 12, 1, 3, 5, 4, 1, 15, 6, 4, 2, 18, 2, 22, 3, 2, 8, 27, 1, 4, 4, 5, 4, 32, 1, 6, 2, 6, 10, 38, 2, 46, 12, 2, 1, 8, 3, 54, 5, 8, 4, 64, 1, 76, 15, 4, 6, 6, 4, 89, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798. This sequence gives the number of ways to choose a strict partition of each prime index of n.
The indices i, where a(i) = 1, form A003586, and the indices j, where a(j) > 1, form A059485. - Ivan N. Ianakiev, Oct 27 2022

Examples

			The a(121) = 9 twice-partitions are: (5)(5), (5)(41), (5)(32), (41)(5), (41)(41), (41)(32), (32)(5), (32)(41), (32)(32).
		

Crossrefs

Other multiplicative sequences: A003961, A357852, A064988, A064989, A357980.
The non-strict version is A299200.
A horizontal version is A357978, non-strict A357977.
A000040 lists the primes.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Mathematica
    Table[Times@@Cases[FactorInteger[n],{p_,k_}:>PartitionsQ[PrimePi[p]]^k],{n,100}]
  • PARI
    f9(n) = polcoeff( prod( k=1, n, 1 + x^k, 1 + x * O(x^n)), n); \\ A000009
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1] = f9(primepi(f[k,1]))); factorback(f); \\ Michel Marcus, Oct 26 2022

A299201 Number of twice-partitions whose composite is the integer partition with Heinz number n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 5, 1, 2, 2, 5, 1, 4, 1, 4, 2, 2, 1, 8, 2, 2, 3, 4, 1, 6, 1, 7, 2, 2, 2, 11, 1, 2, 2, 8, 1, 5, 1, 4, 4, 2, 1, 16, 2, 4, 2, 4, 1, 7, 2, 7, 2, 2, 1, 13, 1, 2, 5, 11, 2, 5, 1, 4, 2, 6, 1, 19, 1, 2, 4, 4, 2, 5, 1, 13, 5, 2, 1, 13, 2
Offset: 1

Views

Author

Gus Wiseman, Feb 05 2018

Keywords

Comments

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

Examples

			The a(36) = 11 twice-partitions:
  (2211),
  (22)(11), (211)(2), (221)(1), (21)(21),
  (2)(2)(11), (2)(11)(2), (11)(2)(2), (22)(1)(1), (21)(2)(1),
  (2)(2)(1)(1).
		

Crossrefs

Programs

  • Mathematica
    nn=100;
    ptns=Table[If[n===1,{},Join@@Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]],{n,nn}];
    tris=Join@@Map[Tuples[IntegerPartitions/@#]&,ptns];
    Table[Length[Select[tris,Sort[Join@@#,Greater]===y&]],{y,ptns}]

A300439 Number of odd enriched p-trees of weight n (all outdegrees are odd).

Original entry on oeis.org

1, 1, 2, 2, 5, 7, 18, 29, 75, 132, 332, 651, 1580, 3268, 7961, 16966, 40709, 89851, 215461, 484064, 1159568, 2641812, 6337448, 14622880, 35051341, 81609747, 196326305, 459909847, 1107083238, 2611592457, 6299122736, 14926657167, 36069213786, 85809507332
Offset: 1

Views

Author

Gus Wiseman, Mar 05 2018

Keywords

Comments

An odd enriched p-tree of weight n > 0 is either a single node of weight n, or a finite odd-length sequence of at least 3 odd enriched p-trees whose weights are weakly decreasing and sum to n.

Examples

			The a(6) = 7 odd enriched p-trees: 6, (411), (321), (222), ((111)21), ((211)11), (21111).
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=1+Sum[Times@@f/@y,{y,Select[IntegerPartitions[n],Length[#]>1&&OddQ[Length[#]]&]}];
    Array[f,40]
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = 1 + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^k + O(x*x^n)) - 1/prod(k=1, n-1, 1 + v[k]*x^k + O(x*x^n)), n)/2); v} \\ Andrew Howroyd, Aug 26 2018

A300436 Number of odd p-trees of weight n (all proper terminal subtrees have odd weight).

Original entry on oeis.org

1, 1, 1, 2, 2, 5, 5, 12, 13, 35, 37, 98, 107, 304, 336, 927, 1037, 3010, 3367, 9585, 10924, 32126, 36438, 105589, 121045, 359691, 412789, 1211214, 1398168, 4188930, 4831708, 14315544, 16636297, 50079792, 58084208, 173370663, 202101971, 611487744, 712709423
Offset: 1

Views

Author

Gus Wiseman, Mar 05 2018

Keywords

Comments

An odd p-tree of weight n > 0 is either a single node (if n = 1) or a finite sequence of at least 3 odd p-trees whose weights are weakly decreasing odd numbers summing to n.

Examples

			The a(7) = 5 odd p-trees: ((ooo)(ooo)o), (((ooo)oo)oo), ((ooooo)oo), ((ooo)oooo), (ooooooo).
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=b[n]=If[n>1,0,1]+Sum[Times@@b/@y,{y,Select[IntegerPartitions[n],Length[#]>1&&And@@OddQ/@#&]}];
    Table[b[n],{n,40}]

Formula

O.g.f: x + Product_{n odd} 1/(1 - a(n)*x^n) - Sum_{n odd} a(n)*x^n. - Gus Wiseman, Aug 27 2018

Extensions

Name corrected by Gus Wiseman, Aug 27 2018

A301364 Regular triangle where T(n,k) is the number of enriched p-trees of weight n with k leaves.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 4, 5, 1, 2, 6, 11, 12, 1, 3, 10, 26, 38, 34, 1, 3, 13, 39, 87, 117, 92, 1, 4, 19, 69, 181, 339, 406, 277, 1, 4, 23, 95, 303, 707, 1198, 1311, 806, 1, 5, 30, 143, 514, 1430, 2970, 4525, 4522, 2500, 1, 5, 35, 184, 762, 2446, 6124, 11627
Offset: 1

Views

Author

Gus Wiseman, Mar 19 2018

Keywords

Comments

An enriched p-tree of weight n > 0 is either a single node of weight n, or a finite sequence of two or more enriched p-trees with weakly decreasing weights summing to n.

Examples

			Triangle begins:
  1
  1   1
  1   1   2
  1   2   4   5
  1   2   6  11  12
  1   3  10  26  38  34
  1   3  13  39  87 117  92
  1   4  19  69 181 339 406 277
  ...
The T(5,4) = 11 enriched p-trees: (((21)1)1), ((2(11))1), (((11)2)1), ((211)1), ((21)(11)), (((11)1)2), ((111)2), ((21)11), (2(11)1), ((11)21), (2111).
		

Crossrefs

Programs

  • Mathematica
    eptrees[n_]:=Prepend[Join@@Table[Tuples[eptrees/@ptn],{ptn,Select[IntegerPartitions[n],Length[#]>1&]}],n];
    Table[Length[Select[eptrees[n],Count[#,_Integer,{-1}]===k&]],{n,8},{k,n}]
  • PARI
    A(n)={my(v=vector(n)); for(n=1, n, v[n] = y + polcoef(1/prod(k=1, n-1, 1 - v[k]*x^k + O(x*x^n)), n)); apply(p->Vecrev(p/y), v)}
    { my(T=A(10)); for(n=1, #T, print(T[n])) } \\ Andrew Howroyd, Aug 26 2018

A300352 Number of strict trees of weight n with distinct leaves.

Original entry on oeis.org

1, 1, 2, 2, 3, 6, 8, 11, 17, 40, 48, 76, 109, 159, 400, 470, 745, 1057, 1576, 2103, 5267, 6022, 9746, 13390, 20099, 26542, 39396, 82074, 101387, 152291, 215676, 308937, 423587, 596511, 799022, 1623311, 1960223, 2947722, 4048704, 5845982, 7794809, 11028888
Offset: 1

Views

Author

Gus Wiseman, Mar 03 2018

Keywords

Comments

A strict tree of weight n > 0 is either a single node of weight n, or a sequence of two or more strict trees with strictly decreasing weights summing to n.

Examples

			The a(8) = 11 strict trees with distinct leaves: 8, (71), ((52)1), ((43)1), (62), ((51)2), (53), ((41)3), (5(21)), (521), (431).
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=
    Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    str[q_]:=str[q]=If[Length[q]===1,1,Total[Times@@@Map[str,Select[sps[q],And[Length[#]>1,UnsameQ@@Total/@#]&],{2}]]];
    Table[Total[str/@Select[IntegerPartitions[n],UnsameQ@@#&]],{n,1,20}]

Formula

a(n) = Sum_{i=1..A000009(n)} A294018(A246867(n,i)).

A294018 Number of strict trees whose leaves are the parts of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 3, 1, 0, 1, 1, 1, 3, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 0, 1, 4, 1, 1, 1, 3, 1, 6, 1, 1, 1, 1, 1, 4, 1, 1, 0, 1, 1, 8, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, 1, 4, 1, 1, 6, 1, 4, 1, 1, 1, 4, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

Gus Wiseman, Feb 06 2018

Keywords

Comments

By convention a(1) = 0.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(84) = 8 strict trees: (((42)1)1), (((41)2)1), ((4(21))1), ((421)1), (((41)1)2), ((41)(21)), ((41)21), (4(21)1).
		

Crossrefs

Programs

  • Mathematica
    nn=120;
    ptns=Table[If[n===1,{},Join@@Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]],{n,nn}];
    tris=Join@@Map[Tuples[IntegerPartitions/@#]&,ptns];
    qci[y_]:=qci[y]=If[Length[y]===1,1,Sum[Times@@qci/@t,{t,Select[tris,And[Length[#]>1,Sort[Join@@#,Greater]===y,UnsameQ@@Total/@#]&]}]];
    qci/@ptns

Formula

A273873(n) = Sum_{i=1..A000041(n)} a(A215366(n,i)).
Showing 1-10 of 19 results. Next