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

A214260 First differences of A052980.

Original entry on oeis.org

0, 1, 3, 6, 13, 29, 64, 141, 311, 686, 1513, 3337, 7360, 16233, 35803, 78966, 174165, 384133, 847232, 1868629, 4121391, 9090014, 20048657, 44218705, 97527424, 215103505, 474425715, 1046378854, 2307861213
Offset: 0

Views

Author

Philippe Deléham, Jul 22 2012

Keywords

Comments

1 -> 123, 2 -> 12, 3 -> 2, starting with 1 gives the sequence: 1, 123, 123122, 1231221231212, ... the n-th term has a(n) digits.
Ternary words of length n-1 with subwords (0,1), (1,1) and (1,2) not allowed. - Olivier Gérard, Aug 28 2012

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,0,1},{0,1,3},30] (* Harvey P. Dale, Sep 04 2017 *)

Formula

Recurrence: a(0) = 0, a(1) = 1, a(2) = 3, a(n+1) = 2*a(n) + a(n-2).
G.f.: x*(1+x)/(1-2*x-x^3).
a(n) = A052980(n) + A052980(n-2) = A052980(n+1) - A052980(n).
a(n+1) = A078061(n)*(-1)^n.
a(0) = 0, a(n) = A008998(n-1) + A008998(n-2) for n>0.
a(n+1) = Sum_{k=0..n} C(n-k, floor(k/2))*2^(n-k-floor(k/2)).

A008998 a(n) = 2*a(n-1) + a(n-3), with a(0)=1 and a(1)=2.

Original entry on oeis.org

1, 2, 4, 9, 20, 44, 97, 214, 472, 1041, 2296, 5064, 11169, 24634, 54332, 119833, 264300, 582932, 1285697, 2835694, 6254320, 13794337, 30424368, 67103056, 148000449, 326425266, 719953588, 1587907625, 3502240516, 7724434620, 17036776865, 37575794246
Offset: 0

Views

Author

Keywords

Comments

A transform of A000079 under the mapping g(x)->(1/(1-x^3))g(x/(1-x^3)). - Paul Barry, Oct 20 2004
The binomial transform yields 1,3,9,..., i.e., A049220 without the leading zeros. - R. J. Mathar, May 15 2008
a(n-3) is the top left entry of the n-th power of the 3 X 3 matrix [0, 0, 1; 1, 1, 1; 0, 1, 1] or of the 3 X 3 matrix [0, 1, 0; 0, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
a(n) equals the number of n-length words on {0,1,2} such that 0 appears only in a run which length is a multiple of 3. - Milan Janjic, Feb 17 2015
a(n) is the number of ways to fill a 1 X n strip of tiles, using only trominos, of length 3, and squares which can be chosen to have one of two possible colors. - Michael Tulskikh, Feb 12 2020
For x the real root of x^3 - 2*x^2 - 1 from A356035, then x^n = a(n-4)*x^2 + a(n-2)*x + a(n-3). - Greg Dresden and Qianhuai He, Jul 01 2025

Crossrefs

Cf. A077852, A077926. Partial sums of A052980.

Programs

  • GAP
    a:=[1,2,4];; for n in [4..40] do a[n]:=2*a[n-1]+a[n-3]; od; a; # G. C. Greubel, Feb 14 2020
  • Magma
    [ n eq 1 select 1 else n eq 2 select 2 else n eq 3 select 4 else 2*Self(n-1)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A008998 := proc(n) option remember; if n <= 2 then 2^n else 2*procname(n-1) +procname(n-3); fi; end proc;
  • Mathematica
    LinearRecurrence[{2, 0, 1}, {1, 2, 4}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
  • PARI
    {a(n)=polcoeff(exp(sum(m=1,n+1,((1+sqrt(1+x+x*O(x^n)))^m + (1-sqrt(1+x+x*O(x^n)))^m)*x^m/m)),n)} /* Paul D. Hanna, Dec 21 2012 */
    
  • Sage
    def A008998_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-2*x-x^3) ).list()
    A008998_list(40) # G. C. Greubel, Feb 14 2020
    

Formula

a(n) = Sum_{k=0..floor(n/3)} binomial(n-2k, k)*2^(n-3k). - Paul Barry, Oct 20 2004
O.g.f.: 1/(1-2*x-x^3). - R. J. Mathar, May 15 2008
O.g.f.: exp( Sum_{n>=1} ( (1 + sqrt(1+x))^n + (1 - sqrt(1+x))^n ) * x^n/n ). - Paul D. Hanna, Dec 21 2012
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 + x^2)/( x*(4*k+4 + x^2) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 30 2013
a(n) = Sum_{k=0..n} A052980(n). - Greg Dresden, May 28 2020

A219987 Number A(n,k) of tilings of a k X n rectangle using dominoes and right trominoes; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 5, 5, 1, 1, 1, 0, 11, 8, 11, 0, 1, 1, 1, 24, 55, 55, 24, 1, 1, 1, 0, 53, 140, 380, 140, 53, 0, 1, 1, 1, 117, 633, 2319, 2319, 633, 117, 1, 1, 1, 0, 258, 1984, 15171, 21272, 15171, 1984, 258, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2012

Keywords

Examples

			A(3,3) = 8, because there are 8 tilings of a 3 X 3 rectangle using dominoes and right trominoes:
  .___._.   .___._.   .___._.   .___._.
  |___| |   |___| |   |___| |   |_. | |
  | ._|_|   | | |_|   | |___|   | |_|_|
  |_|___|   |_|___|   |_|___|   |_|___|
  ._.___.   ._.___.   ._.___.   ._.___.
  | |___|   | | ._|   | |___|   | |___|
  |___| |   |_|_| |   |_|_. |   |_| | |
  |___|_|   |___|_|   |___|_|   |___|_|
Square array A(n,k) begins:
  1,  1,   1,    1,     1,       1,         1,          1, ...
  1,  0,   1,    0,     1,       0,         1,          0, ...
  1,  1,   2,    5,    11,      24,        53,        117, ...
  1,  0,   5,    8,    55,     140,       633,       1984, ...
  1,  1,  11,   55,   380,    2319,     15171,      96139, ...
  1,  0,  24,  140,  2319,   21272,    262191,    2746048, ...
  1,  1,  53,  633, 15171,  262191,   5350806,  100578811, ...
  1,  0, 117, 1984, 96139, 2746048, 100578811, 3238675344, ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000012, A059841, A052980, A165716, A165791, A219988, A219989, A219990, A219991, A219992, A219993.
Main diagonal gives: A219994.

Programs

  • Maple
    b:= proc(n, l) option remember; local k, t;
          if max(l[])>n then 0 elif n=0 or l=[] then 1
        elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
        else for k do if l[k]=0 then break fi od;
             b(n, subsop(k=2, l))+
             `if`(k>1 and l[k-1]=1, b(n, subsop(k=2, k-1=2, l)), 0)+
             `if`(k `if`(n>=k, b(n, [0$k]), b(k, [0$n])):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{k, t}, If[Max[l] > n, 0, If[n == 0 || l == {}, 1, If[Min[l] > 0, t = Min[l]; b[n-t, l-t], For[k = 1, True, k++, If[l[[k]] == 0, Break[]]]; b[n, ReplacePart[l, k -> 2]] + If[k > 1 && l[[k-1]] == 1, b[n, ReplacePart[l, {k -> 2, k-1 -> 2}]], 0] + If[k < Length[l] && l[[k+1]] == 1, b[n, ReplacePart[l, {k -> 2, k+1 -> 2}]], 0] + If[k < Length[l] && l[[k+1]] == 0, b[n, ReplacePart[l, {k -> 1, k+1 -> 1}]] + b[n, ReplacePart[l, {k -> 1, k+1 -> 2}]] + b[n, ReplacePart[l, {k -> 2, k+1 -> 1}]], 0] + If[k+1 < Length[l] && l[[k+1]] == 0 && l[[k+2]] == 0, b[n, ReplacePart[l, {k -> 2, k+1 -> 2, k+2 -> 2}]] + b[n, ReplacePart[l, {k -> 2, k+1 -> 2, k+2 -> 1}]], 0]]]]]; a[n_, k_] := If[n >= k, b[n, Array[0&, k]], b[k, Array[0&, n]]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 05 2013, translated from Alois P. Heinz's Maple program *)
  • Sage
    from sage.combinat.tiling import TilingSolver, Polyomino
    def A(n,k):
        p = Polyomino([(0,0), (0,1)])
        q = Polyomino([(0,0), (0,1), (1,0)])
        T = TilingSolver([p,q], box=[n,k], reusable=True, reflection=True)
        return T.number_of_solutions()
    # Ralf Stephan, May 21 2014

A124182 A skewed version of triangular array A081277.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 0, 3, 4, 0, 0, 1, 8, 8, 0, 0, 0, 5, 20, 16, 0, 0, 0, 1, 18, 48, 32, 0, 0, 0, 0, 7, 56, 112, 64, 0, 0, 0, 0, 1, 32, 160, 256, 128, 0, 0, 0, 0, 0, 9, 120, 432, 576, 256, 0, 0, 0, 0, 0, 1, 50, 400, 1120, 1280, 512
Offset: 0

Views

Author

Philippe Deléham, Dec 05 2006

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1, -1, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, 0, 0, 0, 0, 0, 0, 0,...] where DELTA is the operator defined in A084938. Falling diagonal sums in A052980.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 2;
  0, 0, 3, 4;
  0, 0, 1, 8,  8;
  0, 0, 0, 5, 20, 16;
  0, 0, 0, 1, 18, 48,  32;
  0, 0, 0, 0,  7, 56, 112,  64;
  0, 0, 0, 0,  1, 32, 160, 256,  128;
  0, 0, 0, 0,  0,  9, 120, 432,  576,  256;
  0, 0, 0, 0,  0,  1,  50, 400, 1120, 1280, 512;
		

Crossrefs

Cf. A025192 (column sums). Diagonals include A011782, A001792, A001793, A001794, A006974, A006975, A006976.

Formula

T(0,0)=T(1,1)=1, T(n,k)=0 if n < k or if k < 0, T(n,k) = T(n-2,k-1) + 2*T(n-1,k-1).
Sum_{k=0..n} x^k*T(n,k) = (-1)^n*A090965(n), (-1)^n*A084120(n), (-1)^n*A006012(n), A033999(n), A000007(n), A001333(n), A084059(n) for x = -4, -3, -2, -1, 0, 1, 2 respectively.
Sum_{k=0..floor(n/2)} T(n-k,k) = Fibonacci(n-1) = A000045(n-1).
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A011782(n), A001333(n), A026150(n), A046717(n), A084057(n), A002533(n), A083098(n), A084058(n), A003665(n), A002535(n), A133294(n), A090042(n), A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 respectively. - Philippe Deléham, Dec 26 2007
Sum_{k=0..n} T(n,k)*(-x)^(n-k) = A011782(n), A000012(n), A146559(n), A087455(n), A138230(n), A006495(n), A138229(n) for x= 0,1,2,3,4,5,6 respectively. - Philippe Deléham, Nov 14 2008
G.f.: (1-y*x)/(1-2y*x-y*x^2). - Philippe Deléham, Dec 04 2011
Sum_{k=0..n} T(n,k)^2 = A002002(n) for n > 0. - Philippe Deléham, Dec 04 2011

A201701 Riordan triangle ((1-x)/(1-2*x), x^2/(1-2*x)).

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 4, 3, 0, 0, 8, 8, 1, 0, 0, 16, 20, 5, 0, 0, 0, 32, 48, 18, 1, 0, 0, 0, 64, 112, 56, 7, 0, 0, 0, 0, 128, 256, 160, 32, 1, 0, 0, 0, 0, 256, 576, 432, 120, 9, 0, 0, 0, 0, 0, 512, 1280, 1120, 400, 50, 1, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 03 2011

Keywords

Comments

Triangle T(n,k), read by rows, given by (1,1,0,0,0,0,0,0,0,...) DELTA (0,1,-1,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.
Skewed version of triangle in A200139.
Triangle without zeros: A207537.
For the version with negative odd numbered columns, which is Riordan ((1-x)/(1-2*x), -x^2/(1-2*x)) see comments on A028297 and A039991. - Wolfdieter Lang, Aug 06 2014
This is an example of a stretched Riordan array in the terminology of Section 2 of Corsani et al. - Peter Bala, Jul 14 2015

Examples

			The triangle T(n,k) begins:
  n\k      0     1     2     3     4    5   6  7 8 9 10 11 ...
  0:       1
  1:       1     0
  2:       2     1     0
  3:       4     3     0     0
  4:       8     8     1     0     0
  5:      16    20     5     0     0    0
  6:      32    48    18     1     0    0   0
  7:      64   112    56     7     0    0   0  0
  8:     128   256   160    32     1    0   0  0 0
  9:     256   576   432   120     9    0   0  0 0 0
  10:    512  1280  1120   400    50    1   0  0 0 0  0
  11:   1024  2816  2816  1232   220   11   0  0 0 0  0  0
  ...  reformatted and extended. - _Wolfdieter Lang_, Aug 06 2014
		

Crossrefs

Diagonals sums are in A052980.
Cf. A028297, A081265, A124182, A131577, A039991 (zero-columns deleted, unsigned and zeros appended).
Cf. A028297 (signed version, zeros deleted). Cf. A034839.

Programs

  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[(1 - #)/(1 - 2 #)&, #^2/(1 - 2 #)&, 11] // Flatten (* Jean-François Alcover, Jul 16 2019 *)

Formula

T(n,k) = 2*T(n-1,k) + T(n-2,k-1) with T(0,0) = T(1,0) = 1, T(1,1) = 0 and T(n,k) = 0 for k<0 or for n
Sum_{k=0..n} T(n,k)^2 = A002002(n) for n>0.
Sum_{k=0..n} T(n,k)*x^k = A138229(n), A006495(n), A138230(n), A087455(n), A146559(n), A000012(n), A011782(n), A001333(n), A026150(n), A046717(n), A084057(n), A002533(n), A083098(n), A084058(n), A003665(n), A002535(n), A133294(n), A090042(n), A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = -6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 respectively.
G.f.: (1-x)/(1-2*x-y*x^2). - Philippe Deléham, Mar 03 2012
From Peter Bala, Jul 14 2015: (Start)
Factorizes as A034839 * A007318 = (1/(1 - x), x^2/(1 - x)^2) * (1/(1 - x), x/(1 - x)) as a product of Riordan arrays.
T(n,k) = Sum_{i = k..floor(n/2)} binomial(n,2*i) *binomial(i,k). (End)

Extensions

Name changed, keyword:easy added, crossrefs A028297 and A039991 added, and g.f. corrected by Wolfdieter Lang, Aug 06 2014

A110513 Expansion of (1 + x)/(1 + 2x + x^3).

Original entry on oeis.org

1, -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, -99912799977
Offset: 0

Author

Paul Barry, Jul 24 2005

Keywords

Comments

Diagonal sums of A110511.

Crossrefs

A minor variation of A052980.

Programs

  • Mathematica
    CoefficientList[Series[(1+x)/(1+2x+x^3),{x,0,40}],x] (* or *) LinearRecurrence[ {-2,0,-1},{1,-1,2},40] (* Harvey P. Dale, Jun 27 2012 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+x)/(1+2*x+x^3)) \\ G. C. Greubel, Aug 29 2017

Formula

a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..(n-k)} (-1)^(n-k-j)*C(n-k, j)*(-2)^(j-k)*C(k, j-k).
a(0)=1, a(1)=-1, a(2)=2, a(n) = -2*a(n-1) - a(n-3). - Harvey P. Dale, Jun 27 2012

A205575 Triangle read by rows, related to Pascal's triangle, starting with rows 1; 1,0.

Original entry on oeis.org

1, 1, 0, 2, 2, 1, 3, 5, 4, 1, 5, 12, 14, 8, 2, 8, 25, 38, 32, 15, 3, 13, 50, 94, 104, 71, 28, 5, 21, 96, 215, 293, 260, 149, 51, 8, 34, 180, 468, 756, 822, 612, 304, 92, 13, 55, 331, 980, 1828, 2346, 2136, 1376, 604, 164, 21
Offset: 0

Author

Philippe Deléham, Jan 29 2012

Keywords

Comments

Antidiagonal sums are in A052980, row sums are in A046717.
Similar to A091533 and to A091562. Triangle satisfying the same recurrence as A091533 and A091562, but with the initial values T(0,0) = 1, T(0,1) = 1, T(1,1) = 0.

Examples

			Triangle begins :
1
1, 0
2, 2, 1
3, 5, 4, 1
5, 12, 14, 8, 2
8, 25, 38, 32, 15, 3
13, 50, 94, 104, 71, 28, 5
		

Crossrefs

Cf. Column 0: A000045, Diagonals : A000045, A029907, A036681.
Cf. A090171, A090172, A090173, A090174, A091533, A091562 (same recurrence).

Programs

  • PARI
    T(n,k) = {if(n<0, return(0)); if (n==0, if (k<0, return(0)); if (k==0, return(1))); if (n==1, if (k<0, return(0)); if (k==0, return(1)); if (k==1, return(0))); T(n-1,k)+T(n-1,k-1)+T(n-2,k)+T(n-2,k-1)+T(n-2,k-2);} \\ Michel Marcus, Oct 27 2021

Formula

T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) + T(n-2,k-1) + T(n-2,k-2) for n>=2, k>=0, with initial conditions specified by first two rows. T(0,0) = 1, T(1,0) = 1, T(1,1) = 0.

Extensions

a(46), a(48) corrected by Georg Fischer, Oct 27 2021

A207537 Triangle of coefficients of polynomials u(n,x) jointly generated with A207538; see Formula section.

Original entry on oeis.org

1, 2, 1, 4, 3, 8, 8, 1, 16, 20, 5, 32, 48, 18, 1, 64, 112, 56, 7, 128, 256, 160, 32, 1, 256, 576, 432, 120, 9, 512, 1280, 1120, 400, 50, 1, 1024, 2816, 2816, 1232, 220, 11, 2048, 6144, 6912, 3584, 840, 72, 1, 4096, 13312, 16640, 9984, 2912, 364, 13
Offset: 1

Author

Clark Kimberling, Feb 18 2012

Keywords

Comments

Another version in A201701. - Philippe Deléham, Mar 03 2012
Subtriangle of the triangle given by (1, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 03 2012
Diagonal sums: A052980. - Philippe Deléham, Mar 03 2012

Examples

			First seven rows:
   1;
   2,   1;
   4,   3;
   8,   8,  1;
  16,  20,  5,
  32,  48, 18, 1;
  64, 112, 56, 7;
From _Philippe Deléham_, Mar 03 2012: (Start)
Triangle A201701 begins:
   1;
   1,   0;
   2,   1,  0;
   4,   3,  0, 0;
   8,   8,  1, 0, 0;
  16,  20,  5, 0, 0, 0;
  32,  48, 18, 1, 0, 0, 0;
  64, 112, 56, 7, 0, 0, 0, 0;
  ... (End)
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x]
    v[n_, x_] := u[n - 1, x] + v[n - 1, x]
    Table[Factor[u[n, x]], {n, 1, z}]
    Table[Factor[v[n, x]], {n, 1, z}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A207537, |A028297| *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A207538, |A133156| *)
    (* Prepending 1 and with offset 0: *)
    Tpoly[n_] := HypergeometricPFQ[{-n/2, -n/2 + 1/2}, {1/2}, x + 1];
    Table[CoefficientList[Tpoly[n], x], {n, 0, 12}] // Flatten (* Peter Luschny, Feb 03 2021 *)

Formula

u(n,x) = u(n-1,x) + (x+1)*v(n-1,x), v(n,x) = u(n-1,x) + v(n-1,x), where u(1,x)=1, v(1,x)=1. Also, A207537 = |A028297|.
T(n,k) = 2*T(n-1,k) + T(n-2,k-1). - Philippe Deléham, Mar 03 2012
G.f.: -(1+x*y)*x*y/(-1+2*x+x^2*y). - R. J. Mathar, Aug 11 2015
T(n, k) = [x^k] hypergeom([-n/2, -n/2 + 1/2], [1/2], x + 1) provided offset is set to 0 and 1 prepended. - Peter Luschny, Feb 03 2021

A277731 Fixed point of the morphism 0 -> 01, 1 -> 012, 2 -> 0; starting with a(1) = 0.

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 2
Offset: 1

Author

N. J. A. Sloane, Nov 07 2016

Keywords

Comments

After k = 0,1,2,3,... applications of the morphism we have 0, 01, 01012, 01012010120, ... which have lengths 1, 2, 5, 11, 24, 53, 117, ..., satisfying b(n) = 2*b(n-1) + b(n-3) (cf. A052980).

Crossrefs

Programs

  • Maple
    with(ListTools);
    T:=proc(S) Flatten(subs( {0=[0,1], 1=[0,1,2], 2=[0]}, S)); end;
    S:=[0];
    for n from 1 to 10 do S:=T(S); od:
    S;
  • Mathematica
    m = 100; (* number of terms required *)
    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[]]];
    Take[S[n], m] (* Jean-François Alcover, Mar 20 2023 *)

A277732 Positions of 0's in A277731.

Original entry on oeis.org

1, 3, 6, 8, 11, 12, 14, 17, 19, 22, 23, 25, 27, 30, 32, 35, 36, 38, 41, 43, 46, 47, 49, 51, 54, 56, 59, 61, 64, 65, 67, 70, 72, 75, 76, 78, 80, 83, 85, 88, 89, 91, 94, 96, 99, 100, 102, 104, 107, 109, 112, 114, 117, 118, 120, 123, 125, 128, 129, 131, 134, 136, 139, 140, 142, 144, 147, 149, 152, 153
Offset: 1

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
    with(ListTools);
    T:=proc(S) Flatten(subs( {0=[0,1], 1=[0,1,2], 2=[0]}, S)); end;
    S:=[0];
    for n from 1 to 14 do S:=T(S); od:
    S; # A277731
    p0:=[]: p1:=[]: p2:=[]:
    for i from 1 to nops(S) do
    j:=S[i];
    if j=0 then p0:=[op(p0),i];
    elif j=1 then p1:=[op(p1),i];
    else p2:=[op(p2),i]; fi: od:
    p0; # A277732
    p1; # A277733
    p2; # A277734
  • 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, 0] // Flatten (* Jean-François Alcover, Mar 20 2023 *)
Showing 1-10 of 22 results. Next