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

A238342 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with exactly k occurrences of the smallest part, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 3, 4, 0, 1, 0, 8, 3, 4, 0, 1, 0, 11, 10, 5, 5, 0, 1, 0, 20, 18, 14, 5, 6, 0, 1, 0, 34, 35, 24, 21, 6, 7, 0, 1, 0, 59, 60, 59, 35, 27, 7, 8, 0, 1, 0, 96, 121, 108, 85, 49, 35, 8, 9, 0, 1, 0, 167, 217, 213, 175, 125, 63, 44, 9, 10, 0, 1, 0, 282, 391, 419, 366, 258, 176, 80, 54, 10, 11, 0, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Conjecture: Generally, for k > 0 is a(n) ~ n^k * ((1+sqrt(5))/2)^(n-2*k-1) / (5^((k+1)/2) * k!). Holds for all k<=10. - Vaclav Kotesovec, May 02 2014
G.f.: 1 + Sum_{i>0} (-y*(x^i)*(x - 1)^2)/( (x^(i+1) + x - 1)*((x^i)*(x*(y - 1) - y) - x + 1) ). - John Tyler Rascoe, Oct 15 2024
Sum_{k=0..n} k * T(n,k) = A097941(n). - Alois P. Heinz, Oct 15 2024

Examples

			Triangle starts:
00:  1;
01:  0,    1;
02:  0,    1,    1;
03:  0,    3,    0,    1;
04:  0,    3,    4,    0,    1;
05:  0,    8,    3,    4,    0,    1;
06:  0,   11,   10,    5,    5,    0,    1;
07:  0,   20,   18,   14,    5,    6,    0,    1;
08:  0,   34,   35,   24,   21,    6,    7,    0,   1;
09:  0,   59,   60,   59,   35,   27,    7,    8,   0,   1;
10:  0,   96,  121,  108,   85,   49,   35,    8,   9,   0,   1;
11:  0,  167,  217,  213,  175,  125,   63,   44,   9,  10,   0,  1;
12:  0,  282,  391,  419,  366,  258,  176,   80,  54,  10,  11,  0,  1;
13:  0,  475,  709,  808,  730,  579,  371,  236,  99,  65,  11, 12,  0,  1;
14:  0,  800, 1281, 1522, 1481, 1202,  861,  513, 309, 120,  77, 12, 13,  0, 1;
15:  0, 1352, 2283, 2872, 2925, 2512, 1862, 1238, 684, 395, 143, 90, 13, 14, 0, 1;
...
		

Crossrefs

Cf. A238341 (the same for largest part).
Row sums are A011782.
T(2*n,n) gives A232665(n).
Cf. A097941.

Programs

  • Maple
    b:= proc(n, s) option remember;`if`(n=0, 1,
          `if`(n`if`(k=0, `if`(n=0, 1, 0), add((p->add(coeff(p, x, i)*
         binomial(i+k, k), i=0..degree(p)))(b(n-j*k, j+1)), j=1..n/k)):
    seq(seq(T(n, k), k=0..n), n=0..15);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Nov 07 2014, translated from Maple *)
  • PARI
    T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h=1+sum(i=1,N,(-y*(x^i)*(x-1)^2)/((x^(i+1)+x-1)*((x^i)*(x*(y-1)-y)-x+1)))); for(i=0,N-1, print(Vecrev(polcoef(h,i))))}
    T_xy(15) \\ John Tyler Rascoe, Oct 15 2024

A097979 Total number of largest parts in all compositions of n.

Original entry on oeis.org

1, 3, 6, 12, 23, 46, 91, 183, 367, 737, 1478, 2962, 5928, 11858, 23707, 47384, 94698, 189260, 378277, 756160, 1511730, 3022672, 6044472, 12088395, 24177600, 48359695, 96732370, 193495606, 387057584, 774248858, 1548754115, 3097980230, 6196797193, 12395022288
Offset: 1

Views

Author

Vladeta Jovovic, Sep 07 2004

Keywords

Comments

Also number of compositions of n+1 with unique largest part. - Vladeta Jovovic, Apr 03 2005

Crossrefs

Column k=1 of A238341.

Programs

  • Mathematica
    nn=32; Drop[CoefficientList[Series[Sum[x^j/(1 - (x - x^(j + 1))/(1 - x))^2, {j, 1, nn}], {x, 0, nn}], x], 1] (* Geoffrey Critzer, Mar 31 2014 *)
    b[n_, p_, i_] := b[n, p, i] = If[n == 0, p!, If[i<1, 0, Sum[b[n-i*j, p+j, i-1]/j!, {j, 0, n/i}]]]; a[n_, k_] := Sum[b[n-i*k, k, i-1]/k!, {i, 1, n/k}]; a[0, 0] = 1; a[, 0] = 0; a[n] := a[n+1, 1]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Feb 10 2015, after A238341 *)
  • PARI
    { b(t)=local(r);sum(k=1,t, forstep(s=t%k,t-k,k,u=(t-k-s)\k;r+=binomial(-2,s)*(-2)^(s-u)*binomial(s,u)));r }
    { a(n)=b(n)-2*b(n-1)+b(n-2) } \\ Max Alekseyev, Apr 16 2005

Formula

G.f.: (1-x)^2 * Sum_{k>=1} x^k/(1-2*x+x^(k+1))^2.
a(n) ~ 2^(n-1)/log(2). - Vaclav Kotesovec, Apr 30 2014

Extensions

More terms from Max Alekseyev, Apr 16 2005

A097939 Sum of the smallest parts of all compositions of n.

Original entry on oeis.org

1, 3, 6, 12, 22, 42, 79, 151, 291, 566, 1106, 2175, 4293, 8499, 16864, 33523, 66727, 132958, 265137, 529050, 1056169, 2109282, 4213710, 8419697, 16827079, 33634489, 67237513, 134424624, 268768414, 537407062, 1074605619, 2148875961, 4297212424, 8593556211, 17185713097, 34369170909
Offset: 1

Views

Author

Vladeta Jovovic, Sep 05 2004

Keywords

Comments

Sums of the antidiagonals of A099238. - Paul Barry, Oct 08 2004

Crossrefs

Programs

  • Maple
    A097939:=n->add(add(binomial(n-r*(k+1)-1,k), k=0..floor((n-r-1)/(r+1))), r=0..n-1): seq(A097939(n), n=1..50); # Wesley Ivan Hurt, Dec 03 2016
    # second Maple Program:
    b:= proc(n, m) option remember; `if`(n=0, m,
          add(b(n-j, min(j, m)), j=1..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=1..40);  # Alois P. Heinz, Jul 26 2020
  • Mathematica
    Drop[ CoefficientList[ Series[ Sum[x^k/(1 - x - x^k), {k, 50}], {x, 0, 35}], x], 1] (* Robert G. Wilson v, Sep 08 2004 *)
  • PARI
    N=66; x='x+O('x^N);
    gf= sum(k=1,N, x^k/(1-x-x^k) );
    Vec(gf)
    /* Joerg Arndt, Jan 01 2013 */
    
  • PARI
    {a(n)=polcoeff(sum(m=1,n,x^m*sumdiv(m,d,1/(1-x +x*O(x^n))^d) ),n)}

Formula

G.f.: Sum_{k>=1} x^k/(1-x-x^k).
a(n) = Sum_{r=0..n-1} Sum_{k=0..floor((n-r-1)/(r+1))} binomial(n-r(k+1)-1, k). - Paul Barry, Oct 08 2004
G.f.: (1-x)^2 * Sum_{k>=1} k*x^k/((x^k+x-1)*(x^(k+1)+x-1)). - Vladeta Jovovic, Apr 23 2006
G.f.: Sum_{k>=1} x^k/((1-x)^k*(1-x^k)). - Vladeta Jovovic, Mar 02 2008
G.f.: Sum_{n>=1} a*x^n/(1-a*x^n) (generalized Lambert series) where a=1/(1-x). - Joerg Arndt, Jan 30 2011
G.f.: Sum_{n>=1} (a*x)^n/(1-x^n) where a=1/(1-x). - Joerg Arndt, Jan 01 2013
G.f.: Sum_{n>=1} x^n * Sum_{d|n} 1/(1-x)^d. - Paul D. Hanna, Jul 18 2013
a(n) ~ 2^(n-1). - Vaclav Kotesovec, Oct 28 2014

Extensions

More terms from Robert G. Wilson v, Sep 08 2004

A284942 Expansion of Sum_{k>=1} mu(k)^2*x^k*(1 - x)^2/(1 - 2*x)^2, where mu() is the Moebius function (A008683).

Original entry on oeis.org

1, 3, 8, 19, 46, 107, 244, 547, 1213, 2665, 5807, 12567, 27042, 57899, 123428, 262115, 554750, 1170538, 2463154, 5170462, 10829234, 22635087, 47223412, 98353299, 204519549, 424665001, 880581806, 1823667221, 3772341661, 7794697759, 16089424392, 33178906531, 68357928558
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2017

Keywords

Comments

Total number of squarefree parts in all compositions (ordered partitions) of n.

Examples

			a(4) = 19 because we have [4], [3, 1], [2, 2], [2, 1, 1], [1, 3], [1, 2, 1], [1, 1, 2], [1, 1, 1, 1] and 0 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 19.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; add(`if`(numtheory[
          issqrfree](j), ceil(2^(n-j-1)), 0)+a(n-j), j=1..n)
        end:
    seq(a(n), n=1..33);  # Alois P. Heinz, Aug 07 2019
  • Mathematica
    nmax = 33; Rest[CoefficientList[Series[Sum[MoebiusMu[k]^2 x^k (1 - x)^2/(1 - 2 x)^2, {k, 1, nmax}], {x, 0, nmax}], x]]
  • PARI
    x='x+O('x^34); Vec(sum(k=1, 34, moebius(k) ^2*x^k*(1 - x)^2/(1 - 2*x)^2)) \\ Indranil Ghosh, Apr 06 2017

Formula

G.f.: Sum_{k>=1} mu(k)^2*x^k*(1 - x)^2/(1 - 2*x)^2.

A284943 Expansion of Sum_{p prime, k>=1} x^(p^k)*(1 - x)^2/(1 - 2*x)^2.

Original entry on oeis.org

0, 1, 3, 8, 20, 47, 110, 251, 564, 1251, 2750, 5994, 12978, 27934, 59825, 127565, 270959, 573575, 1210466, 2547562, 5348385, 11203292, 23419629, 48865346, 101782870, 211670094, 439548898, 911515214, 1887865266, 3905400206, 8070139762, 16658958223, 34355273843
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2017

Keywords

Comments

Total number of prime power parts (1 excluded) in all compositions (ordered partitions) of n.

Examples

			a(5) = 20 because we have [5], [4, 1], [3, 2], [3, 1, 1], [2, 3], [2, 2, 1], [2, 1, 2], [2, 1, 1, 1], [1, 4], [1, 3, 1], [1, 2, 2], [1, 2, 1, 1], [1, 1, 3], [1, 1, 2, 1], [1, 1, 1, 2], [1, 1, 1, 1, 1] and 1 + 1 + 2 + 1 + 2 + 2 + 2 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 1 + 0 = 20.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; nops(ifactors(n)[2])=1 end:
    a:= proc(n) option remember; `if`(n=0, 0, add(a(n-j)+
          `if`(b(j), ceil(2^(n-j-1)), 0), j=1..n))
        end:
    seq(a(n), n=1..33);  # Alois P. Heinz, Aug 07 2019
  • Mathematica
    nmax = 33; Rest[CoefficientList[Series[Sum[Floor[1/PrimeNu[k]] x^k (1 - x)^2/(1 - 2 x)^2, {k, 2, nmax}], {x, 0, nmax}], x]]
  • PARI
    x='x+O('x^34); concat([0], Vec(sum(k=2, 34, (1\omega(k))*x^k*(1 - x)^2/(1 - 2*x)^2))) \\ Indranil Ghosh, Apr 06 2017

Formula

G.f.: Sum_{p prime, k>=1} x^(p^k)*(1 - x)^2/(1 - 2*x)^2.

A308630 Triangle T(n,k) read by rows: the sum of all smallest parts among all k-compositions of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 6, 6, 4, 5, 6, 9, 12, 5, 6, 12, 18, 24, 20, 6, 7, 12, 27, 40, 50, 30, 7, 8, 20, 36, 68, 100, 90, 42, 8, 9, 20, 54, 108, 175, 210, 147, 56, 9, 10, 30, 72, 160, 290, 420, 392, 224, 72, 10, 11, 30, 90, 224, 460, 756, 882, 672, 324, 90, 11, 12, 42, 120, 312, 700, 1272, 1764, 1680, 1080, 450, 110
Offset: 1

Views

Author

R. J. Mathar, Jun 12 2019

Keywords

Examples

			The triangle starts in row n=1 with columns 1<=k<=n as:
   1;
   2,  2;
   3,  2,  3;
   4,  6,  6,  4;
   5,  6,  9, 12,  5;
   6, 12, 18, 24, 20,  6;
   7, 12, 27, 40, 50, 30,  7;
   8, 20, 36, 68,100, 90, 42,  8;
   9, 20, 54,108,175,210,147, 56,  9;
  10, 30, 72,160,290,420,392,224, 72, 10;
  ...
		

Crossrefs

Cf. A097941 (number of smallest parts), A002378 (k=2), A144677 (column k=3 divided by 3), A097940 (row sums).

Programs

  • Maple
    A308630 := proc(n,k)
        add(j*binomial(n-(j-1)*k-2,k-2),j=1..floor(n/k)) ;
        %*k ;
    end proc:

Formula

T(n,k) = k*sum_{j=1..floor(n/k)} binomial(n-(j-1)*k-2, k-2).
Showing 1-6 of 6 results.