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

A283572 T(n,k) = Number of n X k 0..1 arrays with no 1 equal to more than one of its horizontal, diagonal and antidiagonal neighbors, with the exception of exactly one element.

Original entry on oeis.org

0, 0, 0, 1, 4, 0, 2, 26, 16, 0, 5, 72, 169, 68, 0, 12, 282, 674, 1108, 256, 0, 26, 908, 4313, 6812, 6453, 924, 0, 56, 2832, 21186, 67892, 60802, 36038, 3232, 0, 118, 8856, 104464, 509952, 945100, 528436, 194173, 11044, 0, 244, 26750, 513458, 3890056, 10919674
Offset: 1

Views

Author

R. H. Hardin, Mar 11 2017

Keywords

Comments

Table starts
.0......0........1..........2............5.............12...............26
.0......4.......26.........72..........282............908.............2832
.0.....16......169........674.........4313..........21186...........104464
.0.....68.....1108.......6812........67892.........509952..........3890056
.0....256.....6453......60802.......945100.......10919674........129527524
.0....924....36038.....528436.....12699250......226897932.......4173039716
.0...3232...194173....4441052....164714523.....4558585174.....129997769458
.0..11044..1021432...36589848...2089140956....89724600000....3965206666608
.0..37104..5275885..296555892..26034179747..1736716820366..118919078661476
.0.122984.26869458.2373574616.320066184088.33188681249924.3520469545329364

Examples

			Some solutions for n=4, k=4
..1..1..0..0. .1..1..0..0. .0..0..0..0. .0..1..0..0. .0..0..1..0
..1..0..0..1. .0..0..0..1. .1..1..0..0. .1..0..0..0. .0..1..1..0
..0..0..1..0. .0..1..0..1. .1..0..1..0. .0..0..1..1. .1..0..0..0
..0..0..0..0. .0..1..1..0. .0..0..1..0. .1..0..0..1. .0..0..1..1
		

Crossrefs

Column 2 is A283036.
Row 1 is A073778(n-1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = 4*a(n-1) +2*a(n-2) -12*a(n-3) -11*a(n-4) +4*a(n-5) +6*a(n-6) -a(n-8)
k=3: [order 12]
k=4: [order 16]
k=5: [order 42]
k=6: [order 54]
Empirical for row n:
n=1: a(n) = 2*a(n-1) +a(n-2) -3*a(n-4) -2*a(n-5) -a(n-6)
n=2: a(n) = 2*a(n-1) +5*a(n-2) +2*a(n-3) -17*a(n-4) -24*a(n-5) -16*a(n-6)
n=3: [order 12]
n=4: [order 16]
n=5: [order 42]
n=6: [order 64]

A282791 T(n,k)=Number of nXk 0..1 arrays with no 1 equal to more than one of its king-move neighbors, with the exception of exactly one element.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 8, 8, 2, 5, 16, 73, 16, 5, 12, 72, 318, 318, 72, 12, 26, 240, 1747, 1952, 1747, 240, 26, 56, 736, 8216, 16584, 16584, 8216, 736, 56, 118, 2352, 38027, 119176, 208559, 119176, 38027, 2352, 118, 244, 7128, 173722, 832218, 2207352, 2207352
Offset: 1

Views

Author

R. H. Hardin, Feb 21 2017

Keywords

Comments

Table starts
...0.....0.......1.........2...........5............12..............26
...0.....0.......8........16..........72...........240.............736
...1.....8......73.......318........1747..........8216...........38027
...2....16.....318......1952.......16584........119176..........832218
...5....72....1747.....16584......208559.......2207352........22998587
..12...240....8216....119176.....2207352......34974844.......545174028
..26...736...38027....832218....22998587.....545174028.....12713143876
..56..2352..173722...5780340...236744562....8385651160....292288389872
.118..7128..773529..39020884..2372235577..125782952202...6555156469894
.244.21424.3412416.260919192.23556868268.1869100531456.145619095090322

Examples

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

Crossrefs

Column 1 is A073778(n-1).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -3*a(n-4) -2*a(n-5) -a(n-6)
k=2: a(n) = 2*a(n-1) +5*a(n-2) +2*a(n-3) -17*a(n-4) -24*a(n-5) -16*a(n-6)
k=3: [order 12]
k=4: [order 18]
k=5: [order 42]
k=6: [order 60]

A282885 T(n,k)=Number of nXk 0..1 arrays with no 1 equal to more than one of its horizontal, vertical and antidiagonal neighbors, with the exception of exactly one element.

Original entry on oeis.org

0, 0, 0, 1, 2, 1, 2, 8, 8, 2, 5, 32, 74, 32, 5, 12, 122, 430, 430, 122, 12, 26, 416, 2426, 3762, 2426, 416, 26, 56, 1414, 13062, 34314, 34314, 13062, 1414, 56, 118, 4626, 67676, 286920, 480995, 286920, 67676, 4626, 118, 244, 14930, 342972, 2342046, 6296324
Offset: 1

Views

Author

R. H. Hardin, Feb 24 2017

Keywords

Comments

Table starts
...0.....0.......1..........2............5.............12...............26
...0.....2.......8.........32..........122............416.............1414
...1.....8......74........430.........2426..........13062............67676
...2....32.....430.......3762........34314.........286920..........2342046
...5...122....2426......34314.......480995........6296324.........80114311
..12...416...13062.....286920......6296324......128768496.......2561487246
..26..1414...67676....2342046.....80114311.....2561487246......79687436788
..56..4626..342972...18668994....995928444....49811090624....2422749969094
.118.14930.1707597..146171090..12166597450...951678283294...72384911847530
.244.47432.8384136.1129426388.146641882796.17942875499666.2134206947210504

Examples

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

Crossrefs

Column 1 is A073778(n-1).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -3*a(n-4) -2*a(n-5) -a(n-6)
k=2: [order 10]
k=3: [order 22]
k=4: [order 42]
k=5: [order 86]

A283042 T(n,k)=Number of nXk 0..1 arrays with no 1 equal to more than one of its horizontal and vertical neighbors, with the exception of exactly one element.

Original entry on oeis.org

0, 0, 0, 1, 4, 1, 2, 16, 16, 2, 5, 68, 119, 68, 5, 12, 256, 818, 818, 256, 12, 26, 924, 5065, 9152, 5065, 924, 26, 56, 3232, 30378, 94368, 94368, 30378, 3232, 56, 118, 11044, 175963, 931844, 1604067, 931844, 175963, 11044, 118, 244, 37104, 997302, 8912378
Offset: 1

Views

Author

R. H. Hardin, Feb 27 2017

Keywords

Comments

Table starts
...0......0........1..........2.............5..............12................26
...0......4.......16.........68...........256.............924..............3232
...1.....16......119........818..........5065...........30378............175963
...2.....68......818.......9152.........94368..........931844...........8912378
...5....256.....5065......94368.......1604067........26180826.........414085368
..12....924....30378.....931844......26180826.......706205768.......18455711930
..26...3232...175963....8912378.....414085368.....18455711930......797350288363
..56..11044...997302...83420984....6406597648....471954803540....33705434438284
.118..37104..5559013..767704036...97480211225..11868995624930..1401215705047092
.244.122984.30578068.6973000128.1463896864692.294610925837548.57496998569457406

Examples

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

Crossrefs

Column 1 is A073778(n-1).

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1) +a(n-2) -3*a(n-4) -2*a(n-5) -a(n-6)
k=2: a(n) = 4*a(n-1) +2*a(n-2) -12*a(n-3) -11*a(n-4) +4*a(n-5) +6*a(n-6) -a(n-8)
k=3: [order 18]
k=4: [order 30]
k=5: [order 72]

A118390 Triangle read by rows: T(n,k) is the number of binary sequences of length n containing k subsequences 000 (n, k >= 0).

Original entry on oeis.org

1, 2, 4, 7, 1, 13, 2, 1, 24, 5, 2, 1, 44, 12, 5, 2, 1, 81, 26, 13, 5, 2, 1, 149, 56, 29, 14, 5, 2, 1, 274, 118, 65, 32, 15, 5, 2, 1, 504, 244, 143, 74, 35, 16, 5, 2, 1, 927, 499, 307, 169, 83, 38, 17, 5, 2, 1, 1705, 1010, 652, 374, 196, 92, 41, 18, 5, 2, 1, 3136, 2027, 1369, 819
Offset: 0

Views

Author

Emeric Deutsch, Apr 27 2006

Keywords

Comments

Row n has n-1 terms (n >= 2). Sum of entries in row n is 2^n (A000079). T(n,0) = A000073(n+3) (the tribonacci numbers). T(n,1) = A073778(n-1). Sum_{k=0..n-1} k*T(n,k) = (n-2)*2^(n-3) (A001787).

Examples

			T(6,2) = 5 because we have 000010, 000011, 010000, 100001 and 110000.
Triangle starts:
   1;
   2;
   4;
   7,  1;
  13,  2,  1;
  24,  5,  2,  1;
  44, 12,  5,  2,  1;
  81, 26, 13,  5,  2,  1;
		

Crossrefs

Programs

  • Maple
    G:=(1+(1-t)*z+(1-t)*z^2)/(1-(1+t)*z-(1-t)*z^2-(1-t)*z^3): Gser:=simplify(series(G,z=0,32)): P[0]:=1: for n from 1 to 13 do P[n]:=coeff(Gser,z^n) od: P[0]; P[1]; for n from 2 to 13 do seq(coeff(P[n],t,k),k=0..n-2) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, t) option remember; `if`(n=0, 1,
          expand(b(n-1, min(2, t+1))*`if`(t>1, x, 1))+b(n-1, 0))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Sep 17 2019
  • Mathematica
    nn=15;a=x^2/(1-y x)+x;b=1/(1-x);f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[b (1+a)/(1-a x/(1-x)) ,{x,0,nn}],{x,y}]]//Grid  (* Geoffrey Critzer, Nov 18 2012 *)

Formula

G.f.: G(t,z) = (1 + (1-t)z + (1-t)z^2)/(1 - (1+t)z - (1-t)z^2 - (1-t)z^3). Recurrence relation: T(n,k) = T(n-1,k) + T(n-2,k) + T(n-3,k) + T(n-1,k-1) - T(n-2,k-1) - T(n-3,k-1) for n >= 3.

A118885 Number of binary sequences of length n containing exactly one subsequence 0011.

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 12, 32, 78, 180, 400, 864, 1827, 3800, 7800, 15840, 31884, 63704, 126480, 249760, 490885, 960828, 1873828, 3642560, 7060314, 13649196, 26324704, 50662464, 97309767, 186571248, 357119472, 682524224, 1302589016, 2482706544
Offset: 0

Views

Author

Emeric Deutsch, May 03 2006

Keywords

Comments

Column 1 of A118884.

Examples

			a(5)=4 because we have 00110,00111,00011 and 10011.
		

Crossrefs

Cf. A118884.

Programs

  • Maple
    g:=z^4/(1-2*z+z^4)^2: gser:=series(g,z=0,40): seq(coeff(gser,z,n),n=0..36);

Formula

G.f. x^4 / ( (x-1)^2*(x^3+x^2+x-1)^2 ).
a(n) -2*a(n-1) + a(n-2) = A073778(n). - R. J. Mathar, Jul 26 2022

A275445 Sum of the asymmetry degrees of all compositions of n with parts in {1,2,3}.

Original entry on oeis.org

0, 0, 0, 2, 4, 10, 22, 50, 106, 222, 458, 936, 1890, 3788, 7540, 14924, 29388, 57620, 112540, 219062, 425112, 822726, 1588314, 3059470, 5881254, 11284514, 21614774, 41336300, 78936358, 150533496, 286708744, 545428024, 1036468344, 1967555208, 3731449176, 7070218506, 13384916364, 25319020898, 47857031870, 90391975562, 170614347714
Offset: 0

Views

Author

Emeric Deutsch, Aug 17 2016

Keywords

Comments

The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the asymmetry degree of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
A sequence is palindromic if and only if its asymmetry degree is 0.

Examples

			a(4) = 4 because the compositions of 4 with parts in {1,2,3} are 13, 31, 22, 211, 121, 112, and 1111 and the sum of their asymmetry degrees is 1 + 1 + 0 + 1 + 0 + 1 + 0 = 4.
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.

Crossrefs

Cf. A275444.

Programs

  • Maple
    g := 2*z^3*(1+z+z^2)/((1+z)*(1+z^2)*(1-z-z^2-z^3)^2): gser := series(g, z = 0, 45): seq(coeff(gser, z, n), n = 0 .. 40);
  • Mathematica
    Table[Total@ Map[Total, Map[Map[Boole[# >= 1] &, BitXor[Take[# - 1, Ceiling[Length[#]/2]], ReverseTake[# - 1, -Ceiling[Length[#]/2]]]] &, Flatten[Map[Permutations, DeleteCases[IntegerPartitions@ n, {a_, _} /; a > 3]], 1]]], {n, 0, 24}] // Flatten (* Michael De Vlieger, Aug 17 2016 *)
  • PARI
    concat(vector(3), Vec(2*x^3*(1+x+x^2)/((1+x)*(1+x^2)*(1-x-x^2-x^3)^2) + O(x^50))) \\ Colin Barker, Aug 28 2016

Formula

G.f. g(z) = 2*z^3*(1+z+z^2)/((1+z)*(1+z^2)*(1-z-z^2-z^3)^2). In the more general situation of compositions into a[1]=1} z^(a[j]), we have g(z) = (F(z)^2 - F(z^2))/((1+F(z))*(1-F(z))^2).
a(n) = Sum_{k>=0} k*A275444(n,k).
4*a(n) = (-1)^(n+1) +A057077(n+1) -2*A000073(n) +4*A073778(n+2). - R. J. Mathar, Jan 13 2023

A383477 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where A(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0),(2,0),(3,0),(0,1).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 4, 1, 4, 9, 12, 7, 1, 5, 14, 25, 26, 13, 1, 6, 20, 44, 63, 56, 24, 1, 7, 27, 70, 125, 153, 118, 44, 1, 8, 35, 104, 220, 336, 359, 244, 81, 1, 9, 44, 147, 357, 646, 864, 819, 499, 149, 1, 10, 54, 200, 546, 1134, 1800, 2144, 1830, 1010, 274
Offset: 0

Views

Author

Seiichi Manyama, Apr 28 2025

Keywords

Examples

			Square array A(n,k) begins:
   1,   1,   1,   1,    1,    1,    1, ...
   1,   2,   3,   4,    5,    6,    7, ...
   2,   5,   9,  14,   20,   27,   35, ...
   4,  12,  25,  44,   70,  104,  147, ...
   7,  26,  63, 125,  220,  357,  546, ...
  13,  56, 153, 336,  646, 1134, 1862, ...
  24, 118, 359, 864, 1800, 3395, 5950, ...
		

Crossrefs

Column k=0..2 give A000073(n+2), A073778(n+4), A292326(n-1).
Main diagonal gives A383478.

Programs

  • PARI
    a(n, k) = my(x='x+O('x^(n+1)), y='y+O('y^(k+1))); polcoef(polcoef(1/(1-x-x^2-x^3-y), n), k);

Formula

A(n,k) = A(n-1,k) + A(n-2,k) + A(n-3,k) + A(n,k-1).
G.f.: 1 / (1 - x - x^2 - x^3 - y).
G.f. of column k: 1 / (1 - x - x^2 - x^3)^(k+1).

A383474 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where A(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0),(2,0),(3,0),(0,1),(0,2),(0,3).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 5, 5, 4, 7, 12, 14, 12, 7, 13, 26, 37, 37, 26, 13, 24, 56, 89, 106, 89, 56, 24, 44, 118, 209, 277, 277, 209, 118, 44, 81, 244, 477, 698, 784, 698, 477, 244, 81, 149, 499, 1063, 1700, 2113, 2113, 1700, 1063, 499, 149, 274, 1010, 2329, 4026, 5469, 6040, 5469, 4026, 2329, 1010, 274
Offset: 0

Views

Author

Seiichi Manyama, Apr 27 2025

Keywords

Examples

			Square array A(n,k) begins:
   1,   1,   2,    4,    7,    13,    24, ...
   1,   2,   5,   12,   26,    56,   118, ...
   2,   5,  14,   37,   89,   209,   477, ...
   4,  12,  37,  106,  277,   698,  1700, ...
   7,  26,  89,  277,  784,  2113,  5469, ...
  13,  56, 209,  698, 2113,  6040, 16497, ...
  24, 118, 477, 1700, 5469, 16497, 47332, ...
		

Crossrefs

Column k=0..1 give A000073(n+2), A073778(n+4).
Main diagonal gives A122680.

Programs

  • PARI
    a(n, k) = my(x='x+O('x^(n+1)), y='y+O('y^(k+1))); polcoef(polcoef(1/(1-x-y-x^2-y^2-x^3-y^3), n), k);

Formula

A(n,k) = A(k,n).
A(n,k) = A(n-1,k) + A(n-2,k) + A(n-3,k) + A(n,k-1) + A(n,k-2) + A(n,k-3).
G.f.: 1 / (1 - x - y - x^2 - y^2 - x^3 - y^3).

A365330 Expansion of e.g.f. x^3/(1-x-x^2-x^3)^2.

Original entry on oeis.org

0, 0, 0, 6, 48, 600, 8640, 131040, 2257920, 42819840, 885427200, 19918483200, 483791616000, 12622171161600, 352200296448000, 10466625641472000, 330077933273088000, 11010660024139776000, 387369218691366912000, 14335266857678807040000, 556691771706962411520000
Offset: 0

Views

Author

Enrique Navarrete, Sep 01 2023

Keywords

Comments

a(n) is the number of ways to partition [n] into blocks of size at most 3, order the blocks, order the elements within each block, and choose 3 elements from a block.

Examples

			a(6)=8640 since the ways to partition [6] into blocks of size at most 3, order the blocks, order the elements within each block, and select 3 elements from a block are the following:
  (i) 123,4,5,6: 2880 such orderings, 1 way to choose three elements (from the block with 3 elements), hence 2880 ways;
  (ii) 123,45,6: 4320 such orderings, 1 way to choose three elements (from the block with 3 elements), hence 4320 ways;
  (iii) 123,456: 720 such orderings, 2 ways to choose three elements (from one of the two blocks with 3 elements), hence 1440 ways.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 20}, Range[0, m]! * CoefficientList[Series[x^3/(1 - x - x^2 - x^3)^2, {x, 0, m}], x]] (* Amiram Eldar, Sep 02 2023 *)

Formula

a(n) = A000142(n)*A073778(n+1).
Showing 1-10 of 10 results.