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 35 results. Next

A068921 Number of ways to tile a 2 X n room with 1 X 2 Tatami mats. At most 3 Tatami mats may meet at a point.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 41, 60, 88, 129, 189, 277, 406, 595, 872, 1278, 1873, 2745, 4023, 5896, 8641, 12664, 18560, 27201, 39865, 58425, 85626, 125491, 183916, 269542, 395033, 578949, 848491, 1243524, 1822473, 2670964, 3914488, 5736961
Offset: 0

Views

Author

Dean Hickerson, Mar 11 2002

Keywords

Crossrefs

Cf. A068927 for incongruent tilings, A068920 for more info.
Cf. A000930, A078012, first column of A272471.

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 1}, {1, 1, 2}, 42] (* Robert G. Wilson v, Jul 12 2014 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+x^2)/(1-x-x^3)) \\ G. C. Greubel, Apr 26 2017

Formula

For n >= 3, a(n) = a(n-1) + a(n-3).
a(n) = A000930(n+1).
From Frank Ruskey, Jun 07 2009: (Start)
G.f.: (1+x^2)/(1-x-x^3).
a(n) = Sum_{j=0..floor(n/2)} binomial(n-2j+1, j). (End)
G.f.: Q(0)*( 1+x^2 )/2, where Q(k) = 1 + 1/(1 - x*(4*k+1 + x^2)/( x*(4*k+3 + x^2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013

A353401 Number of integer compositions of n with all prime run-lengths.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 4, 3, 6, 9, 10, 18, 27, 35, 54, 83, 107, 176, 242, 354, 515, 774, 1070, 1648, 2332, 3429, 4984, 7326, 10521, 15591, 22517, 32908, 48048, 70044, 101903, 149081, 216973, 316289, 461959, 672664, 981356, 1431256, 2086901, 3041577, 4439226, 6467735
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(0) = 1 through a(9) = 9 compositions (empty column indicated by dot, 0 is the empty composition):
  0   .  11   111   22   11111   33     11122     44       333
                                 222    22111     1133     11133
                                 1122   1111111   3311     33111
                                 2211             11222    111222
                                                  22211    222111
                                                  112211   1111122
                                                           1112211
                                                           1122111
                                                           2211111
		

Crossrefs

The case of runs equal to 2 is A003242 aerated.
The <= 1 version is A003242 ranked by A333489.
The version for parts instead of run-lengths is A023360, both A353429.
The version for partitions is A055923.
The > 1 version is A114901, ranked by A353427.
The <= 2 version is A128695, matching A335464.
The > 2 version is A353400, partitions A100405.
Words with all distinct run-lengths: A032020, A044813, A098859, A130091, A329739, A351013, A351017.
A005811 counts runs in binary expansion.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A167606 counts compositions with adjacent parts coprime.
A329738 counts uniform compositions, partitions A047966.

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(n=0, 1, add(`if`(i<>h, add(
         `if`(isprime(j), b(n-i*j, i), 0), j=2..n/i), 0), i=1..n/2))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 18 2022
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[Length/@Split[#],_?(!PrimeQ[#]&)]&]],{n,0,15}]

Extensions

a(21)-a(45) from Alois P. Heinz, May 18 2022

A306351 Number of ways to split an n-cycle into connected subgraphs all having at least 4 vertices.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 5, 10, 16, 23, 35, 53, 78, 111, 157, 222, 313, 438, 610, 848, 1178, 1634, 2263, 3131, 4330, 5986, 8272, 11427, 15782, 21794, 30093, 41548, 57359, 79183, 109307, 150887, 208279, 287496, 396838, 547761, 756077, 1043611, 1440488, 1988289
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Examples

			The a(7) = 1 through a(9) = 10 partitions:
  {{1234567}}  {{12345678}}    {{123456789}}
               {{1234}{5678}}  {{1234}{56789}}
               {{1238}{4567}}  {{12345}{6789}}
               {{1278}{3456}}  {{12349}{5678}}
               {{1678}{2345}}  {{12389}{4567}}
                               {{1239}{45678}}
                               {{12789}{3456}}
                               {{1289}{34567}}
                               {{16789}{2345}}
                               {{1789}{23456}}
		

Crossrefs

Programs

  • Mathematica
    cycedsprop[n_,k_]:=Union[Sort/@Join@@Table[1+Mod[Range[i,j]-1,n],{i,n},{j,i+k,n+i-1}]];
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[cycedsprop[n,3],Range[n]]],{n,15}]

Formula

G.f.: (2*x^9-3*x^8+x^3-3*x^2+3*x-1)/((x^4+x-1)*(x-1)^2). - Alois P. Heinz, Feb 10 2019

Extensions

More terms from Alois P. Heinz, Feb 10 2019

A339101 Number of compositions (ordered partitions) of n into distinct parts >= 3.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 3, 3, 5, 5, 7, 13, 15, 21, 29, 35, 43, 79, 87, 123, 161, 221, 259, 349, 531, 645, 857, 1115, 1471, 1903, 2403, 2979, 4493, 5357, 7135, 9013, 11919, 14925, 19685, 23939, 30667, 42679, 52215, 67035, 86009, 109541, 137923, 177493, 222027, 277749
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 23 2020

Keywords

Examples

			a(7) = 3 because we have [7], [4, 3] and [3, 4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`((i-2)*(i+3)/2 b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    nmax = 50; CoefficientList[Series[Sum[k! x^(k (k + 5)/2)/Product[1 - x^j, {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} k! * x^(k*(k + 5)/2) / Product_{j=1..k} (1 - x^j).

A144898 Expansion of x/((1-x-x^3)*(1-x)^4).

Original entry on oeis.org

0, 1, 5, 15, 36, 76, 147, 267, 463, 775, 1262, 2011, 3150, 4867, 7438, 11268, 16951, 25358, 37766, 56047, 82945, 122482, 180553, 265798, 390880, 574358, 843432, 1237966, 1816384, 2664311, 3907237, 5729077, 8399372, 12313154, 18049371, 26456513, 38778103
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2008

Keywords

Crossrefs

Programs

  • Magma
    A144898:= func< n | n eq 0 select 0 else (&+[Binomial(n-2*j+3, j+4): j in [0..Floor((n+3)/3)]]) >;
    [A144898(n): n in [0..40]]; // G. C. Greubel, Jul 27 2022
    
  • Maple
    a:= n-> (Matrix(7, (i, j)-> if i=j-1 then 1 elif j=1 then [5, -10, 11, -9, 7, -4, 1][i] else 0 fi)^n)[1, 2]: seq(a(n), n=0..40);
  • Mathematica
    CoefficientList[Series[ x/((1-x-x^3)(1-x)^4), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 06 2013 *)
  • SageMath
    def A144898(n): return sum(binomial(n-2*j+3, j+4) for j in (0..((n+3)//3)))
    [A144898(n) for n in (0..40)] # G. C. Greubel, Jul 27 2022

Formula

G.f.: x/((1-x-x^3)*(1-x)^4).
From G. C. Greubel, Jul 27 2022: (Start)
a(n) = Sum_{j=0..floor((n+3)/3)} binomial(n-2*j+3, j+4).
a(n) = A099567(n+3, 4). (End)

A144899 Expansion of x/((1-x-x^3)*(1-x)^5).

Original entry on oeis.org

0, 1, 6, 21, 57, 133, 280, 547, 1010, 1785, 3047, 5058, 8208, 13075, 20513, 31781, 48732, 74090, 111856, 167903, 250848, 373330, 553883, 819681, 1210561, 1784919, 2628351, 3866317, 5682701, 8347012, 12254249, 17983326, 26382698, 38695852, 56745223, 83201736
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2008

Keywords

Crossrefs

Programs

  • Magma
    A144899:= func< n | n eq 0 select 0 else (&+[Binomial(n-2*j+4, j+5): j in [0..Floor((n+4)/3)]]) >;
    [A144899(n): n in [0..40]]; // G. C. Greubel, Jul 27 2022
    
  • Maple
    a:= n-> (Matrix(8, (i, j)-> if i=j-1 then 1 elif j=1 then [6, -15, 21, -20, 16, -11, 5, -1][i] else 0 fi)^n)[1, 2]: seq(a(n), n=0..40);
  • Mathematica
    CoefficientList[Series[x/((1-x-x^3)(1-x)^5), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 06 2013 *)
  • SageMath
    def A144899(n): return sum(binomial(n-2*j+4, j+5) for j in (0..((n+4)//3)))
    [A144899(n) for n in (0..40)] # G. C. Greubel, Jul 27 2022

Formula

G.f.: x/((1-x-x^3)*(1-x)^5).
From G. C. Greubel, Jul 27 2022: (Start)
a(n) = Sum_{j=0..floor((n+4)/3)} binomial(n-2*j+4, j+5).
a(n) = A099567(n+4, 5). (End)

A226405 Expansion of x/((1-x-x^3)*(1-x)^3).

Original entry on oeis.org

0, 1, 4, 10, 21, 40, 71, 120, 196, 312, 487, 749, 1139, 1717, 2571, 3830, 5683, 8407, 12408, 18281, 26898, 39537, 58071, 85245, 125082, 183478, 269074, 394534, 578418, 847927, 1242926, 1821840, 2670295, 3913782, 5736217, 8407142, 12321590, 18058510, 26466393
Offset: 0

Views

Author

Alois P. Heinz, Jun 06 2013

Keywords

Comments

From Bruno Berselli, Jun 07 2013: (Start)
A050228(n) = a(n) -a(n-1), n>0.
A077868(n-1)= a(n) -2*a(n-1) +a(n-2), n>1.
A000217(n) = a(n) -a(n-1) -a(n-3), n>2.
A000930(n-1)= a(n) -3*a(n-1) +3*a(n-2) -a(n-3), n>2.
n = a(n) -2*a(n-1) +a(n-2) -a(n-3) +a(n-4), n>3.
1 = a(n) -3*a(n-1) +3*a(n-2) -2*a(n-3) +2*a(n-4) -a(n-5), n>4.
0 = a(n) -4*a(n-1) +6*a(n-2) -5*a(n-3) +4*a(n-4) -3*a(n-5) +a(n-6), n>5.
(End)

Crossrefs

Programs

  • Magma
    A226405:= func< n | n eq 0 select 0 else (&+[Binomial(n-2*j+2, j+3): j in [0..Floor((n+2)/3)]]) >;
    [A226405(n): n in [0..40]]; // G. C. Greubel, Jul 27 2022
    
  • Maple
    a:= n-> (Matrix(6, (i, j)-> if i=j-1 then 1 elif j=1 then [4, -6, 5, -4, 3, -1][i] else 0 fi)^n)[1, 2]: seq(a(n), n=0..40);
  • Mathematica
    LinearRecurrence[{4,-6,5,-4,3,-1}, {0,1,4,10,21,40}, 40]  (* Bruno Berselli, Jun 07 2013 *)
    CoefficientList[Series[x/((1-x-x^3)*(1-x)^3), {x, 0, 50}], x] (* G. C. Greubel, Apr 28 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec(x/((1-x-x^3)*(1-x)^3)) \\ G. C. Greubel, Apr 28 2017
    
  • SageMath
    def A226405(n): return sum(binomial(n-2*j+2, j+3) for j in (0..((n+2)//3)))
    [A226405(n) for n in (0..40)] # G. C. Greubel, Jul 27 2022

Formula

G.f.: x/((1-x-x^3)*(1-x)^3).
From G. C. Greubel, Jul 27 2022: (Start)
a(n) = Sum_{j=0..floor((n+2)/3)} binomial(n-2*j+2, j+3).
a(n) = A099567(n+2, 3). (End)

A141539 Square array A(n,k) of numbers of length n binary words with at least k "0" between any two "1" digits (n,k >= 0), read by antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 3, 8, 1, 2, 3, 5, 16, 1, 2, 3, 4, 8, 32, 1, 2, 3, 4, 6, 13, 64, 1, 2, 3, 4, 5, 9, 21, 128, 1, 2, 3, 4, 5, 7, 13, 34, 256, 1, 2, 3, 4, 5, 6, 10, 19, 55, 512, 1, 2, 3, 4, 5, 6, 8, 14, 28, 89, 1024, 1, 2, 3, 4, 5, 6, 7, 11, 19, 41, 144, 2048, 1, 2, 3, 4, 5, 6, 7, 9, 15, 26, 60, 233, 4096
Offset: 0

Views

Author

Alois P. Heinz, Aug 15 2008

Keywords

Comments

A(n,k+1) = A(n,k) - A143291(n,k).
From Gary W. Adamson, Dec 19 2009: (Start)
Alternative method generated from variants of an infinite lower triangle T(n) = A000012 = (1; 1,1; 1,1,1; ...) such that T(n) has the leftmost column shifted up n times. Then take lim_{k->infinity} T(n)^k, obtaining a left-shifted vector considered as rows of an array (deleting the first 1) as follows:
1, 2, 4, 8, 16, 32, 64, 128, 256, ... = powers of 2
1, 1, 2, 3, 5, 8, 13, 21, 34, ... = Fibonacci numbers
1, 1, 1, 2, 3, 4, 6, 9, 13, ... = A000930
1, 1, 1, 1, 2, 3, 4, 5, 7, ... = A003269
... with the next rows A003520, A005708, A005709, ... such that beginning with the Fibonacci row, the succession of rows are recursive sequences generated from a(n) = a(n-1) + a(n-2); a(n) = a(n-1) + a(n-3), ... a(n) = a(n-1) + a(n-k); k = 2,3,4,... Last, columns going up from the topmost 1 become rows of triangle A141539. (End)

Examples

			A(4,2) = 6, because 6 binary words of length 4 have at least 2 "0" between any two "1" digits: 0000, 0001, 0010, 0100, 1000, 1001.
Square array A(n,k) begins:
    1,  1,  1,  1,  1,  1,  1,  1, ...
    2,  2,  2,  2,  2,  2,  2,  2, ...
    4,  3,  3,  3,  3,  3,  3,  3, ...
    8,  5,  4,  4,  4,  4,  4,  4, ...
   16,  8,  6,  5,  5,  5,  5,  5, ...
   32, 13,  9,  7,  6,  6,  6,  6, ...
   64, 21, 13, 10,  8,  7,  7,  7, ...
  128, 34, 19, 14, 11,  9,  8,  8, ...
		

Crossrefs

Cf. column k=0: A000079, k=1: A000045(n+2), k=2: A000930(n+2), A068921, A078012(n+5), k=3: A003269(n+4), A017898(n+7), k=4: A003520(n+4), A017899(n+9), k=5: A005708(n+5), A017900(n+11), k=6: A005709(n+6), A017901(n+13), k=7: A005710(n+7), A017902(n+15), k=8: A005711(n+7), A017903(n+17), k=9: A017904(n+19), k=10: A017905(n+21), k=11: A017906(n+23), k=12: A017907(n+25), k=13: A017908(n+27), k=14: A017909(n+29).
Main diagonal gives A000027(n+1).
A(2n,n) gives A000217(n+1)
A(3n,n) gives A008778.
A(3n,2n) gives A034856(n+1).
A(2n,3n) gives A005408.
A(2^n-1,n) gives A376697.
See also A143291.

Programs

  • Maple
    A:= proc(n, k) option remember;
          if k=0 then 2^n
        elif n<=k and n>=0 then n+1
        elif n>0 then A(n-1, k) +A(n-k-1, k)
        else          A(n+1+k, k) -A(n+k, k)
          fi
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..15);
  • Mathematica
    a[n_, k_] := a[n, k] = Which[k == 0, 2^n, n <= k && n >= 0, n+1, n > 0, a[n-1, k] + a[n-k-1, k], True, a[n+1+k, k] - a[n+k, k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 15}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

Formula

G.f. of column k: x^(-k)/(1-x-x^(k+1)).
A(n,k) = 2^n if k=0, otherwise A(n,k) = n+1 if n<=k, otherwise A(n,k) = A(n-1,k) + A(n-k-1,k).

A353428 Number of integer compositions of n with all parts and all run-lengths > 2.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 1, 0, 2, 0, 2, 4, 0, 0, 8, 3, 0, 10, 4, 4, 15, 4, 8, 24, 7, 8, 42, 16, 10, 59, 31, 27, 87, 37, 52, 149, 62, 66, 233, 121, 111, 342, 207, 204, 531, 308, 351, 864, 487, 536, 1373, 864, 865, 2057, 1440, 1509, 3232
Offset: 0

Views

Author

Gus Wiseman, May 16 2022

Keywords

Examples

			The a(n) compositions for selected n:
  n=16:   n=18:     n=20:    n=21:      n=24:
----------------------------------------------------
  (4444)  (666)     (5555)   (777)      (888)
          (333333)  (44444)  (333444)   (6666)
                             (444333)   (333555)
                             (3333333)  (444444)
                                        (555333)
                                        (3333444)
                                        (4443333)
                                        (33333333)
		

Crossrefs

Allowing any multiplicities gives A078012, partitions A008483.
The version for no (instead of all) parts or run-lengths > 2 is A137200.
Allowing any parts gives A353400, partitions A100405.
The version for partitions is A353501, ranked by A353502.
The version for > 1 instead of > 2 is A353508, partitions A339222.
A003242 counts anti-run compositions, ranked by A333489.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A114901 counts compositions with no runs of length 1, ranked by A353427.
A128695 counts compositions with no run-lengths > 2.
A261983 counts non-anti-run compositions.
A335464 counts compositions with a run-length > 2.

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(n=0, 1, add(
         `if`(i=h, 0, add(b(n-i*j, i), j=3..n/i)), i=3..n/3))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, May 18 2022
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[#,1|2]&&!MemberQ[Length/@Split[#],1|2]&]],{n,0,15}]

Extensions

a(26)-a(66) from Alois P. Heinz, May 17 2022

A107458 Expansion of g.f.: (1-x^2-x^3)/( (1+x)*(1-x-x^3) ).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 1, 1, 2, 2, 4, 5, 8, 11, 17, 24, 36, 52, 77, 112, 165, 241, 354, 518, 760, 1113, 1632, 2391, 3505, 5136, 7528, 11032, 16169, 23696, 34729, 50897, 74594, 109322, 160220, 234813, 344136, 504355, 739169, 1083304, 1587660, 2326828, 3410133, 4997792, 7324621
Offset: 0

Views

Author

N. J. A. Sloane, Mar 08 2008

Keywords

Comments

The sequence can be interpreted as the top-left entry of the n-th power of a 4 X 4 (0,1) matrix. There are 12 different choices (out of 2^16) for that (0,1) matrix. - R. J. Mathar, Mar 19 2014

Crossrefs

Programs

  • GAP
    a:=[1,0,0,0];; for n in [5..50] do a[n]:=a[n-2]+a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 03 2020
  • Haskell
    a107458 n = a107458_list !! n
    a107458_list = 1 : 0 : 0 : 0 : zipWith (+) a107458_list
       (zipWith (+) (tail a107458_list) (drop 2 a107458_list))
    -- Reinhard Zumkeller, Mar 23 2012
    
  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!(1-x^2-x^3)/( (1+x)*(1-x-x^3))); // Marius A. Burtea, Jan 02 2020
    
  • Maple
    seq(coeff(series( (1-x^2-x^3)/( (1+x)*(1-x-x^3) ), x, n+1), x, n), n = 0..50); # G. C. Greubel, Jan 03 2020
  • Mathematica
    CoefficientList[Series[(1-x^2-x^3)/(1-x^2-x^3-x^4),{x,0,50}],x] (* or *) LinearRecurrence[{0,1,1,1},{1,0,0,0},50] (* Harvey P. Dale, Jun 20 2011 *)
  • PARI
    my(x='x+O('x^50)); Vec((1-x^2-x^3)/((1+x)*(1-x-x^3))) \\ G. C. Greubel, Apr 27 2017
    
  • Sage
    def A107458_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x^2-x^3)/((1+x)*(1-x-x^3)) ).list()
    A107458_list(50) # G. C. Greubel, Jan 03 2020
    

Formula

a(n) = a(n-2) + a(n-3) + a(n-4); a(0)=1, a(1)=0, a(2)=0, a(3)=0. - Harvey P. Dale, Jun 20 2011
a(n) + a(n-1) = A000930(n-4). - R. J. Mathar, Mar 19 2014
Previous Showing 11-20 of 35 results. Next