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 11-18 of 18 results.

A374356 a(n) is the greatest fibbinary number f <= n such that n - f is also a fibbinary number whose binary expansion has no common 1's with that of f (where fibbinary numbers correspond to A003714).

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 4, 5, 8, 9, 10, 10, 8, 9, 10, 10, 16, 17, 18, 18, 20, 21, 20, 21, 16, 17, 18, 18, 20, 21, 20, 21, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 64, 65, 66, 66
Offset: 0

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Comments

To compute a(n): replace every other bit with zero (starting with the second bit) in each run of consecutive 1's in the binary expansion of n.
From Gus Wiseman, Jul 11 2025: (Start)
This is the greatest binary rank of a sparse subset of the binary indices of n, where:
1. The binary indices of a nonnegative integer are the positions of 1 in its reversed binary expansion.
2. A set is sparse iff 1 is not a first difference.
3. The binary rank of a set {S_1,S_2,...} is Sum_i 2^(S_i-1).
(End)

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     2      10         10
   3     2      11         10
   4     4     100        100
   5     5     101        101
   6     4     110        100
   7     5     111        101
   8     8    1000       1000
   9     9    1001       1001
  10    10    1010       1010
  11    10    1011       1010
  12     8    1100       1000
  13     9    1101       1001
  14    10    1110       1010
  15    10    1111       1010
  16    16   10000      10000
		

Crossrefs

The union is A003714 (Fibbinary numbers).
For prime instead of binary indices we have A385216.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A166469 counts sparse submultisets of prime indices, maximal A385215.
A245564 counts sparse subsets of binary indices, maximal case A384883.
A319630 ranks sparse submultisets of prime indices, complement A104210.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    fbi[q_]:=If[q=={},0,Total[2^q]/2];
    Table[Max@@fbi/@Select[Subsets[bpe[n]],FreeQ[Differences[#],1]&],{n,0,100}] (* Gus Wiseman, Jul 11 2025 *)
  • PARI
    a(n) = { my (v = 0, e, x, y, b); while (n, x = y = 0; e = valuation(n, 2); for (k = 0, oo, if (bittest(n, e+k), n -= b = 2^(e+k); [x, y] = [y + b, x], v += x; break;););); return (v); }

Formula

a(n) = A374354(n, A277561(n)-1).
a(n) = n - A374355(n).
a(n) <= n with equality iff n is a fibbinary number.

A172431 Even row Pascal-square read by antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 1, 6, 10, 4, 1, 8, 21, 20, 5, 1, 10, 36, 56, 35, 6, 1, 12, 55, 120, 126, 56, 7, 1, 14, 78, 220, 330, 252, 84, 8, 1, 16, 105, 364, 715, 792, 462, 120, 9, 1, 18, 136, 560, 1365, 2002, 1716, 792, 165, 10
Offset: 1

Views

Author

Mark Dols, Feb 02 2010

Keywords

Comments

Apart from signs identical to A053123. Mirror of A078812.
As a triangle, row n consists of the coefficients of Morgan-Voyce polynomial B(n,x); e.g., B(3,x)=x^3+6x^2+10x+4. As a triangle, rows 0 to 4 are as follows: 1 1...2 1...4...3 1...6...10...4 1...8...21...20...5 See A054142 for coefficients of Morgan-Voyce polynomial b(n,x).
Scaled version of A119900. - Philippe Deléham, Feb 24 2012
A172431 is jointly generated with A054142 as an array of coefficients of polynomials v(n,x): initially, u(1,x)=v(1,x)=1; for n>1, u(n,x)=x*u(n-1,x)+v(n-1,x) and v(n,x)=x*u(n-1,x)+(x+1)*v(n-1,x). See the Mathematica section. - Clark Kimberling, Mar 09 2012
Subtriangle of the triangle given by (1, 0, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 22 2012

Examples

			Array begins:
  1,  2,  3,  4,  5,  6, ...
  1,  4, 10, 20, 35, ...
  1,  6, 21, 56, ...
  1,  8, 36, ...
  1, 10, ...
  1, ...
  ...
Example:
Starting with 1, every entry is twice the one to the left minus the second one to the left, plus the one above.
For n = 9 the a(9) = 10 solution is 2*4 - 1 + 3.
From _Philippe Deléham_, Feb 24 2012: (Start)
Triangle T(n,k) begins:
  1;
  1,   2;
  1,   4,   3;
  1,   6,  10,   4;
  1,   8,  21,  20,   5;
  1,  10,  36,  56,  35,   6;
  1,  12,  55, 120, 126,  56,   7; (End)
From _Philippe Deléham_, Mar 22 2012: (Start)
(1, 0, 0, 0, 0, 0, ...) DELTA (0, 2, -1/2, 1/2, 0, 0, ...) begins:
  1;
  1,   0;
  1,   2,   0;
  1,   4,   3,   0;
  1,   6,  10,   4,   0;
  1,   8,  21,  20,   5,   0;
  1,  10,  36,  56,  35,   6,   0;
  1,  12,  55, 120, 126,  56,   7,   0; (End)
		

Crossrefs

Cf. A078812, A053123, A007318, A001906 (antidiagonals sums), A007685.
Cf. also A054142, A082985.

Programs

  • GAP
    F:=Factorial;; Flat(List([1..15], n-> List([1..n], k-> Sum([0..Int((k-1)/2)], j-> (-1)^j*F(n-j-1)*2^(k-2*j-1)/(F(j)*F(n-k)*F(k-2*j-1)) )))); # G. C. Greubel, Dec 15 2019
  • Magma
    F:=Factorial; [ &+[(-1)^j*F(n-j-1)*2^(k-2*j-1)/(F(j)*F(n-k)*F(k-2*j-1)): j in [0..Floor((k-1)/2)]]: k in [1..n], n in [1..15]]; // G. C. Greubel, Dec 15 2019
    
  • Maple
    T := (n, k) -> simplify(GegenbauerC(k, n-k, 1)):
    for n from 0 to 10 do seq(T(n,k), k=0..n-1) od; # Peter Luschny, May 10 2016
  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + v[n - 1, x];
    v[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A054142 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A172431 *)
    (* Clark Kimberling, Mar 09 2012 *)
    Table[GegenbauerC[k-1, n-k+1, 1], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Dec 15 2019 *)
  • PARI
    T(n,k) = sum(j=0, (k-1)\2, (-1)^j*(n-j-1)!*2^(k-2*j-1)/(j!*(n-k)!*(k-2*j-1)!) );
    for(n=1, 10, for(k=1, n, print1(T(n,k), ", "))) \\ G. C. Greubel, Dec 15 2019
    
  • Sage
    [[gegenbauer(k-1, n-k+1, 1) for k in (1..n)] for n in (1..15)] # G. C. Greubel, Dec 15 2019
    

Formula

As a decimal sequence: a(n)= 12*a(n-1)- a(n-2) with a(1)=1. [I interpret this remark as: 1, 12=1,2, 143=1,4,3, 1704=1,6,10,4,... taken from A004191 are decimals on the diagonal. - R. J. Mathar, Sep 08 2013]
As triangle T(n,k): T(n,k) = T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-2). - Philippe Deléham, Feb 24 2012
As DELTA-triangle T(n,k) with 0<=k<=n: G.f.: (1-y*x)^2/((1-y*x)^2-x). - Philippe Deléham, Mar 22 2012
T(n, k) = GegenbauerC(k, n-k, 1). - Peter Luschny, May 10 2016
As triangle T(n,k): Product_{k=1..n} T(n,k) = Product_{k=0..n-1} binomial(2*k,k) = A007685(n-1) for n >= 1. - Werner Schulte, Apr 26 2017
As triangle T(n,k) with 1 <= k <= n: T(n,k) = binomial(2*n-k, k-1). - Paul Weisenhorn, Nov 25 2019

A202064 Triangle T(n,k), read by rows, given by (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 4, 0, 0, 5, 10, 1, 0, 0, 6, 20, 6, 0, 0, 0, 7, 35, 21, 1, 0, 0, 0, 8, 56, 56, 8, 0, 0, 0, 0, 9, 84, 126, 36, 1, 0, 0, 0, 0, 10, 120, 252, 120, 10, 0, 0, 0, 0, 0, 11, 165, 462, 330, 55, 1, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2011

Keywords

Comments

Riordan array (x/(1-x)^2, x^2/(1-x)^2).
Mirror image of triangle in A119900.
A203322*A130595 as infinite lower triangular matrices. - Philippe Deléham, Jan 05 2011
From Gus Wiseman, Jul 07 2025: (Start)
Also the number of subsets of {1..n} containing n with k maximal runs (sequences of consecutive elements increasing by 1). For example, row n = 5 counts the following subsets:
{5} {1,5} {1,3,5}
{4,5} {2,5}
{3,4,5} {3,5}
{2,3,4,5} {1,2,5}
{1,2,3,4,5} {1,4,5}
{2,3,5}
{2,4,5}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
For anti-runs instead of runs we have A053538.
Without requiring n see A210039, A202023, reverse A098158, A109446.
(End)

Examples

			Triangle begins :
1
2, 0
3, 1, 0
4, 4, 0, 0
5, 10, 1, 0, 0
6, 20, 6, 0, 0, 0
7, 35, 21, 1, 0, 0, 0
8, 56, 56, 8, 0, 0, 0, 0
		

Crossrefs

Cf. A007318, A005314 (antidiagonal sums), A119900, A084938, A130595, A203322.
Column k = 1 is A000027.
Row sums are A000079.
Column k = 2 is A000292.
Without zeros we have A034867.
Last nonzero term in each row appears to be A124625.
A034839 counts subsets by number of maximal runs, for anti-runs A384893.
A116674 counts strict partitions by number of maximal runs, for anti-runs A384905.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Length[Split[#,#2==#1+1&]]==k&]],{n,12},{k,n}] (* Gus Wiseman, Jul 07 2025 *)

Formula

G.f.: 1/((1-x)^2-y*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000027(n+1), A000079(n), A000129(n+1), A002605(n+1), A015518(n+1), A063727(n), A002532(n+1), A083099(n+1), A015519(n+1), A003683(n+1), A002534(n+1), A083102(n), A015520(n+1), A091914(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 11, 12, 13 respectively.
T(n,k) = binomial(n+1,2k+1).
T(n,k) = 2*T(n-1,k) + T(n-2,k-1) - T(n-2,k), T(0,0) = 1, T(1,0) = 2, T(1,1) = 0 and T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Mar 15 2012

A120987 Triangle read by rows: T(n,k) is the number of ternary words of length n with k strictly increasing runs (0 <= k <= n; for example, the ternary word 2|01|12|02|1|1|012|2 has 8 strictly increasing runs).

Original entry on oeis.org

1, 0, 3, 0, 3, 6, 0, 1, 16, 10, 0, 0, 15, 51, 15, 0, 0, 6, 90, 126, 21, 0, 0, 1, 77, 357, 266, 28, 0, 0, 0, 36, 504, 1107, 504, 36, 0, 0, 0, 9, 414, 2304, 2907, 882, 45, 0, 0, 0, 1, 210, 2850, 8350, 6765, 1452, 55, 0, 0, 0, 0, 66, 2277, 14355, 25653, 14355, 2277, 66, 0, 0, 0, 0, 12
Offset: 0

Views

Author

Emeric Deutsch, Jul 23 2006

Keywords

Comments

Sum of entries in row n is 3^n (A000244).
Sum of entries in column k is A099464(k+1) (a trisection of the tribonacci numbers).
Row n contains 1 + floor(2n/3) nonzero terms.
T(n,n) = (n+1)*(n+2)/2 (the triangular numbers (A000217)).
Sum_{k=0..n} k*T(n,k) = (2n+1)*3^(n-1) = 3*A081038(n-1) for n >= 1.
T(n,k) = A120987(n,n-k).

Examples

			T(5,2) = 6 because we have 012|01, 012|02, 012|12, 01|012, 02|012 and 12|012 (the runs are separated by |).
Triangle starts:
  1;
  0,   3;
  0,   3,   6;
  0,   1,  16,  10;
  0,   0,  15,  51,  15;
  0,   0,   6,  90, 126,  21;
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., 1994, p. 24, p. 154.

Crossrefs

Nb(s,2,q) = A027907(q,s). - Giuliano Cabrele, Dec 11 2015

Programs

  • Maple
    G:=1/(1-3*t*z-3*t*(1-t)*z^2-t*(1-t)^2*z^3): Gser:=simplify(series(G,z=0,33)): P[0]:=1: for n from 1 to 13 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 12 do seq(coeff(P[n],t,j),j=0..n) od; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[Sum[(-1)^j*Binomial[n + 1, j]*Binomial[3 k - 3 j, n], {j, 0, k}], {n, 0, 10}, {k, 0, n}]] (* G. C. Greubel, Dec 20 2015 *)
  • MuPAD
    // binomial c. defined as in linked document
    Cb:=(x,m)->if(0<=m and is(m in Z), binomial(x,m), 0):
    // closed formula derived and proved in the linked document
    // Qsc(r,q,m) with r=2
    T(n,k):=(n,k)->_plus((-1)^(k-j)*Cb(n+1,k-j)*Cb(3*j, n)$j=0..k):
    // Giuliano Cabrele, Dec 11 2015

Formula

T(n,k) = trinomial(n+1,3n-3k+2) = trinomial(n+1,3k-n) (conjecture).
G.f.: 1/(1-3tz-3t(1-t)z^2-t(1-t)^2*z^3).
Can anyone prove the conjecture (either from the g.f. or combinatorially from the definition)?
From Giuliano Cabrele, Mar 02 2008: (Start)
The conjecture is compatible with the g.f., which can be rewritten as (1-t)/(1-t(1+(1-t)z)^3) and expanded to give T(n,k) = Sum_{j=0..k} (-1)^(k-j)*C(3j, n)*C(n+1, k-j) = Sum_{j=0..k} (-1)^j*C(n+1,j)*C(3k-3j,n) = trinomial(n+1,3k-n) = A027907(n+1,3k-n).
Also (1-t)/(1-t(1+(1-t)z)^2) equals the g.f. for the case of binary words, A119900, where Sum_{j=0..k} (-1)^(k-j)*C(2j,n)*C(n+1,k-j) = C(n+1,2k-n). Changing the exponent to 1 gives 1/(1-zt), the g.f. for the case of unary words, the expansion coefficients of which can be written as Kronecker delta(k-n)^(n+1) = Sum_{j=0..k} (-1)^(k-j)*C(j, n)*C(n+1,k-j).
So the conjecture shifts to that the g.f. is (1-t)/(1-t(1+(1-t)z)^m) and coefficients T(m,n,k) = Sum_{j=0..k} (-1)^(k-j)*C(mj,n)*C(n+1, k-j) may apply to the general case of m-ary words. (End)
Sum_{k=0..n} T(n,k) *(-1)^(n-k) = A157241(n+1). - Philippe Deléham, Oct 25 2011
The generalized conjecture above can in fact be proved, as described in the file "Words Partitioned according to Number of Strictly Increasing Runs" linked above. - Giuliano Cabrele, Dec 11 2015

A384883 Number of maximal sparse subsets of the binary indices of n, where a set is sparse iff 1 is not a first difference.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 02 2025

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The binary indices of 27 are {1,2,4,5}, with maximal sparse subsets {{1,4},{1,5},{2,4},{2,5}}, so a(27) = 4.
		

Crossrefs

For subsets of {1..n} we get A000931 (shifted), maximal case of A000045 (shifted).
This is the maximal case of A245564.
The greatest number whose binary indices are one of these subsets is A374356.
For prime instead of binary indices we have A385215, maximal case of A166469.
A034839 counts subsets by number of maximal runs, for strict partitions A116674.
A202064 counts subsets containing n with k maximal runs.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.
A384893 counts subsets by number of maximal anti-runs, for partitions A268193, A384905.

Programs

  • Mathematica
    spars[S_]:=Select[Subsets[S],FreeQ[Differences[#],1]&];
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    maximize[sys_]:=Complement@@Prepend[Most[Subsets[#]]&/@sys,sys];
    Table[Length[maximize[spars[bpe[n]]]],{n,0,100}]

A207543 Triangle read by rows, expansion of (1+y*x)/(1-2*y*x+y*(y-1)*x^2).

Original entry on oeis.org

1, 0, 3, 0, 1, 5, 0, 0, 5, 7, 0, 0, 1, 14, 9, 0, 0, 0, 7, 30, 11, 0, 0, 0, 1, 27, 55, 13, 0, 0, 0, 0, 9, 77, 91, 15, 0, 0, 0, 0, 1, 44, 182, 140, 17, 0, 0, 0, 0, 0, 11, 156, 378, 204, 19, 0, 0, 0, 0, 0, 1, 65, 450, 714, 285, 21, 0
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2012

Keywords

Comments

Previous name was: "A scaled version of triangle A082985."
Triangle, read by rows, given by (0, 1/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (3, -4/3, 1/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Examples

			Triangle begins :
1
0, 3
0, 1, 5
0, 0, 5, 7
0, 0, 1, 14, 9
0, 0, 0, 7, 30, 11
0, 0, 0, 1, 27, 55, 13
0, 0, 0, 0, 9, 77, 91, 15
0, 0, 0, 0, 1, 44, 182, 140, 17
0, 0, 0, 0, 0, 11, 156, 378, 204, 19
0, 0, 0, 0, 0, 1, 65, 450, 714, 285, 21
0, 0, 0, 0, 0, 0, 13, 275, 1122, 1254, 385, 23
		

Crossrefs

Cf. A082985 which is another version of this triangle.
Cf. Diagonals : A005408, A000330, A005585, A050486, A054333, A057788. Cf. A119900.

Programs

  • Maple
    s := (1+y*x)/(1-2*y*x+y*(y-1)*x^2): t := series(s,x,12):
    seq(print(seq(coeff(coeff(t,x,n),y,m),m=0..n)),n=0..11); # Peter Luschny, Aug 17 2016

Formula

T(n,k) = 2*T(n-1,k-1) + T(n-2,k-1) - T(n-2,k-2), T(0,0) = 1, T(1,0) = 0, T(1,1) = 3.
G.f.: (1+y*x)/(1-2*y*x+y*(y-1)*x^2).
Sum_{i, i>=0} T(n+i,n) = A000204(2*n+1).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A078069(n), A000007(n), A003945(n), A111566(n) for x = -1, 0, 1, 2 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A090131(n), A005408(n), A003945(n), A078057(n), A028859(n), A000244(n), A063782(n), A180168(n) for x = -1, 0, 1, 2, 3, 4, 5, 6 respectively.
From Peter Bala, Aug 17 2016: (Start)
Let S(k,n) = Sum_{i = 1..n} i^k. Calculations in Zielinski 2016 suggest the following identity holds involving the p-th row elements of this triangle:
Sum_{k = 0..p} T(p,k)*S(2*k,n) = 1/2*(2*n + 1)*(n*(n + 1))^p.
For example, for row 6 we find S(6,n) + 27*S(8,n) + 55*S(10,n) + 13*S(12,n) = 1/2*(2*n + 1)*(n*(n + 1))^6.
There appears to be a similar result for the odd power sums S(2*k + 1,n) involving A119900. (End)

Extensions

New name using a formula of the author from Peter Luschny, Aug 17 2016

A109447 Binomial coefficients C(n,k) with n-k odd, read by rows.

Original entry on oeis.org

1, 2, 1, 3, 4, 4, 1, 10, 5, 6, 20, 6, 1, 21, 35, 7, 8, 56, 56, 8, 1, 36, 126, 84, 9, 10, 120, 252, 120, 10, 1, 55, 330, 462, 165, 11, 12, 220, 792, 792, 220, 12, 1, 78, 715, 1716, 1287, 286, 13, 14, 364, 2002, 3432, 2002, 364, 14, 1, 105, 1365, 5005, 6435, 3003, 455, 15
Offset: 1

Views

Author

Philippe Deléham, Aug 27 2005

Keywords

Comments

The same as A119900 without 0's. A reflected version of A034867 or A202064. - Alois P. Heinz, Feb 07 2014
From Vladimir Shevelev, Feb 07 2014: (Start)
Also table of coefficients of polynomials P_1(x)=1, P_2(x)=2, for n>=2, P_(n+1)(x) = 2*P_n(x)+(x-1)* P_(n-1)(x). The polynomials P_n(x)/2^(n-1) are connected with sequences A000045 (x=5), A001045 (x=9), A006130 (x=13), A006131 (x=17), A015440 (x=21), A015441 (x=25), A015442 (x=29), A015443 (x=33), A015445 (x=37), A015446 (x=41), A015447 (x=45), A053404 (x=49); also the polynomials P_n(x) are connected with sequences A000129, A002605, A015518, A063727, A085449, A002532, A083099, A015519, A003683, A002534, A083102, A015520. (End)

Examples

			Starred terms in Pascal's triangle (A007318), read by rows:
1;
1*, 1;
1, 2*, 1;
1*, 3, 3*, 1;
1, 4*, 6, 4*, 1;
1*, 5, 10*, 10, 5*, 1;
1, 6*, 15, 20*, 15, 6*, 1;
1*, 7, 21*, 35, 35*, 21, 7*, 1;
1, 8*, 28, 56*, 70, 56*, 28, 8*, 1;
1*, 9, 36*, 84, 126*, 126, 84*, 36, 9*, 1;
Triangle T(n,k) begins:
1;
2;
1,    3;
4,    4;
1,   10,  5;
6,   20,  6;
1,   21,  35,   7;
8,   56,  56,   8;
1,   36, 126,  84,  9;
10, 120, 252, 120, 10;
		

Crossrefs

Cf. A109446.

Programs

  • Maple
    T:= (n, k)-> binomial(n, 2*k+1-irem(n, 2)):
    seq(seq(T(n, k), k=0..ceil((n-2)/2)), n=1..20);  # Alois P. Heinz, Feb 07 2014
  • Mathematica
    Flatten[ Table[ If[ OddQ[n - k], Binomial[n, k], {}], {n, 0, 15}, {k, 0, n}]] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Aug 30 2005
Corrected offset by Alois P. Heinz, Feb 07 2014

A265644 Triangle read by rows: T(n,m) is the number of quaternary words of length n with m strictly increasing runs (0 <= m <= n).

Original entry on oeis.org

1, 0, 4, 0, 6, 10, 0, 4, 40, 20, 0, 1, 65, 155, 35, 0, 0, 56, 456, 456, 56, 0, 0, 28, 728, 2128, 1128, 84, 0, 0, 8, 728, 5328, 7728, 2472, 120, 0, 0, 1, 486, 8451, 27876, 23607, 4950, 165
Offset: 0

Views

Author

Giuliano Cabrele, Dec 13 2015

Keywords

Comments

In the following description the alphabet {0..r} is taken as a basis, with r = 3 in this case.
For example, the quaternary word 2|03|123|3 of length n=7, has m=4 strictly increasing runs.
The empty word has n = 0 and m = 0, and T(0, 0) = 1.
T(n, 0) = 0 for n >= 1.
T(n, m) <> 0 for m <= n <= m*(r+1). T(m*(r+1), m) = 1.
T(n,m) is a partition, based on m, of all the words of length n, so Sum_{k=0..n} T(n,k) = (r+1)^n.

Examples

			Triangle starts:
1;
0, 4;
0, 6, 10;
0, 4, 40,  20;
0, 1, 65, 155,  35;
0, 0, 56, 456, 456, 56;
.
T(3,2) = 40, which accounts for the following words:
[0 <= a <= 0, 1 |    0 <= b <= 1]  =   2
[0 <= a <= 1, 2 |    0 <= b <= 2]  =   6
[0 <= a <= 2, 3 |    0 <= b <= 3]  =  12
[0 <= a <= 3    | 0, 1 <= b <= 3]  =  12
[1 <= a <= 3    | 1, 2 <= b <= 3]  =   6
[2 <= a <= 3    | 2, 3 <= b <= 3]  =   2
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., 1994, p. 24, p. 154.

Crossrefs

Cf. A119900 (r=1, binary words), A120987 (r=2, ternary words), A008287 (quadrinomial coefficients).
Row sums give A000302.
Cf. A000292.

Programs

  • MuPAD
    T:=(n,m)->_plus((-1)^(m-j)*binomial(n+1, m-j)*binomial(4*j, n)$j=0..m):
    
  • PARI
    T(n, k) = sum(j=0, k, (-1)^(k-j)*binomial(n+1, k-j)*binomial(4*j, n));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print()); \\ Michel Marcus, Feb 09 2016

Formula

Refer to comment to A120987 concerning formulas for general values of r and considerations.
Therefrom we get
T(n, m) = Qsc(3, n, m) =
Nb(4*m-n, 3, n+1) = Nb(4*(n-m)+3, 3, n+1) =
Sum_{j=0..n+1} (-1)^j*Cb(n+1, j)*Cb(4*(m-j), 4*(m-j)-n) =
Sum_{j=0..m} (-1)^(m-j)*Cb(n+1, m-j)*Cb(4*j, n) =
(in this last version Cb(n,m) can be replaced by binomial(n,m))
Sum_{j=0..m} (-1)^(m-j)*binomial(n+1, m-j)*binomial(4*j, n) = [z^n, t^m](1-t)/(1-t(1+(1-t)z)^4) where [x^n]F(x) denotes the coefficient of x^n in the formal power series expansion of F(x),
Nb(s,r,n) denotes the (r+1)-nomial coefficient [x^s](1+x+..+x^r)^n,(Nb(s,3,n) = A008287(n,s)).
Cb(x,m) denotes the binomial coefficient in its extended falling factorial notation (Cb(x,m)= x^_m/m! iff m is a nonnegative integer, 0 otherwise), as defined in the Graham et al. reference.
The diagonal T(n, n) = Nb(3, 3, n+1) = Sum_{j=0..n} (-1)^(n-j)*Cb(n+1, n-j)*Cb(4*j, n) = Cb(n+3, 3) = binomial(n+3, 3) = A000292(n+1).
Previous Showing 11-18 of 18 results.