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

A006355 Number of binary vectors of length n containing no singletons.

Original entry on oeis.org

1, 0, 2, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634
Offset: 0

Views

Author

David M. Bloom

Keywords

Comments

Number of cvtemplates at n-2 letters given <= 2 consecutive consonants or vowels (n >= 4).
Number of (n,2) Freiman-Wyner sequences.
Diagonal sums of the Riordan array ((1-x+x^2)/(1-x), x/(1-x)), A072405 (where this begins 1,0,1,1,1,1,...). - Paul Barry, May 04 2005
Central terms of the triangle in A094570. - Reinhard Zumkeller, Mar 22 2011
Pisano period lengths: 1, 1, 8, 3, 20, 8, 16, 6, 24, 20, 10, 24, 28, 16, 40, 12, 36, 24, 18, 60, ... . - R. J. Mathar, Aug 10 2012
Also the number of matchings in the (n-2)-pan graph for n >= 5. - Eric W. Weisstein, Oct 03 2017
a(n) is the number of bimultus bitstrings of length n. A bitstring is bimultus if each of its 1's possess at least one neighboring 1 and each of its 0's possess at least one neighboring 0. - Steven Finch, May 26 2020

Examples

			a(6)=10 because we have: 000000, 000011, 000111, 001100, 001111, 110000, 110011, 111000, 111100, 111111. - _Geoffrey Critzer_, Jan 26 2014
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 16, 51.

Crossrefs

Except for initial term, = 2*Fibonacci numbers (A000045).
Essentially the same as A047992, A054886, A055389, A068922, and A090991.
Column 2 in A265584.

Programs

  • Haskell
    a006355 n = a006355_list !! n
    a006355_list = 1 : fib2s where
       fib2s = 0 : map (+ 1) (scanl (+) 1 fib2s)
    -- Reinhard Zumkeller, Mar 20 2013
    
  • Magma
    [1] cat [Lucas(n) - Fibonacci(n): n in [1..50]]; // Vincenzo Librandi, Aug 02 2014
    
  • Maple
    a:= n-> if n=0 then 1 else (Matrix([[2,-2]]). Matrix([[1,1], [1,0]])^n) [1,1] fi: seq(a(n), n=0..38); # Alois P. Heinz, Aug 18 2008
    a := n -> ifelse(n=0, 1, -2*I^n*ChebyshevU(n-2, -I/2)):
    seq(simplify(a(n)), n = 0..38);  # Peter Luschny, Dec 03 2023
  • Mathematica
    Join[{1}, Last[#] - First[#] & /@ Partition[Fibonacci[Range[-1, 40]], 4, 1]] (* Harvey P. Dale, Sep 30 2011 *)
    Join[{1}, LinearRecurrence[{1, 1}, {0, 2}, 38]] (* Jean-François Alcover, Sep 23 2017 *)
    (* Programs from Eric W. Weisstein, Oct 03 2017 *)
    Join[{1}, Table[2 Fibonacci[n], {n, 0, 40}]]
    Join[{1}, 2 Fibonacci[Range[0, 40]]]
    CoefficientList[Series[(1-x+x^2)/(1-x-x^2), {x, 0, 40}], x] (* End *)
  • PARI
    a(n)=if(n,2*fibonacci(n-1),1) \\ Charles R Greathouse IV, Mar 14 2012
    
  • PARI
    my(x='x+O('x^50)); Vec((1-x+x^2)/(1-x-x^2)) \\ Altug Alkan, Nov 01 2015
    
  • SageMath
    def A006355(n): return 2*fibonacci(n-1) - int(n==0)
    print([A006355(n) for n in range(51)]) # G. C. Greubel, Apr 18 2025

Formula

a(n+2) = F(n-1) + F(n+2), for n > 0.
G.f.: (1-x+x^2)/(1-x-x^2). - Paul Barry, May 04 2005
a(n) = A119457(n-1,n-2) for n > 2. - Reinhard Zumkeller, May 20 2006
a(n) = 2*F(n-1) for n > 0, F(n)=A000045(n) and a(0)=1. - Mircea Merca, Jun 28 2012
G.f.: 1 - x + x*Q(0), where Q(k) = 1 + x^2 + (2*k+3)*x - x*(2*k+1 + x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 05 2013
a(n) = A118658(n) - 0^n. - M. F. Hasler, Nov 05 2014
a(n) = 2^(-n)*((1+r)*(1-r)^n - (1-r)*(1+r)^n)/r for n > 0, where r=sqrt(5). - Colin Barker, Jan 28 2017
a(n) = a(n-1) + a(n-2) for n >= 3. - Armend Shabani, Nov 25 2020
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) - sqrt(5)*sinh(sqrt(5)*x/2))/5 - 1. - Stefano Spezia, Apr 18 2022
a(n) = F(n-3) + F(n-2) + F(n-1) for n >= 3, where F(n)=A000045(n). - Gergely Földvári, Aug 03 2024

Extensions

Corrected by T. D. Noe, Oct 31 2006

A128588 Expansion of g.f. x*(1+x+x^2)/(1-x-x^2).

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338
Offset: 1

Views

Author

Gary W. Adamson, Mar 11 2007

Keywords

Comments

Previous name was: A007318 * A128587.
a(n)/a(n-1) tends to phi, 1.618... = A001622.
Regardless of initial two terms, any linearly recurring sequence with signature (1,1) will yield an a(n)/a(n+1) ratio tending to phi (the Golden Ratio). - Harvey P. Dale, Mar 29 2017
Apart from the initial term, double the Fibonacci numbers. O.g.f.: x*(1+x+x^2)/(1-x-x^2). a(n) gives the number of binary strings of length n-1 avoiding the substrings 000 and 111. a(n) also gives the number of binary strings of length n-1 avoiding the substrings 010 and 101. - Peter Bala, Jan 22 2008
Row lengths of triangle A232642. - Reinhard Zumkeller, May 14 2015
a(n) is the number of binary strings of length n-1 avoiding the substrings 000 and 111. - Allan C. Wechsler, Feb 13 2025

Crossrefs

Programs

  • GAP
    Concatenation([1], List([2..40], n-> 2*Fibonacci(n))); # G. C. Greubel, Jul 10 2019
  • Haskell
    a128588 n = a128588_list !! (n-1)
    a128588_list = 1 : cows where
                       cows = 2 : 4 : zipWith (+) cows (tail cows)
    -- Reinhard Zumkeller, May 14 2015
    
  • Magma
    [1] cat [2*Fibonacci(n): n in [2..40]]; // G. C. Greubel, Jul 10 2019
    
  • Maple
    a:= n-> `if`(n<2, n, 2*(<<0|1>, <1|1>>^n)[1,2]):
    seq(a(n), n=1..50);  # Alois P. Heinz, Apr 28 2018
  • Mathematica
    nn=40; a=(1-x^3)/(1-x); b=x*(1-x^2)/(1-x); CoefficientList[Series[a^2 /(1-b^2), {x,0,nn}], x]  (* Geoffrey Critzer, Sep 01 2012 *)
    LinearRecurrence[{1,1}, {1,2,4}, 40] (* Harvey P. Dale, Mar 29 2017 *)
    Join[{1}, 2*Fibonacci[Range[2,40]]] (* G. C. Greubel, Jul 10 2019 *)
  • PARI
    {a(n) = if( n<2, n==1, 2 * fibonacci(n))}; /* Michael Somos, Jul 18 2015 */
    
  • Sage
    [1]+[2*fibonacci(n) for n in (2..40)] # G. C. Greubel, Jul 10 2019
    

Formula

G.f.: x*(1+x+x^2)/(1-x-x^2).
Binomial transform of A128587; a(n+2) = a(n+1) + a(n), n>3.
a(n) = A068922(n-1), n>2. - R. J. Mathar, Jun 14 2008
For n > 1: a(n+1) = a(n) + if a(n) odd then max{a(n),a(n-1)} else min{a(n),a(n-1)}, see also A038754. - Reinhard Zumkeller, Oct 19 2015
E.g.f.: 4*exp(x/2)*sinh(sqrt(5)*x/2)/sqrt(5) - x. - Stefano Spezia, Feb 19 2023

Extensions

New name from Joerg Arndt, Feb 16 2024

A118658 a(n) = 2*F(n-1) = L(n) - F(n), where F(n) and L(n) are Fibonacci and Lucas numbers respectively.

Original entry on oeis.org

2, 0, 2, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338
Offset: 0

Views

Author

Bill Jones (b92057(AT)yahoo.com), May 18 2006

Keywords

Comments

Essentially the same as A006355, A047992, A054886, A055389, A068922, A078642, A090991. - Philippe Deléham, Sep 20 2006 and Georg Fischer, Oct 07 2018
Also the number of matchings in the (n-2)-pan graph. - Eric W. Weisstein, Jun 30 2016
Also the number of maximal independent vertex sets (and minimal vertex covers) in the (n-1)-ladder graph. - Eric W. Weisstein, Jun 30 2017

Crossrefs

Programs

Formula

From Philippe Deléham, Sep 20 2006: (Start)
a(0)=2, a(1)=0; for n > 1, a(n) = a(n-1) + a(n-2).
G.f. (2 - 2*x)/(1 - x - x^2).
a(0)=2 and a(n) = 2*A000045(n-1) for n > 0. (End)
a(n) = A006355(n) + 0^n. - M. F. Hasler, Nov 05 2014
a(n) = Lucas(n-2) + Fibonacci(n-2). - Bruno Berselli, May 27 2015
a(n) = 3*Fibonacci(n-2) + Fibonacci(n-5). - Bruno Berselli, Feb 20 2017
a(n) = 2*A212804(n). - Bruno Berselli, Feb 21 2017
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) - sqrt(5)*sinh(sqrt(5)*x/2))/5. - Stefano Spezia, Apr 18 2022

Extensions

More terms from Philippe Deléham, Sep 20 2006
Corrected by T. D. Noe, Nov 01 2006

A068920 Table of t(r,s) read by antidiagonals: t(r,s) is the number of ways to tile an r X s room with 1 X 2 Tatami mats. At most 3 Tatami mats may meet at a point.

Original entry on oeis.org

0, 1, 1, 0, 2, 0, 1, 3, 3, 1, 0, 4, 0, 4, 0, 1, 6, 4, 4, 6, 1, 0, 9, 0, 2, 0, 9, 0, 1, 13, 6, 3, 3, 6, 13, 1, 0, 19, 0, 3, 0, 3, 0, 19, 0, 1, 28, 10, 3, 2, 2, 3, 10, 28, 1, 0, 41, 0, 5, 0, 2, 0, 5, 0, 41, 0, 1, 60, 16, 5, 2, 2, 2, 2, 5, 16, 60, 1, 0, 88, 0, 6, 0, 1, 0, 1, 0, 6, 0, 88, 0, 1, 129, 26
Offset: 1

Views

Author

Dean Hickerson, Mar 11 2002

Keywords

Comments

Rows 2-6 are given in A068921 - A068925.

Examples

			Table begins:
  0, 1, 0, 1, 0, 1, ...
  1, 2, 3, 4, 6, 9, ...
  0, 3, 0, 4, 0, 6, ...
  1, 4, 4, 2, 3, 3, ...
  0, 6, 0, 3, 0, 2, ...
  1, 9, 6, 3, 2, 2, ...
  ...
		

Crossrefs

Cf. A068926 for incongruent tilings, A067925 for count by area.
Cf. A068921 (row 2), A068922 (row 3), A068923 (row 4), A068924 (row 5), A068925 (row 6).

Programs

  • Mathematica
    (* See link for Mathematica programs. *)
    c[r_, s_] := Which[s<0, 0, r==1, 1 - Mod[s, 2], r == 2, c1[2, s] + c2[2, s] + Boole[s == 0], OddQ[r], c[r, s] = c[r, s - r + 1] + c[r, s - r - 1] + Boole[s == 0], EvenQ[r], c[r, s] = c1[r, s] + c2[r, s] + Boole[s == 0]];
    c1[r_, s_] := Which[s <= 0, 0, r == 2, c[2, s - 1], EvenQ[r], c2[r, s - 1] + Boole[s == 1]];
    c2[r_, s_] := Which[s <= 0, 0, r == 2, c2[2, s] = c1[2, s - 2] + Boole[s == 2], EvenQ[r], c2[r, s] = c1[r, s - r + 2] + c1[r, s - r] + Boole[s == r - 2] + Boole[s == r]];
    t[r_, s_] := Which[r>s, t[s, r], OddQ[r] && r>1, 2 c[r, s], True, c[r, s]];
    A068920[n_] := Module[{x}, x = Floor[(Sqrt[8 n + 1] - 1)/2]; t[n + 1 - x (x + 1)/2, (x + 1) (x + 2)/2 - n]];
    Table[A068920[n], {n, 0, 100}] (* Jean-François Alcover, May 12 2017, copied and adapted from Dean Hickerson's programs *)

A090991 Number of meaningful differential operations of the n-th order on the space R^6.

Original entry on oeis.org

6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338, 126491972
Offset: 1

Views

Author

Branko Malesevic, Feb 29 2004

Keywords

Comments

Apparently a(n) = A054886(n+2) for n=1..1000. - Georg Fischer, Oct 06 2018

Crossrefs

Essentially the same as A006355, A047992 and A078642.

Programs

  • GAP
    a:=[6,10];; for n in [3..40] do a[n]:=a[n-1]+a[n-2]; od; a; # Muniru A Asiru, Oct 06 2018
    
  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(  2*x*(3+2*x)/(1-x-x^2) )); // G. C. Greubel, Feb 02 2019
    
  • Maple
    NUM := proc(k :: integer) local i,j,n,Fun,Identity,v,A; n := 6; # <- DIMENSION Fun := (i,j)->piecewise(((j=i+1) or (i+j=n+1)),1,0); Identity := (i,j)->piecewise(i=j,1,0); v := matrix(1,n,1); A := piecewise(k>1,(matrix(n,n,Fun))^(k-1),k=1,matrix(n,n,Identity)); return(evalm(v&*A&*transpose(v))[1,1]); end:
  • Mathematica
    CoefficientList[Series[2*(3+2z)/(1-z-z^2), {z, 0, 40}], z] (* Vladimir Joseph Stephan Orlovsky, Jun 11 2011 *)
  • PARI
    my(x='x+O('x^40)); Vec(2*x*(3+2*x)/(1-x-x^2)) \\ G. C. Greubel, Feb 02 2019
    
  • Sage
    (2*(3+2*x)/(1-x-x^2)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Feb 02 2019

Formula

a(k+4) = 3*a(k+2) - a(k).
a(k) = 2*Fibonacci(k+3).
From Philippe Deléham, Nov 19 2008: (Start)
a(n) = a(n-1) + a(n-2), n>2, where a(1)=6, a(2)=10.
G.f.: 2*x*(3+2*x)/(1-x-x^2). (End)
E.g.f.: 4*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 2*sqrt(5)*sinh(sqrt(5)*x/2))/5 - 4. - Stefano Spezia, Apr 18 2022

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

Original entry on oeis.org

2, 2, 2, 4, 5, 9, 12, 21, 30, 51, 76, 127, 195, 322, 504, 826, 1309, 2135, 3410, 5545, 8900, 14445, 23256, 37701, 60813, 98514, 159094, 257608, 416325, 673933, 1089648, 1763581, 2852242, 4615823, 7466468, 12082291, 19546175, 31628466
Offset: 1

Views

Author

Dean Hickerson, Mar 11 2002

Keywords

Crossrefs

Cf. A068922 for total number of tilings, A068926 for more info.
Essentially the same as A001224.

Formula

For n >= 8, a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-5) - a(n-6).
O.g.f.: x(2-4x^2-x^4+x^6)/((1-x-x^2)(1-x^2-x^4)). a(n) = (A000045(n+1)+A053602(n+1))/2, n>1. [From R. J. Mathar, Aug 30 2008]

A272472 Triangle T(n,m) by rows: The number of tatami tilings of a 3 by n grid with dimers and m monomers.

Original entry on oeis.org

0, 2, 0, 1, 3, 0, 9, 0, 1, 0, 10, 0, 12, 4, 0, 27, 0, 13, 0, 18, 0, 56, 0, 16, 6, 0, 75, 0, 97, 0, 18, 0, 38, 0, 198, 0, 152, 0, 18, 10, 0, 177, 0, 433, 0, 214, 0, 18, 0, 72, 0, 570, 0, 836, 0, 282, 0, 18, 16, 0, 393, 0, 1517, 0, 1442, 0, 354, 0, 18, 0, 136
Offset: 1

Views

Author

R. J. Mathar, Apr 30 2016

Keywords

Examples

			The triangle starts in row n=1 and column m=0 as:
0,2,0,1;
3,0,9,0,1;
0,10,0,12;
4,0,27,0,13;
0,18,0,56,0,16;
6,0,75,0,97,0,18;
0,38,0,198,0,152,0,18;
10,0,177,0,433,0,214,0,18;
0,72,0,570,0,836,0,282,0,18;
16,0,393,0,1517,0,1442,0,354,0,18;
0,136,0,1478,0,3472,0,2292,0,426,0,18;
26,0,829,0,4571,0,7052,0,3410,0,498,0,18;
0,250,0,3554,0,12070,0,13076,0,4808,0,570,0,18;
42,0,1691,0,12479,0,28158,0,22480,0,6494,0,642,0,18;
0,454,0,8108,0,37222,0,59530,0,36308,0,8468,0,714,0,18;
68,0,3359,0,31729,0,97766,0,115948,0,55672,0,10730,0,786,0,18;
0,814,0,17768,0,105238,0,231622,0,210880,0,81708,0,13280,0,858,0,18;
110,0,6537,0,76483,0,306606,0,503348,0,361878,0,115568,0,16118,0,930,0,18;
0,1446,0,37736,0,278626,0,803060,0,1016880,0,590846,0,158404,0,19244,0,1002,0,18;
178,0,12511,0,176833,0,889916,0,1923278,0,1929730,0,924216,0,211368,0,22658,0,1074,0,18;
0,2548,0,78144,0,700670,0,2549216,0,4268026,0,3469042,0,1392996,0,275612,0,26360,0,1146,0,18;
288,0,23617,0,395387,0,2430464,0,6661414,0,8867630,0,5948792,0,2032802,0,352288,0,30350,0,1218,0,18;
0,4460,0,158492,0,1690478,0,7547920,0,16089358,0,17395888,0,9787628,0,2883858,0,442548,0,34628,0,1290,0,18;
466,0,44067,0,860069,0,6319840,0,21344172,0,36292416,0,32446518,0,15527142,0,3990996,0,547544,0,39194,0,1362,0,18;
		

Crossrefs

Cf. A180970 (row sums), A068922 (column m=0), A271786 (column m=1), A272471 (2 by n grid), A100245 (row reversed without tatami condition).

Formula

G.f. x *(x^4*y^3 +7*x*y^2 +3*x +2*y +y^3 +x^6*y +3*x^2*y -x^3*y^2 -6*x^4*y -x^2*y^5 +x^2*y^3 +y^3*x^6 -2*y^4*x^5 -2*x^3 -2*x^5 +y^5*x^4 -x^3*y^4 -x^5*y^2 +x^7) / (x^6 +x^5*y -2*x^4*y^2 -2*x^2 -x*y +1). - R. J. Mathar, May 01 2016
Showing 1-7 of 7 results.