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

A277733 Positions of 1's in A277731.

Original entry on oeis.org

2, 4, 7, 9, 13, 15, 18, 20, 24, 26, 28, 31, 33, 37, 39, 42, 44, 48, 50, 52, 55, 57, 60, 62, 66, 68, 71, 73, 77, 79, 81, 84, 86, 90, 92, 95, 97, 101, 103, 105, 108, 110, 113, 115, 119, 121, 124, 126, 130, 132, 135, 137, 141, 143, 145, 148, 150, 154, 156, 159, 161, 165, 167, 169, 172, 174, 177, 179
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2016

Keywords

Comments

{A277732, A277733, A277734} forms a three-way partition of the positive integers, similar to {A003144, A003145, A003146}.

Crossrefs

Programs

  • Maple
    See A277732.
  • Mathematica
    m = 1000; (* number of terms of A277731 *)
    S[1] = {0};
    S[n_] := S[n] = SubstitutionSystem[{0 -> {0, 1}, 1 -> {0, 1, 2}, 2 -> {0}}, S[n - 1]];
    For[n = 2, True, n++, If[PadRight[S[n], m] == PadRight[S[n - 1], m], Print["n = ", n]; Break[]]];
    A277731 = Take[S[n], m];
    Position[A277731, 1] // Flatten (* Jean-François Alcover, Mar 20 2023 *)

A277734 Positions of 2's in A277731.

Original entry on oeis.org

5, 10, 16, 21, 29, 34, 40, 45, 53, 58, 63, 69, 74, 82, 87, 93, 98, 106, 111, 116, 122, 127, 133, 138, 146, 151, 157, 162, 170, 175, 180, 186, 191, 199, 204, 210, 215, 223, 228, 233, 239, 244, 250, 255, 263, 268, 274, 279, 287, 292, 298, 303, 311, 316, 321, 327, 332, 340, 345, 351, 356, 364, 369, 374
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2016

Keywords

Comments

{A277732, A277733, A277734} forms a three-way partition of the positive integers, similar to {A003144, A003145, A003146}.

Crossrefs

Programs

  • Maple
    See A277732.
  • Mathematica
    m = 1000; (* number of terms of A277731 *)
    S[1] = {0};
    S[n_] := S[n] = SubstitutionSystem[{0 -> {0, 1}, 1 -> {0, 1, 2}, 2 -> {0}}, S[n - 1]];
    For[n = 2, True, n++, If[PadRight[S[n], m] == PadRight[S[n - 1], m], Print["n = ", n]; Break[]]];
    A277731 = Take[S[n], m];
    Position[A277731, 2] // Flatten (* Jean-François Alcover, Mar 20 2023 *)

A114188 Riordan array (1/(1-x),x(1+x)/(1-x)^2).

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 9, 7, 1, 1, 16, 26, 10, 1, 1, 25, 70, 52, 13, 1, 1, 36, 155, 190, 87, 16, 1, 1, 49, 301, 553, 403, 131, 19, 1, 1, 64, 532, 1372, 1462, 736, 184, 22, 1, 1, 81, 876, 3024, 4446, 3206, 1216, 246, 25, 1, 1, 100, 1365, 6084, 11826, 11584, 6190, 1870, 317
Offset: 0

Views

Author

Paul Barry, Nov 16 2005

Keywords

Comments

Product of A007318 and A113953, that is, (1/(1-x),x/(1-x))*(1,x(1+2x)).
Row sums are A025192. Diagonal sums are A052980.
Inverse is A114189. A signed version is A110511.

Examples

			Triangle begins
1;
1, 1;
1, 4, 1;
1, 9, 7, 1;
1, 16, 26, 10, 1;
1, 25, 70, 52, 13, 1;
1, 36,155,190, 87, 16, 1;
		

Crossrefs

Formula

T(n, k) = Sum_{j=0..n} C(n, j)*C(k, j-k)2^(j-k).
T(n, k) = Sum_{j=0..n-k} C(k, j)*C(n+k-j, 2k).
T(n,k) = 2*T(n-1,k)+T(n-1,k-1)-T(n-2,k)+T(n-2,k-1), T(0,0)=T(1,0)=T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 11 2014
G.f.: 1/(1-y-x*(1+y)/(1-y)). - Vladimir Kruchinin, Apr 21 2015

A329185 Number of ways to tile a 2 X n grid with dominoes and L-trominoes such that no four tiles meet at a corner.

Original entry on oeis.org

1, 1, 2, 5, 10, 22, 49, 105, 227, 494, 1071, 2322, 5038, 10927, 23699, 51405, 111498, 241837, 524546, 1137742, 2467761, 5352577, 11609747, 25181550, 54618807, 118468250, 256957750, 557341615, 1208874523, 2622050045, 5687229162, 12335605733, 26755941146
Offset: 0

Views

Author

Peter Kagey, Nov 07 2019

Keywords

Comments

a(n) <= A052980(n).

Examples

			For n=3, the five tilings are:
+---+---+---+  +---+---+---+
|   |   |   |  |   |       |
+   +   +   +  +   +---+---+
|   |   |   |  |   |       |
+---+---+---+, +---+---+---+,
+---+---+---+  +---+---+---+
|       |   |  |   |       |
+---+---+   +  +   +---+   +
|       |   |  |       |   |
+---+---+---+, +---+---+---+, and
+---+---+---+
|       |   |
+   +---+   +
|   |       |
+---+---+---+.
For n=4, the only tiling counted by A052980(4) that is not counted by a(4) is
+---+---+---+---+
|       |       |
+---+---+---+---+
|       |       |
+---+---+---+---+.
		

Crossrefs

A052980 is the analogous problem without the "four corners" restriction.

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 3, -1, 2}, {1, 1, 2, 5, 10}, 50] (* Paolo Xausa, Apr 08 2024 *)
  • PARI
    Vec((1 - x)*(1 + x^2) / (1 - 2*x + x^2 - 3*x^3 + x^4 - 2*x^5) + O(x^30)) \\ Colin Barker, Nov 12 2019

Formula

a(n) = 2*a(n-1) - a(n-2) + 3*a(n-3) - a(n-4) + 2*a(n-5), with a(0) = a(1) = 1, a(2) = 2, a(3) = 5, and a(4) = 10.
G.f.: (1 - x)*(1 + x^2) / (1 - 2*x + x^2 - 3*x^3 + x^4 - 2*x^5). - Colin Barker, Nov 12 2019

A332647 a(n) = 2*a(n-1) + a(n-3) with a(0) = 3, a(1) = 2, a(2) = 4.

Original entry on oeis.org

3, 2, 4, 11, 24, 52, 115, 254, 560, 1235, 2724, 6008, 13251, 29226, 64460, 142171, 313568, 691596, 1525363, 3364294, 7420184, 16365731, 36095756, 79611696, 175589123, 387274002, 854159700, 1883908523, 4155091048, 9164341796, 20212592115, 44580275278, 98324892352
Offset: 0

Views

Author

Greg Dresden, Feb 18 2020

Keywords

Comments

a(n) is the number of ways to tile a bracelet of length n with black trominos, and black or white squares.

Crossrefs

Cf. A008998, A052980. Equals one more than A080204.

Programs

  • Magma
    a:=[3,2,4]; [n le 3 select a[n] else 2*Self(n-1)+Self(n-3):n in [1..33]]; // Marius A. Burtea, Feb 18 2020
    
  • Mathematica
    LinearRecurrence[{2, 0, 1}, {3, 2, 4}, 50]
  • PARI
    Vec((3 - 4*x) / (1 - 2*x - x^3) + O(x^30)) \\ Colin Barker, Feb 18 2020
    
  • PARI
    polsym(x^3-2*x^2-1, 44) \\ Joerg Arndt, May 28 2020

Formula

a(n) = 2*a(n-1) + a(n-3).
a(n) = w1^n + w2^n + w3^n where w1,w2,w3 are the three roots of x^3-2x^2-1=0.
For n>2, a(n) = round(w1^n) for w1 the single real root of x^3-2x^2-1=0.
G.f.: (3 - 4*x) / (1 - 2*x - x^3). - Colin Barker, Feb 18 2020
a(n) = A008998(n) + 2*A008998(n-3) = 3*A008998(n) - 4*A008998(n-1).
a(n) = (5*b(n) - b(n-1) - b(n-2))/2 where b(n) = A052980(n). - Greg Dresden, Mar 10 2020
a(n) = A080204(n) + 1. - Greg Dresden, May 27 2020

A346054 Number of ways to tile a 3 X n strip with dominoes and L-shaped 5-minoes.

Original entry on oeis.org

1, 0, 3, 8, 13, 52, 119, 308, 873, 2184, 5867, 15552, 40581, 107836, 283871, 748076, 1976545, 5208784, 13743315, 36260088, 95627773, 252289476, 665499975, 1755466916, 4630903129, 12215645848, 32223689915, 85003275440, 224228961909, 591494654412, 1560303157679
Offset: 0

Views

Author

Greg Dresden and Ziyao Geng, Jul 02 2021

Keywords

Examples

			Here are two such tilings for a 3 X 3 strip; each has four rotations thus demonstrating that a(3)=8.
  ._____.  ._____.
  | | | |  | |___|
  | |_|_|  | |___|
  |_____|  |_____|
For a 3 X 4 strip, here are three of the possible a(4)=13 tilings.
  ._______.  ._______.  ._______.
  | |___  |  |  ___| |  |___|___|
  | |___| |  | |___| |  | |___| |
  |_____|_|  |_|_____|  |_|___|_|
For a 3 X 5 strip, here are three of the possible a(5)=52 tilings.
  ._________.  ._________.  ._________.
  | | |___| |  |  ___|___|  | |___|___|
  | |_|___|_|  | | |___| |  | |___|___|
  |_____|___|  |_|_|___|_|  |_____|___|
		

Crossrefs

Cf. A052980.

Programs

  • Magma
    I:=[1,0,3,8]; [n le 4 select I[n] else Self(n-1) +3*Self(n-2) +5*Self(n-3) -4*Self(n-4): n in [1..50]]; // G. C. Greubel, Dec 01 2022
    
  • Mathematica
    LinearRecurrence[{1, 3, 5, -4}, {1, 0, 3, 8}, 50];
  • SageMath
    @CachedFunction
    def a(n): # a = A346054
        if (n<4): return (1,0,3,8)[n]
        else: return a(n-1) + 3*a(n-2) + 5*a(n-3) - 4*a(n-4)
    [a(n) for n in range(51)] # G. C. Greubel, Dec 01 2022

Formula

a(n) = a(n-1) + 3*a(n-2) + 5*a(n-3) - 4*a(n-4).
G.f.: (1 - x)/(1 - x - 3*x^2 - 5*x^3 + 4*x^4).

Extensions

Corrected by Greg Dresden, Sep 04 2021

A180752 Half the number of nX3 binary arrays with each element equal to at least two neighbors.

Original entry on oeis.org

0, 1, 1, 2, 3, 7, 14, 31, 67, 148, 325, 717, 1580, 3485, 7685, 16950, 37383, 82451, 181850, 401083, 884615, 1951080, 4303241, 9491097, 20933272, 46169785, 101830665, 224594602, 495358987, 1092548639, 2409691878, 5314742743
Offset: 1

Views

Author

R. H. Hardin Sep 20 2010

Keywords

Comments

Column 3 of A180760

Formula

Empirical: a(n) = 2*a(n-1) + a(n-2) - a(n-3) - a(n-5).
Empirical: G.f.: -x^2*(-1+x+x^3+x^2) / ( (x-1)*(1+x)*(x^3+2*x-1) ). a(n)-a(n-2) = A052980(n-3). - R. J. Mathar, Mar 24 2018

A190512 Number of one-sided n-step prudent walks, avoiding single west step only, i.e., two or more consecutive west steps are permitted.

Original entry on oeis.org

1, 2, 5, 11, 24, 53, 117, 258, 569, 1255, 2768, 6105, 13465, 29698, 65501, 144467, 318632, 702765, 1549997, 3418626, 7540017, 16630031, 36678688, 80897393, 178424817, 393528322, 867954037, 1914332891, 4222194104, 9312342245, 20539017381, 45300228866
Offset: 0

Views

Author

Shanzhen Gao, May 11 2011

Keywords

Examples

			a(2)=5 since there are 5 such walks: WW, NN, EN, NE, EE.
		

Crossrefs

Cf. A110513 (essentially a signed version).
Cf. A052980 (essentially the same sequence).

Programs

  • PARI
    my(x='x+O('x^35)); Vec((1+x^2)/(1-2*x-x^3)) \\ Michel Marcus, Jun 28 2021

Formula

a(n) = A052980(n+1). - R. J. Mathar, May 16 2011
G.f.: (1+x^2)/(1-2*x-x^3).

A335242 a(n) = 2*a(n-1) + a(n-3) for n >= 4, with initial values a(0) = 1, a(1) = 0, a(2) = 2, and a(3) = 3.

Original entry on oeis.org

1, 0, 2, 3, 6, 14, 31, 68, 150, 331, 730, 1610, 3551, 7832, 17274, 38099, 84030, 185334, 408767, 901564, 1988462, 4385691, 9672946, 21334354, 47054399, 103781744, 228897842, 504850083, 1113481910, 2455861662, 5416573407, 11946628724, 26349119110, 58114811627
Offset: 0

Views

Author

Greg Dresden, May 28 2020

Keywords

Comments

a(n) is the number of ways to tile this 2 X n strip (with one extra square added at the top left) with dominoes and L-shaped trominoes (also called polyominoes):
._
|| _
|||_||| . . .
|||_||| . . .

Examples

			a(2) = 2 thanks to the following two tilings (where the L-shaped trominoes are tiled with X's and the dominoes are left blank):
._            _
|X|_         | |_
|X|X|  and   |_|X|
|_ _|        |X X|
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, 0, 1}, {1, 0, 2, 3}, 40]

Formula

a(n) = 2*a(n-1) + a(n-3) for n >= 4.
a(n) = A008998(n-2) + A052980(n-2) for n >= 2.
G.f.: (2*x^3-2*x^2+2*x-1)/(x^3+2*x-1).

A100691 Number of self-avoiding paths with n steps on a triangular lattice in the strip Z x {0,1}.

Original entry on oeis.org

1, 4, 12, 30, 70, 158, 352, 780, 1724, 3806, 8398, 18526, 40864, 90132, 198796, 438462, 967062, 2132926, 4704320, 10375708, 22884348, 50473022, 111321758, 245527870, 541528768, 1194379300, 2634286476, 5810101726, 12814582758
Offset: 0

Views

Author

Emeric Deutsch, Dec 07 2004

Keywords

References

  • J. Labelle, Paths in the Cartesian, triangular and hexagonal lattices, Bulletin of the ICA, 17, 1996, 47-61.

Programs

  • Maple
    g:=series((1+z^2)*(1+z+z^2)/(1-z)/(1-2*z-z^3),z=0,35): 1,seq(coeff(g,z^n), n=1..34);

Formula

G.f.: (1+z^2)(1+z+z^2)/[(1-z)(1-2z-z^3)]= 1+2*(2+z^2)/((z-1)*(z^2+2*z-1)).
a(n) = 2*a(n-1) + a(n-3) + 6 for n >= 4.
a(n) = A008998(n+2) - A052980(n+1) - 3. - Ralf Stephan, May 15 2007
Conjecture: a(n) = A193641(n+2)-3, n>0 - R. J. Mathar, Jul 22 2022
Previous Showing 11-20 of 23 results. Next