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.

A336875 Number of parts, counted without multiplicity, in all compositions of n.

Original entry on oeis.org

0, 1, 2, 6, 13, 30, 66, 144, 308, 655, 1380, 2891, 6024, 12500, 25844, 53274, 109530, 224690, 460033, 940276, 1918979, 3911186, 7962194, 16191875, 32896364, 66776727, 135445212, 274532607, 556086916, 1125727954, 2277650681, 4605981879, 9310120876, 18810538092
Offset: 0

Views

Author

Alois P. Heinz, Aug 06 2020

Keywords

Examples

			a(4) = 1 + 2 + 2 + 2 + 1 + 2 + 2 + 1 = 13: (1)111, (1)1(2), (1)(2)1, (2)(1)1, (2)2, (1)(3), (3)(1), (4).
		

Crossrefs

Cf. A000070 (the same for partitions), A001792 (all parts), A097910, A336516.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, [p!, 0],
          `if`(i<1, 0, add((p-> [0, `if`(j=0, 0, p[1])]+p)(
             b(n-i*j, i-1, p+j)/j!), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0)[2]:
    seq(a(n), n=0..38);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, {p!, 0},
         If[i<1, {0, 0}, Sum[{0, If[j == 0, 0, #[[1]]]}+#&[
         b[n-i*j, i-1, p+j]/j!], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0][[2]];
    a /@ Range[0, 38] (* Jean-François Alcover, Jun 13 2021, after Alois P. Heinz *)

A336511 Total sum of the left-to-right maxima in all compositions of n.

Original entry on oeis.org

0, 1, 3, 9, 22, 52, 117, 260, 565, 1217, 2593, 5487, 11538, 24146, 50316, 104490, 216337, 446754, 920506, 1892904, 3885719, 7964162, 16300646, 33321640, 68038796, 138784403, 282824924, 575866839, 1171612786, 2381938742, 4839331484, 9825841526, 19938975797
Offset: 0

Views

Author

Alois P. Heinz, Jul 23 2020

Keywords

Examples

			a(4) = 1 + 1 + 2 + 1 + 2 + 2 + 2 + 1 + 3 + 3 + 4 = 22: (1)111, (1)1(2), (1)(2)1, (2)11, (2)2, (1)(3), (3)1, (4).
		

Crossrefs

Cf. A001705 (the same for permutations of [n]), A336482, A336512, A336516, A336771.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p-> [0,
          `if`(j>m, j*p[1], 0)]+p)(b(n-j, max(m, j))), j=1..n))
        end:
    a:= n-> b(n, -1)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, {0,
         If[j > m, j*p[[1]], 0]} + p][b[n - j, Max[m, j]]], {j, 1, n}]];
    a[n_] := b[n, -1][[2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 04 2022, after Alois P. Heinz *)

A336512 Total sum of the left-to-right minima in all compositions of n.

Original entry on oeis.org

0, 1, 3, 8, 17, 38, 78, 162, 330, 672, 1355, 2736, 5503, 11058, 22191, 44507, 89198, 178697, 357852, 716440, 1434041, 2869935, 5742801, 11490298, 22988084, 45988166, 91995547, 184021931, 368093352, 736266262, 1472660452, 2945526806, 5891385159, 11783304479
Offset: 0

Views

Author

Alois P. Heinz, Jul 23 2020

Keywords

Examples

			a(4) = 1 + 1 + 1 + 2 + 1 + 2 + 1 + 3 + 1 + 4 = 17: (1)111, (1)12, (1)21, (2)(1)1, (2)2, (1)3, (3)(1), (4).
		

Crossrefs

Cf. A001563 (the same for permutations of [n]), A336484, A336511, A336516, A336770.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p-> [0,
          `if`(j b(n, n+1)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, {0,
         If[j < m, j*p[[1]], 0]} + p][b[n - j, Min[m, j]]], {j, 1, n}]];
    a[n_] := b[n, n + 1][[2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 07 2022, after Alois P. Heinz *)

A336579 Sum of prime parts, counted without multiplicity, in all compositions of n.

Original entry on oeis.org

0, 0, 2, 7, 14, 38, 83, 193, 421, 917, 1969, 4210, 8908, 18763, 39287, 81940, 170270, 352726, 728663, 1501711, 3088326, 6339424, 12991312, 26583389, 54323352, 110876435, 226057023, 460432903, 936963134, 1905110662, 3870698364, 7858803605, 15945759386
Offset: 0

Views

Author

Alois P. Heinz, Jul 26 2020

Keywords

Examples

			a(4) = 2 + 2 + 2 + 2 + 3 + 3 = 14: 1111, 11(2), 1(2)1, (2)11, (2)2, 1(3), (3)1, 4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, [p!, 0],
          `if`(i<1, 0, add((p-> [0, `if`(j>0 and isprime(i),
           p[1]*i, 0)]+p)(b(n-i*j, i-1, p+j)/j!), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0)[2]:
    seq(a(n), n=0..38);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, {p!, 0},
         If[i < 1, {0, 0}, Sum[Function[q, {0, If[j > 0 && PrimeQ[i],
         q[[1]]*i, 0]} + q][b[n - i*j, i - 1, p + j]/j!], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0][[2]];
    Table[a[n], {n, 0, 38}] (* Jean-François Alcover, Mar 17 2022, after Alois P Heinz *)
Showing 1-4 of 4 results.