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.

Previous Showing 21-25 of 25 results.

A332716 Number of compositions of n^2 where each part is less than or equal to n.

Original entry on oeis.org

1, 1, 5, 149, 20569, 11749641, 26649774581, 236837126431501, 8237168505776637425, 1125036467745713090813969, 606147434557459526483161067501, 1293596348252277644272081532560154645, 10970544241076481629439275072320816659677161
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2020

Keywords

Comments

All terms are odd.

Examples

			a(2) = 5: 22, 211, 121, 112, 1111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-d, k), d=1..min(n, k)))
        end:
    a:= n-> b(n^2, n):
    seq(a(n), n=0..15);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - d, k], {d, 1, Min[n, k]}]];
    a[n_] := b[n^2, n];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Oct 31 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{i=0..n-1} A048004(n^2-1,i) for i > 0.

A342494 Number of compositions of n with strictly decreasing first quotients.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 12, 15, 21, 30, 39, 50, 65, 82, 103, 129, 160, 196, 240, 293, 352, 422, 500, 593, 706, 832, 974, 1138, 1324, 1534, 1783, 2054, 2362, 2712, 3108, 3552, 4051, 4606, 5232, 5935, 6713, 7573, 8536, 9597, 10773, 12085, 13534, 15119, 16874, 18809
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The composition (1,2,3,4,2) has first quotients (2,3/2,4/3,1/2) so is counted under a(12).
The a(1) = 1 through a(6) = 12 compositions:
  (1)  (2)    (3)    (4)      (5)      (6)
       (1,1)  (1,2)  (1,3)    (1,4)    (1,5)
              (2,1)  (2,2)    (2,3)    (2,4)
                     (3,1)    (3,2)    (3,3)
                     (1,2,1)  (4,1)    (4,2)
                              (1,2,2)  (5,1)
                              (1,3,1)  (1,2,3)
                              (2,2,1)  (1,3,2)
                                       (1,4,1)
                                       (2,3,1)
                                       (3,2,1)
                                       (1,2,2,1)
		

Crossrefs

The weakly decreasing version is A069916.
The version for differences instead of quotients is A325548.
The strictly increasing version is A342493.
The unordered version is A342499, ranked by A342525.
The strict unordered version is A342518.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A001055 counts factorizations.
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A074206 counts ordered factorizations.
A167865 counts strict chains of divisors > 1 summing to n.
A274199 counts compositions with all adjacent parts x < 2y.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Greater@@Divide@@@Reverse/@Partition[#,2,1]&]],{n,0,15}]

Extensions

a(21)-a(49) from Alois P. Heinz, Mar 18 2021

A048003 Triangular array T read by rows: T(h,k) = number of binary words of length h and maximal runlength k.

Original entry on oeis.org

2, 2, 2, 2, 4, 2, 2, 8, 4, 2, 2, 14, 10, 4, 2, 2, 24, 22, 10, 4, 2, 2, 40, 46, 24, 10, 4, 2, 2, 66, 94, 54, 24, 10, 4, 2, 2, 108, 188, 118, 56, 24, 10, 4, 2, 2, 176, 370, 254, 126, 56, 24, 10, 4, 2, 2, 286, 720, 538, 278, 128, 56, 24, 10, 4, 2, 2, 464, 1388, 1126, 606, 286, 128, 56, 24, 10, 4, 2
Offset: 1

Views

Author

Keywords

Examples

			Rows: {2}; {2,2}; {2,4,2}; {2,8,4,2}; ...
T(3,2) = 4, because there are 4 binary words of length 3 and maximal runlength 2: 001, 011, 100, 110. - _Alois P. Heinz_, Oct 29 2008
		

Crossrefs

T(h,2) = 2*a(h+1) for h=2, 3, ..., where a=A000071.
T(h,3) = 2*b(h) for h=3, 4, ..., where b=A000100.
T(h,4) = 2*c(h) for h=4, 5, ..., where c=A000102.
Cf. A048004.
Columns 5, 6 give: 2*A006979, 2*A006980. Row sums give: A000079.
Cf. A229756.

Programs

  • Maple
    gf:= proc(n) 2*x^n/ (1-add(x^i, i=1..n-1))/ (1-add(x^j, j=1..n)) end:
    T:= (h,k)-> coeff(series(gf(k), x, h+1), x, h):
    seq(seq(T(h,k), k=1..h), h=1..13);  # Alois P. Heinz, Oct 29 2008
  • Mathematica
    gf[n_] := 2*x^n*(x^2-2*x+1) / (x^(2*n+1)-2*x^(n+2)-x^(n+1)+x^n+4*x^2-4*x+1); t[h_, k_] := Coefficient[ Series[ gf[k], {x, 0, h+1}], x, h]; Table[ Table[ t[h, k], {k, 1, h}], {h, 1, 13}] // Flatten (* Jean-François Alcover, Oct 07 2013, after Alois P. Heinz *)

Formula

G.f. of column k: 2*x^k / ((1-Sum_{i=1..k-1} x^i) * (1-Sum_{j=1..k} x^j)). - Alois P. Heinz, Oct 29 2008
T(n, k) = 0 if k < 1 or k > n, 2 if k = 1 or k = n, 2T(n-1, k) + T(n-1, k-1) - 2T(n-2, k-1) + T(n-k, k-1) - T(n-k-1, k) otherwise (cf. similar formula for A048004). This is a simplification of the L-shaped sum T(n-1, k) + ... + T(n-k, k) + ... + T(n-k,1). - Andrew Woods, Oct 11 2013
For n > 2k, T(n, n-k) = 2*A045623(k). - Andrew Woods, Oct 11 2013

Extensions

More terms from Alois P. Heinz, Oct 29 2008

A209240 Triangular array read by rows. T(n,k) is the number of ternary length-n words in which the longest run of consecutive 0's is exactly k; n>=0, 0<=k<=n.

Original entry on oeis.org

1, 2, 1, 4, 4, 1, 8, 14, 4, 1, 16, 44, 16, 4, 1, 32, 132, 58, 16, 4, 1, 64, 384, 200, 60, 16, 4, 1, 128, 1096, 668, 214, 60, 16, 4, 1, 256, 3088, 2180, 740, 216, 60, 16, 4, 1, 512, 8624, 6992, 2504, 754, 216, 60, 16, 4, 1, 1024, 23936, 22128, 8332, 2576, 756, 216, 60, 16, 4, 1
Offset: 0

Views

Author

Geoffrey Critzer, Jan 13 2013

Keywords

Comments

Row sums are 3^n.
Column k=0 is A000079.
Column k=1 is A094309.
Limit of reversed rows gives A120926.

Examples

			1;
2,   1;
4,   4,    1;
8,   14,   4,    1;
16,  44,   16,   4,   1;
32,  132,  58,   16,  4,   1;
64,  384,  200,  60,  16,  4,  1;
128, 1096, 668,  214, 60,  16, 4,  1;
256, 3088, 2180, 740, 216, 60, 16, 4,  1;
		

Crossrefs

Cf. A048004.

Programs

  • Mathematica
    nn=10;f[list_]:=Select[list,#>0&];Map[f,Transpose[Table[CoefficientList[ Series[(1-x^k)/(1-3x+2x^(k+1))-(1-x^(k-1))/(1-3x+2x^k),{x,0,nn}],x],{k,1,nn+1}]]]//Grid

Formula

O.g.f. for column k: (1-x)^2*x^k/(1-3*x+2*x^(k+1))/(1-3*x+2*x^(k+2)).

A063686 Triangular array: T(n,k) is the number of binary necklaces (no turning over) of length n whose longest run of 1's has length k. Table begins at n=0, k=0.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 4, 4, 2, 1, 1, 1, 1, 4, 6, 4, 2, 1, 1, 1, 1, 7, 11, 8, 4, 2, 1, 1, 1, 1, 9, 19, 14, 8, 4, 2, 1, 1, 1, 1, 14, 33, 27, 16, 8, 4, 2, 1, 1, 1, 1, 18, 56, 50, 30, 16, 8, 4, 2, 1, 1, 1, 1, 30, 101, 96, 59, 32, 16, 8, 4, 2, 1, 1, 1
Offset: 0

Views

Author

Christopher Lenard (c.lenard(AT)bendigo.latrobe.edu.au), Aug 22 2001

Keywords

Comments

Column k=1 appears to be A032190(n), n=2,3,...

Examples

			Triangle begins:
  1;
  1, 1;
  1, 1, 1;
  1, 1, 1, 1;
  1, 2, 1, 1, 1;
  1, 2, 2, 1, 1, 1;
  1, 4, 4, 2, 1, 1, 1;
  1, 4, 6, 4, 2, 1, 1, 1;
  1, 7, 11, 8, 4, 2, 1, 1, 1;
  1, 9, 19, 14, 8, 4, 2, 1, 1, 1;
  1, 14, 33, 27, 16, 8, 4, 2, 1, 1, 1;
  ...
		

Crossrefs

Cf. A000358, A093305, A280218 (necklaces avoiding 00, 000, 0000).

Programs

  • PARI
    \\ here R(n) is A048887 transposed
    R(n)={Mat(vector(n, k, Col((1-x)/(1-2*x+x^(k+1)) - 1 + O(x*x^n))))}
    S(M)={matrix(#M-1, #M-1, n, k, if(kAndrew Howroyd, Oct 15 2017

Extensions

T(0,0)=1 from Andrew Howroyd, Oct 15 2017
Previous Showing 21-25 of 25 results.