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-20 of 28 results. Next

A221879 Triangle T(n,k) read by rows: Number of order-reversing full contraction mappings (of an n-chain) with 1 fixed point and height exactly k.

Original entry on oeis.org

1, 2, 0, 3, 2, 1, 4, 6, 4, 0, 5, 12, 12, 4, 1, 6, 20, 28, 18, 6, 0, 7, 30, 55, 52, 27, 6, 1, 8, 42, 96, 120, 88, 36, 8, 0, 9, 56, 154, 240, 230, 136, 48, 8, 1, 10, 72, 232, 434, 516, 400, 200, 60, 10, 0, 11, 90, 333, 728, 1036, 996, 650, 280, 75, 10, 1
Offset: 1

Views

Author

Abdullahi Umar, Feb 28 2013

Keywords

Comments

Row sums are A059570.

Examples

			T (4,6) = 6 because there are exactly 6 order-reversing full contraction mappings (of a 4-chain) with 1 fixed point and of height exactly 2, namely: (3222), (2221), (2211), (4433), (4333), (3332).
Triangle starts:
  1,
  2, 0,
  3, 2, 1,
  4, 6, 4, 0,
  5, 12, 12, 4, 1,
  6, 20, 28, 18, 6, 0,
  7, 30, 55, 52, 27, 6, 1,
  8, 42, 96, 120, 88, 36, 8, 0,
  9, 56, 154, 240, 230, 136, 48, 8, 1,
  10, 72, 232, 434, 516, 400, 200, 60, 10, 0,
  11, 90, 333, 728, 1036, 996, 650, 280, 75, 10, 1
  ...
		

Crossrefs

Programs

  • Maple
    A221879 := proc(n,k)
        option remember ;
        if n<1 then
            0 ;
        elif n=1 then
            if k = 1 then
                1;
            else
                0 ;
            end if;
        else
            if n = 2 and k=2 then
                0;
            else
                (n-k+1)*binomial(n-2,k-1)+procname(n-2,k-2) ;
            end if;
        end if;
    end proc:
    seq(seq( A221879(n,k),k=1..n),n=1..20) ; # R. J. Mathar, Aug 15 2025

Formula

T(n, 1) = 1, T(2,2) = 0 and T(n,k) = (n-k+1)*C(n-2,k-1) + T(n-2,k-2) for k > 0.
Sum_{k=1..n} T(n,k) = A059570(n).

A221880 Number of order-preserving or order-reversing full contraction mappings (of an n-chain) with exactly 1 fixed point.

Original entry on oeis.org

1, 2, 8, 22, 57, 136, 315, 710, 1577, 3460, 7527, 16258, 34917, 74624, 158819, 336766, 711777, 1500028, 3152991, 6611834, 13835357, 28894072, 60234843, 125363062, 260512857, 540599156, 1120345175, 2318984050, 4794555477, 9902285680, 20430920787, 42114540398
Offset: 1

Views

Author

Abdullahi Umar, Feb 28 2013

Keywords

Examples

			a(3) = 8 because there are exactly 8 order-preserving or order-reversing full contraction mappings (of a 3-chain) with exactly 1 fixed point, namely: (111), (112), (222), (233), (333), (321), (322), (221).
		

Crossrefs

Formula

a(n) = A221878(n,1).
a(n) = A059570(n) + A221876(n,1) - n.
G.f.: x*(1-3*x+5*x^2-3*x^3-3*x^4+x^5)/((1+x)*(1-3*x+2*x^2)^2). [Bruno Berselli, Mar 01 2013]
a(n) = -n+(2^(n-1)*(21*n+34)-8*(-1)^n)/36 for n>1, a(1)=1. [Bruno Berselli, Mar 01 2013]

Extensions

More terms from Bruno Berselli, Mar 01 2013

A102301 a(n) = ((3*n + 1)*2^(n+3) + 9 + (-1)^n)/18.

Original entry on oeis.org

1, 4, 13, 36, 93, 228, 541, 1252, 2845, 6372, 14109, 30948, 67357, 145636, 313117, 669924, 1427229, 3029220, 6407965, 13514980, 28428061, 59652324, 124897053, 260978916, 544327453, 1133394148, 2356266781, 4891490532, 10140895005, 20997617892, 43426891549
Offset: 0

Views

Author

Creighton Dement, Feb 20 2005

Keywords

Comments

A floretion-generated sequence resulting from particular transform of A000975.
Floretion Algebra Multiplication Program, FAMP Code: 2jesforseq[ + .5'i + 'kk' + .5'jk' ], 1vesforseq(n) = A000975(n+2)*(-1)^(n+1), ForType: 1A, LoopType: tes (2nd iteration)

Crossrefs

Programs

  • Magma
    [((3*n+1)*2^(n+3)+9+(-1)^n)/18: n in [0..40]]; // Vincenzo Librandi, Nov 21 2018
  • Mathematica
    Table[((3n+1)*2^(n+3) + 9 + (-1)^n)/18, {n,0,50}] (* G. C. Greubel, Sep 27 2017 *)
    LinearRecurrence[{4, -3, -4, 4}, {1, 4, 13, 36}, 50] (* Vincenzo Librandi, Nov 21 2018 *)
  • PARI
    a(n)=((3*n+1)*2^(n+3)+9+(-1)^n)/18 \\ Charles R Greathouse IV, Oct 16 2015
    

Formula

G.f.: 1/((1-x^2)*(1-2*x)^2).
a(n+1) - 2*a(n) = A000975(n+2) (n-th number without consecutive equal binary digits)
a(n) + a(n+1) = A000337(n+2);
a(n+1) - a(n) = A045883(n+2);
a(n+2) - a(n) = A001787(n+3) ( Number of edges in n-dimensional hypercube );
a(n+2) - 2*a(n+1) + a(n) = A059570(n+3);
Convolution of "Number of fixed points in all 231-avoiding involutions in S_n" (A059570) with the natural numbers (A000027), treating the result as if offset=0. - Graeme McRae, Jul 12 2006
Equals triangle A059260 * A008574 as a vector, where A008574 = [1, 4, 8, 12, 16, 20, ...]. - Gary W. Adamson, Mar 06 2012

A137241 Number triples (k,3-k,2-2k), concatenated for k=0, 1, 2, 3,...

Original entry on oeis.org

0, 3, 2, 1, 2, 0, 2, 1, -2, 3, 0, -4, 4, -1, -6, 5, -2, -8, 6, -3, -10, 7, -4, -12, 8, -5, -14, 9, -6, -16, 10, -7, -18, 11, -8, -20, 12, -9, -22, 13, -10, -24, 14, -11, -26, 15, -12, -28, 16, -13, -30, 17, -14, -32, 18, -15, -34, 19, -16, -36, 20, -17, -38, 21, -18, -40
Offset: 0

Views

Author

Paul Curtz, Mar 09 2008

Keywords

Comments

The entries are the coefficients in a family of Jacobsthal recurrences: a(n)=k*a(n-1)+(3-k)*a(n-2)+(2-2k)*a(n-3).
Examples for k=0 are in A001045 and A113954. Examples for k=1 are A001045, A078008.
Examples for k=2 are A000975, A087288, A084639, A000012 and A001045.
Examples for k=3 are A045883, A059570. Examples for k=4 are A094705 and A015518.

Examples

			The triples (k,3-k,2-2k) are (0,3,2), (1,2,0), (2,1,-2), (3,0,-4),...
		

Programs

  • Mathematica
    CoefficientList[Series[x*(3 + 2*x + x^2 - 4*x^3 - 4*x^4)/((x - 1)^2*(1 + x + x^2)^2), {x, 0, 50}], x] (* G. C. Greubel, Sep 28 2017 *)
    Table[{n,3-n,2-2n},{n,0,30}]//Flatten (* or *) LinearRecurrence[ {0,0,2,0,0,-1},{0,3,2,1,2,0},100] (* Harvey P. Dale, Jun 23 2019 *)
  • PARI
    x='x+O('x^50); Vec(x*(3+2*x+x^2-4*x^3-4*x^4)/((x-1)^2*(1+x +x^2 )^2)) \\ G. C. Greubel, Sep 28 2017

Formula

From R. J. Mathar, Feb 25 2009: (Start)
a(n) = 2*a(n-3) - a(n-6).
G.f.: x*(3+2*x+x^2-4*x^3-4*x^4)/((x-1)^2*(1+x+x^2)^2). (End)

Extensions

Edited by R. J. Mathar, Jun 28 2008

A225084 Triangle read by rows: T(n,k) is the number of compositions of n with maximal up-step k; n>=1, 0<=k

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 5, 2, 1, 0, 7, 6, 2, 1, 0, 11, 12, 6, 2, 1, 0, 15, 26, 14, 6, 2, 1, 0, 22, 50, 33, 14, 6, 2, 1, 0, 30, 97, 72, 34, 14, 6, 2, 1, 0, 42, 180, 156, 77, 34, 14, 6, 2, 1, 0, 56, 332, 328, 173, 78, 34, 14, 6, 2, 1, 0, 77, 600, 681, 378, 177, 78, 34, 14, 6, 2, 1, 0, 101, 1078, 1393, 818, 393, 178, 78, 34, 14, 6, 2, 1, 0
Offset: 1

Views

Author

Joerg Arndt, Apr 27 2013

Keywords

Comments

T(n,k) is the number of compositions [p(1), p(2), ..., p(k)] of n such that max(p(j) - p(j-1)) == k.
The first column is A000041 (partition numbers).
Sum of first and second column is A003116.
Sum of the first three columns is A224959.
The second columns deviates from A054454 after the term 600.
Row sums are A011782.

Examples

			Triangle starts:
01: 1,
02: 2, 0,
03: 3, 1, 0,
04: 5, 2, 1, 0,
05: 7, 6, 2, 1, 0,
06: 11, 12, 6, 2, 1, 0,
07: 15, 26, 14, 6, 2, 1, 0,
08: 22, 50, 33, 14, 6, 2, 1, 0,
09: 30, 97, 72, 34, 14, 6, 2, 1, 0,
10: 42, 180, 156, 77, 34, 14, 6, 2, 1, 0,
11: 56, 332, 328, 173, 78, 34, 14, 6, 2, 1, 0,
12: 77, 600, 681, 378, 177, 78, 34, 14, 6, 2, 1, 0,
13: 101, 1078, 1393, 818, 393, 178, 78, 34, 14, 6, 2, 1, 0,
14: 135, 1917, 2821, 1746, 863, 397, 178, 78, 34, 14, 6, 2, 1, 0,
15: 176, 3393, 5660, 3695, 1872, 877, 398, 178, 78, 34, 14, 6, 2, 1, 0,
...
The fifth row corresponds to the following statistics:
#:  M   composition
01:  0  [ 1 1 1 1 1 ]
02:  1  [ 1 1 1 2 ]
03:  1  [ 1 1 2 1 ]
04:  2  [ 1 1 3 ]
05:  1  [ 1 2 1 1 ]
06:  1  [ 1 2 2 ]
07:  2  [ 1 3 1 ]
08:  3  [ 1 4 ]
09:  0  [ 2 1 1 1 ]
10:  1  [ 2 1 2 ]
11:  0  [ 2 2 1 ]
12:  1  [ 2 3 ]
13:  0  [ 3 1 1 ]
14:  0  [ 3 2 ]
15:  0  [ 4 1 ]
16:  0  [ 5 ]
There are 7 compositions with no up-step (M=0), 6 with M=1, 2 with M=2, and 1 with M=3.
		

Crossrefs

Cf. A225085 (partial sums of rows).
T(2n,n) gives A059570.

Programs

  • Maple
    b:= proc(n, v) option remember; `if`(n=0, 1, add((p->
          `if`(i seq(coeff(b(n, 0), x, i), i=0..n-1):
    seq(T(n), n=1..14);  # Alois P. Heinz, Feb 22 2014
  • Mathematica
    b[n_, v_] := b[n, v] = If[n == 0, 1, Sum[Function[{p}, If[iJean-François Alcover, Feb 18 2015, after Alois P. Heinz *)

A269336 T(n,k)=Number of nXk arrays containing k copies of 0..n-1 avoiding the pattern equal-up in every row and column.

Original entry on oeis.org

1, 1, 2, 1, 6, 6, 1, 14, 74, 24, 1, 34, 852, 1880, 120, 1, 78, 10210, 152922, 80316, 720, 1, 178, 124466, 13745475, 62038644, 5141864, 5040, 1, 398, 1539739, 1301306034, 55575194220, 47286888510, 458608016, 40320, 1, 882, 19271229, 128342085219
Offset: 1

Views

Author

R. H. Hardin, Feb 24 2016

Keywords

Comments

Table starts
.....1.........1...........1...........1..............1............1........1
.....2.........6..........14..........34.............78..........178......398
.....6........74.........852.......10210.........124466......1539739.19271229
....24......1880......152922....13745475.....1301306034.128342085219
...120.....80316....62038644.55575194220.54180777470296
...720...5141864.47286888510
..5040.458608016
.40320

Examples

			Some solutions for n=3 k=4
..1..2..0..0. .1..2..1..2. .0..1..2..1. .2..1..0..0. .1..2..1..2
..0..1..2..1. .0..2..0..0. .0..2..1..0. .2..0..1..2. .0..2..0..1
..1..2..2..0. .2..0..1..1. .0..2..2..1. .1..0..1..2. .0..1..2..0
		

Crossrefs

Column 1 is A000142.
Row 2 is A059570(n+1).

A119473 Triangle read by rows: T(n,k) is number of binary words of length n and having k runs of 0's of odd length, 0 <= k <= ceiling(n/2). (A run of 0's is a subsequence of consecutive 0's of maximal length.)

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 1, 5, 8, 3, 8, 15, 8, 1, 13, 28, 19, 4, 21, 51, 42, 13, 1, 34, 92, 89, 36, 5, 55, 164, 182, 91, 19, 1, 89, 290, 363, 216, 60, 6, 144, 509, 709, 489, 170, 26, 1, 233, 888, 1362, 1068, 446, 92, 7, 377, 1541, 2580, 2266, 1105, 288, 34, 1, 610, 2662, 4830
Offset: 0

Views

Author

Emeric Deutsch, May 22 2006

Keywords

Comments

Row n has 1+ceiling(n/2) terms.
T(n,0) = Fibonacci(n+1) = A000045(n+1).
T(n,1) = A029907(n).
Sum_{k>=0} k*T(n,k) = A059570(n).
Triangle, with zeros included, given by (1,1,-1,0,0,0,0,0,0,0,...) DELTA (1,-1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 07 2011
T(n,k) is the number of compositions of n+1 that have exactly k even parts. - Geoffrey Critzer, Mar 03 2012

Examples

			T(5,2)=8 because we have 00010, 01000, 01011, 01101, 01110, 10101, 10110 and 11010.
T(5,2)=8 because there are 8 compositions of 6 that have 2 even parts: 4+2, 2+4, 2+2+1+1, 2+1+2+1, 2+1+1+2, 1+2+2+1, 1+2+1+2, 1+1+2+2. - _Geoffrey Critzer_, Mar 03 2012
Triangle starts:
  1;
  1,  1;
  2,  2;
  3,  4,  1;
  5,  8,  3;
  8, 15,  8,  1;
From _Philippe Deléham_, Dec 07 2011: (Start)
Triangle (1,1,-1,0,0,0...) DELTA (1,-1,0,0,0,...) begins:
   1;
   1,  1;
   2,  2,  0;
   3,  4,  1,  0;
   5,  8,  3,  0,  0;
   8, 15,  8,  1,  0,  0;
  13, 28, 19,  4,  0,  0,  0;
  21, 51, 42, 13,  1,  0,  0,  0;
  34, 92, 89, 36,  5,  0,  0,  0,  0; ... (End)
		

References

  • I. Goulden and D. Jackson, Combinatorial Enumeration, John Wiley and Sons, 1983, page 54.

Crossrefs

Programs

  • Maple
    G:=(1+t*z)/(1-z-z^2-t*z^2): Gser:=simplify(series(G,z=0,18)): P[0]:=1: for n from 1 to 14 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 14 do seq(coeff(P[n],t,j),j=0..ceil(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; local j; if n=0 then 1
          else []; for j to n do zip((x, y)->x+y, %,
          [`if`(irem(j, 2)=0, 0, NULL), b(n-j)], 0) od; %[] fi
        end:
    T:= n-> b(n+1):
    seq(T(n), n=0..14);  # Alois P. Heinz, May 23 2013
  • Mathematica
    f[list_] := Select[list, # > 0 &]; nn = 15; a = (x + y x^2)/(1 - x^2); Map[f, Drop[CoefficientList[Series[1/(1 - a), {x, 0, nn}], {x, y}], 1]] // Flatten  (* Geoffrey Critzer, Mar 03 2012 *)

Formula

G.f.: (1+t*z)/(1-z-z^2-t*z^2).
G.f. of column k (k>=1): z^(2*k-1)*(1-z^2)/(1-z-z^2)^(k+1).
T(n,k) = T(n-1,k) + T(n-2,k) + T(n-2,k-1). - Philippe Deléham, Dec 07 2011
Sum_{k=0..n} T(n,k)*x^k = A000045(n+1), A000079(n), A105476(n+1), A159612(n+1), A189732(n+1) for x = 0, 1, 2, 3, 4 respectively. - Philippe Deléham, Dec 07 2011
G.f.: (1+x*y)*T(0)/2, where T(k) = 1 + 1/(1 - (2*k+1+ x*(1+y))*x/((2*k+2+ x*(1+y))*x + 1/T(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Nov 06 2013

A140960 a(n) = (2*(-1)^n - 2^(n+1) + 3*n*2^n)/9.

Original entry on oeis.org

0, 0, 2, 6, 18, 46, 114, 270, 626, 1422, 3186, 7054, 15474, 33678, 72818, 156558, 334962, 713614, 1514610, 3203982, 6757490, 14214030, 29826162, 62448526, 130489458, 272163726, 566697074, 1178133390, 2445745266, 5070447502, 10498808946, 21713445774, 44858547314
Offset: 0

Views

Author

Paul Curtz, Jul 26 2008

Keywords

Comments

Specify that a triangle has T(n,0) = T(n,n) = A001045(n), and T(r,c) = T(r-1,c-1) + T(r-1,c). The sum of the terms in the first n rows is a(n+1). - J. M. Bergot, May 21 2013
a(n) is the difference between the total number of runs of equal parts in the compositions of n+1, and the compositions of n+1. - Gregory L. Simay, May 04 2017

Programs

  • Magma
    [( 2*(-1)^n-2^(n+1)+3*n*2^n)/9: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
    
  • Mathematica
    LinearRecurrence[{3,0,-4},{0,0,2},40] (* Harvey P. Dale, Apr 14 2015 *)
  • PARI
    a(n)=(2*(-1)^n-2^(n+1)+3*n*2^n)/9 \\ Charles R Greathouse IV, Oct 16 2015

Formula

a(n+1) - 2*a(n) = A078008(n+1) = 2*A001045(n).
G.f.: 2*x^2/((1+x)*(1-2*x)^2).
a(n) = 2*A045883(n-1).
a(n) = 3*a(n-1) - 4*a(n-3), n > 2.
a(n) = A059570(n+1) - A011782(n+1). - Gregory L. Simay, May 04 2017

Extensions

Definition replaced with Lava's closed form of August 2008 by R. J. Mathar, Feb 11 2010

A269479 T(n,k)=Number of nXk arrays containing k copies of 0..n-1 avoiding the pattern down-up in every row and equal-up in every column.

Original entry on oeis.org

1, 1, 2, 1, 6, 4, 1, 14, 54, 8, 1, 34, 574, 600, 16, 1, 78, 6404, 36028, 9102, 32, 1, 178, 72110, 2316638, 3572724, 188472, 64, 1, 398, 816583, 154086724, 1572704377, 548242672, 5118012, 128, 1, 882, 9323584, 10654939686
Offset: 1

Views

Author

R. H. Hardin, Feb 27 2016

Keywords

Comments

Table starts
...1.......1.........1..........1.........1...........1.......1...1.1
...2.......6........14.........34........78.........178.....398.882
...4......54.......574.......6404.....72110......816583.9323584
...8.....600.....36028....2316638.154086724.10654939686
..16....9102...3572724.1572704377
..32..188472.548242672
..64.5118012
.128

Examples

			Some solutions for n=3 k=4
..0..1..2..2. .2..1..1..0. .0..1..0..1. .0..2..1..1. .2..1..0..0
..2..1..1..1. .1..2..2..1. .0..2..0..2. .1..2..2..0. .2..1..0..1
..0..2..0..0. .0..2..0..0. .1..2..1..2. .0..1..2..0. .0..2..1..2
		

Crossrefs

Column 1 is A000079(n-1).
Row 2 is A059570(n+1).

A084219 Inverse binomial transform of A053088.

Original entry on oeis.org

1, -1, 4, -8, 20, -44, 100, -220, 484, -1052, 2276, -4892, 10468, -22300, 47332, -100124, 211172, -444188, 932068, -1951516, 4077796, -8505116, 17709284, -36816668, 76429540, -158451484, 328087780, -678545180, 1401829604
Offset: 0

Views

Author

Paul Barry, May 20 2003

Keywords

Comments

Contribution from Gary W. Adamson, Jan 05 2009: (Start)
Unsigned, starting with offset 1: generated from iterates of M * [1,1,1,...]
where M = a tridiagonal matrix with [0,1,1,1,...] as the main diagonal,
[1,1,1,...] as the uperdiagonal and [2,0,0,0,...] as the subdiagonal. (End)
Define a triangle via T(n,0) = T(n,n) = A001045(n) and T(r,c) = T(r-1,c-1) + T(r-1,c). The row sums of the triangle are s(n) = 0, 2, 4, 12, ... = 2*A059570(n), and their first differences are s(n+1)-s(n) = 2*|a(n)|. J. M. Bergot, May 15 2013

Programs

  • Mathematica
    LinearRecurrence[{-3,0,4},{1,-1,4},30] (* Harvey P. Dale, Dec 16 2016 *)

Formula

a(n) = (4 - 3*n*(-2)^(n-1) + 5*(-2)^n)/9.
a(n) = (1/4) + Sum_{k=0..n} (-2)^k*(k+3)/4.
G.f.: (1+x)^2/((1-x)(1+2x)^2).
Previous Showing 11-20 of 28 results. Next