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

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]

A123231 Row sums of A123230.

Original entry on oeis.org

1, 2, 1, 3, 2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025, 196418
Offset: 1

Views

Author

Roger L. Bagula, Oct 06 2006

Keywords

Comments

All terms are Fibonacci numbers A000045: a(2n-1) = Fibonacci(n), a(2n) = Fibonacci(n+2), a(2n-1) = a(2n+2). - Alexander Adamchuk, Oct 08 2006

Crossrefs

Programs

  • GAP
    a:=[1,2,1,3];; for n in [5..50] do a[n]:=a[n-2]+a[n-4]; od; a; # Muniru A Asiru, Oct 12 2018
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1 + 2*x + x^3)/(1 - x^2 - x^4))); // G. C. Greubel, Oct 12 2018
    
  • Maple
    seq(coeff(series(-x*(1+2*x+x^3)/(x^4+x^2-1),x,n+1), x, n), n = 1 .. 50); # Muniru A Asiru, Oct 12 2018
  • Mathematica
    p[0, x] = 1; p[1, x] = x + 1; p[k_, x_] := p[k, x] = x*p[k - 1, x] + (-1)^(n + 1)p[k - 2, x]; Table[Sum[CoefficientList[p[n, x], x][[m]], {m, 1, n + 1}], {n, 0, 20}]
    Rest[Flatten[Reverse/@Partition[Fibonacci[Range[30]],2,1]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    vector(50, n, fibonacci(3/4 -(-1)^(n+1)*3/4 +(n+1)/2)) \\ G. C. Greubel, Oct 12 2018
    

Formula

From Alexander Adamchuk, Oct 08 2006: (Start)
a(n) = Fibonacci(A028242(n+2)).
a(n) = Fibonacci(A030451(n+1)).
a(n) = Fibonacci(3/4 -(-1)^(n+1)*3/4 +(n+1)/2). (End)
a(n) = A053602(n+1) = A097594(n-5). - R. J. Mathar, Mar 08 2011
G.f. -x*(1+2*x+x^3) / ( -1+x^2+x^4 ). - R. J. Mathar, Mar 08 2011
a(n) = a(n-2) + a(n-4). - Muniru A Asiru, Oct 12 2018

Extensions

More terms from Alexander Adamchuk, Oct 08 2006

A051792 a(n) = (-1)^(n-1)*(a(n-1) - a(n-2)), a(1)=1, a(2)=1.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, -1, 1, 2, -1, -3, 2, 5, -3, -8, 5, 13, -8, -21, 13, 34, -21, -55, 34, 89, -55, -144, 89, 233, -144, -377, 233, 610, -377, -987, 610, 1597, -987, -2584, 1597, 4181, -2584, -6765, 4181, 10946, -6765, -17711, 10946, 28657, -17711, -46368
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 10 1999

Keywords

Crossrefs

Programs

  • Magma
    [Fibonacci(1 -Floor((n-4)/2) -2*((n-4) mod 2)): n in [1..60]]; // G. C. Greubel, Dec 06 2022
  • Mathematica
    LinearRecurrence[{0,-1,0,1},{1,1,0,1},60] (* Harvey P. Dale, May 08 2017 *)
  • PARI
    a(n)=fibonacci((3-n)\2+(3-n)%2*2)
    
  • Sage
    def A051792():
        x, y, b = 1, 1, true
        while True:
            yield x
            x, y = y, x - y
            y = -y if b else y
            b = not b
    a = A051792()
    print([next(a) for  in range(51)]) # _Peter Luschny, Mar 19 2020
    

Formula

a(3-n) = A053602(n).
From Michael Somos: (Start)
G.f.: x*(1 + x + x^2 + 2*x^3)/(1 + x^2 - x^4).
a(n) = -a(n-2) + a(n-4). (End)
a(n) = b(n-1) + b(n-2) + b(n-3) + 2*b(n-4), where b(n) = i^n * A079977(n). - G. C. Greubel, Dec 06 2022

A233323 Triangle read by rows: T(n,k) = number of palindromic compositions of n in which the largest part is equal to k, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 1, 0, 1, 1, 4, 1, 1, 0, 1, 1, 2, 3, 0, 1, 0, 1, 1, 7, 3, 3, 0, 1, 0, 1, 1, 4, 6, 1, 2, 0, 1, 0, 1, 1, 12, 7, 7, 1, 2, 0, 1, 0, 1, 1, 7, 12, 3, 5, 0, 2, 0, 1, 0, 1, 1, 20, 16, 15, 3, 5, 0, 2, 0, 1, 0, 1
Offset: 1

Views

Author

L. Edson Jeffery, Dec 10 2013

Keywords

Comments

A palindromic composition of a natural number m is an ordered partition of m into N+1 natural numbers (or parts), p_0, p_1, ..., p_N, of the form m = p_0 + p_1 + ... + p_N such that p_j = p_{N-j}, for each j in {0,...,N}. Two palindromic compositions, sum_{j=0..N} p_j and sum_{j=0..N} q_j (say), are identical if and only if p_j = q_j, j = 0,...,N; otherwise they are taken to be distinct.

Examples

			There are eight palindromic compositions of n=7, namely, {7}, {3,1,3}, {2,3,2}, {2,1,1,1,2}, {1,5,1}, {1,2,1,2,1}, {1,1,3,1,1}, {1,1,1,1,1,1,1}, and three of them have the largest part equal to 3, so T(7,3) = 3.
Triangle T(n,k) begins:
  1;
  1,  1;
  1,  0, 1,
  1,  2, 0, 1;
  1,  1, 1, 0, 1;
  1,  4, 1, 1, 0, 1;
  1,  2, 3, 0, 1, 0, 1;
  1,  7, 3, 3, 0, 1, 0, 1;
  1,  4, 6, 1, 2, 0, 1, 0, 1;
  1, 12, 7, 7, 1, 2, 0, 1, 0, 1;
  ...
		

Crossrefs

Cf. A016116 (row sums), A233324 (row partial sums).
T(n,2)+1 = A053602(n+1) = A123231(n). T(4n-2,2n) = A011782(n-1). - Alois P. Heinz, Dec 11 2013

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<=k, 1, 0)+
          add(b(n-2*j, k), j=1..min(k, iquo(n, 2)))
        end:
    T:= (n, k)-> b(n, k) -b(n, k-1):
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Dec 11 2013
  • Mathematica
    b[n_, k_] := b[n, k] = If[n <= k, 1, 0] + Sum[b[n-2*j, k], { j, 1, Min[k, Quotient[n, 2]]}]; t[n_, k_] := b[n, k] - b[n, k-1]; Table[Table[t[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Alois P. Heinz's Maple code *)
  • PARI
    T(n,k,ok=0)={
        if(n<1,return(n==0 && ok));
        if(k>n/2 && !ok,
            n-=k;
            if(n<0||n%2, return(0));
            return(2^max(n/2-1,0))
        );
        sum(i=1,k,
            T(n-2*i,k,ok||i==k)
        )+(n==k || (ok && nCharles R Greathouse IV, Dec 11 2013

A233324 Triangle read by rows: T(n,k) = number of palindromic compositions of n in which no part exceeds k, 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 3, 3, 4, 1, 2, 3, 3, 4, 1, 5, 6, 7, 7, 8, 1, 3, 6, 6, 7, 7, 8, 1, 8, 11, 14, 14, 15, 15, 16, 1, 5, 11, 12, 14, 14, 15, 15, 16, 1, 13, 20, 27, 28, 30, 30, 31, 31, 32, 1, 8, 20, 23, 28, 28, 30, 30, 31, 31, 32, 1, 21, 37, 52, 55, 60, 60, 62, 62, 63, 63, 64
Offset: 1

Views

Author

L. Edson Jeffery, Dec 11 2013

Keywords

Comments

A palindromic composition of a natural number m is an ordered partition of m into N+1 natural numbers (or parts), p_0, p_1, ..., p_N, of the form m = p_0 + p_1 + ... + p_N such that p_j = p_{N-j}, for each j in {0,...,N}. Two palindromic compositions, sum_{j=0..N} p_j and sum_{j=0..N} q_j (say), are identical if and only if p_j = q_j, j = 0,...,N; otherwise they are taken to be distinct.
Partial sums of rows of A233323.
T(n,k) is defined for n,k >= 0. T(n,k) = T(n,n) = A016116(n) for k>= 0. - Alois P. Heinz, Dec 11 2013

Examples

			Triangle T(n,k) begins:
1;
1,  2;
1,  1,  2;
1,  3,  3,  4;
1,  2,  3,  3,  4;
1,  5,  6,  7,  7,  8;
1,  3,  6,  6,  7,  7,  8;
1,  8, 11, 14, 14, 15, 15, 16;
1,  5, 11, 12, 14, 14, 15, 15, 16;
1, 13, 20, 27, 28, 30, 30, 31, 31, 32;
		

Crossrefs

Cf. A233323.
T(n,2) = A053602(n+1) = A123231(n). T(2n,3) = A001590(n+3). T(2n,4) = A001631(n+4). - Alois P. Heinz, Dec 11 2013

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(n<=k, 1, 0)+
          add(T(n-2*j, k), j=1..min(k, iquo(n, 2)))
        end:
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Dec 11 2013
  • Mathematica
    T[n_, k_] := T[n, k] = If[n <= k, 1, 0] + Sum[T[n-2*j, k], {j, 1, Min[k, Quotient[ n, 2]]}]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Mar 09 2015, after Alois P. Heinz *)
  • PARI
    T(n,k)=if(n<1,return(n==0));sum(i=1,k,T(n-2*i,k))+(n<=k) \\ Charles R Greathouse IV, Dec 11 2013

A272912 Difference sequence of the sequence A116470 of all distinct Fibonacci numbers and Lucas numbers (A000032).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025
Offset: 1

Views

Author

Clark Kimberling, May 10 2016

Keywords

Comments

Every term is a Fibonacci number (A000045).

Examples

			A116470 = (1, 2, 3, 4, 5, 7, 8, 11, 13, 18, 21, 29, 34, 47, 55, 76,...), so that (a(n)) = (1,1,1,1,2,1,3,2,5,3,8,5,13,8,12,...).
		

Crossrefs

Programs

  • Mathematica
    u = Table[Fibonacci[n], {n, 1, 200}]; v = Table[LucasL[n], {n, 1, 200}];
    Take[Differences[Union[u, v]], 100]
  • PARI
    Vec(x*(1+x-x^5)/(1-x^2-x^4) + O(x^50)) \\ Colin Barker, May 10 2016

Formula

From Colin Barker, May 10 2016: (Start)
a(n) = a(n-2)+a(n-4) for n>4.
G.f.: x*(1+x-x^5) / (1-x^2-x^4).
(End)
a(n) = A053602(n-2), n>2. - R. J. Mathar, May 20 2016
a(n) = A123231(n-3), n>3. - Georg Fischer, Oct 23 2018

A032089 "BHK" (reversible, identity, unlabeled) transform of 1,0,1,0...(odds).

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 5, 9, 14, 25, 39, 68, 107, 182, 289, 483, 772, 1275, 2047, 3355, 5402, 8811, 14213, 23112, 37325, 60580, 97905, 158717, 256622, 415715, 672337, 1088661, 1760998, 2850645, 4611643, 7463884, 12075527, 19541994, 31617521, 51163695, 82781216, 133951675
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    LinearRecurrence[{1,3,-2,-2,0,-1,1,1},{1,0,1,1,2,3,5,9},42] (* Stefano Spezia, Apr 01 2025 *)
  • PARI
    Vec((1-x-2*x^2+2*x^3+x^6)/((1-x)*(1+x)*(1-x-x^2)*(1-x^2-x^4)) + O(x^40)) \\ Andrew Howroyd, Aug 31 2018

Formula

G.f.: x*(1-x-2*x^2+2*x^3+x^6)/((1-x)*(1+x)*(1-x-x^2)*(1-x^2-x^4)).
a(n) = a(n-1) + 3*a(n-2) - 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7) + a(n-8) for n > 8. - Andrew Howroyd, Aug 31 2018
2*a(n) = 2*A000035(n) + A000045(n) - A053602(n). - R. J. Mathar, Mar 02 2022

A097594 a(n) = (a(n-1) mod a(n-2)) + a(n-2), a(0) = 3, a(1) = 2.

Original entry on oeis.org

2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025, 196418, 121393, 317811, 196418, 514229, 317811, 832040, 514229
Offset: 0

Views

Author

Gerald McGarvey, Aug 29 2004

Keywords

Crossrefs

Programs

  • Magma
    [Fibonacci(3 +Floor(n/2) +2*(n mod 2)): n in [0..60]]; // G. C. Greubel, Dec 06 2022
    
  • Mathematica
    LinearRecurrence[{0,1,0,1}, {2,5,3,8}, 60] (* G. C. Greubel, Dec 06 2022 *)
  • SageMath
    [fibonacci(3 +(n//2) + 2*(n%2)) for n in range(61)] # G. C. Greubel, Dec 06 2022

Formula

a(2n) = Fibonacci(n+4), a(2n+1) = Fibonacci(n+3).
a(n) = A053602(n+6).
a(n) = abs( A051792(n+11) ).
G.f.: (2 + 5*x + x^2 + 3*x^3)/(1 - x^2 - x^4). - G. C. Greubel, Dec 06 2022

A239366 Triangular array read by rows: T(n,k) is the number of palindromic compositions of n having exactly k 1's, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 3, 0, 3, 0, 1, 0, 1, 2, 1, 1, 2, 1, 0, 0, 1, 5, 0, 5, 0, 4, 0, 1, 0, 1, 3, 2, 3, 2, 1, 3, 1, 0, 0, 1, 8, 0, 10, 0, 7, 0, 5, 0, 1, 0, 1, 5, 3, 5, 5, 4, 3, 1, 4, 1, 0, 0, 1, 13, 0, 18, 0, 16, 0, 9, 0, 6, 0, 1, 0, 1, 8, 5, 10, 8, 7, 9, 5, 4, 1, 5, 1, 0, 0, 1
Offset: 0

Views

Author

Geoffrey Critzer, Mar 20 2014

Keywords

Comments

Row sums = 2^floor(n/2).
T(n,0) = A053602(n-1) for n>0, T(n,1) = A079977(n-5) for n>4, T(2n+1,3) = A006367(n-1) for n>0, both bisections of column k=2 contain A010049. - Alois P. Heinz, Mar 21 2014

Examples

			1,
0, 1,
1, 0, 1,
1, 0, 0, 1,
2, 0, 1, 0, 1,
1, 1, 1, 0, 0, 1,
3, 0, 3, 0, 1, 0, 1,
2, 1, 1, 2, 1, 0, 0, 1,
5, 0, 5, 0, 4, 0, 1, 0, 1,
3, 2, 3, 2, 1, 3, 1, 0, 0, 1
There are eight palindromic compositions of 6: T(6,0)=3 because we have: 6, 3+3, 2+2+2.  T(6,2)=3 because we have: 1+4+1, 2+1+1+2, 1+2+2+1.  T(6,4)=1 because we have: 1+1+2+1+1. T(6,6)=1 because we have: 1+1+1+1+1+1.
		

Programs

  • Maple
    b:= proc(n) option remember;  `if`(n=0, 1, expand(
          add(b(n-j)*`if`(j=1, x^2, 1), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))
        (add(b(i)*`if`(n-2*i=1, x, 1), i=0..n/2)):
    seq(T(n), n=0..30);  # Alois P. Heinz, Mar 21 2014
  • Mathematica
    nn=15;Table[Take[CoefficientList[Series[((1+x)*(1-x+x^2+x*y-x^2*y))/(1-x^2-x^4-x^2*y^2+x^4*y^2),{x,0,nn}],{x,y}][[n]],n],{n,1,nn}]//Grid

Formula

G.f.: G(x,y) = ((1 + x)*(1 - x + x^2 + x*y - x^2*y))/(1 - x^2 - x^4 - x^2*y^2 + x^4*y^2). Satisfies G(x,y) = 1/(1 - x) - x + y*x + (x^2/(1 - x^2) - x^2 +y^2*x^2)*G(x,y).

A275435 Triangle read by rows: T(n,k) is the number of 00-avoiding binary words of length n having degree of asymmetry equal to k (n>=0; 0<=k<=floor(n/2)).

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 2, 4, 2, 5, 6, 2, 3, 8, 8, 2, 8, 14, 10, 2, 5, 16, 20, 12, 2, 13, 30, 30, 14, 2, 8, 30, 48, 40, 16, 2, 21, 60, 78, 54, 18, 2, 13, 56, 106, 112, 68, 20, 2, 34, 116, 184, 166, 86, 22, 2, 21, 102, 224, 286, 224, 104, 24, 2, 55, 218, 408, 452, 310, 126, 26, 2
Offset: 0

Views

Author

Emeric Deutsch, Aug 15 2016

Keywords

Comments

The degree of asymmetry of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the degree of asymmetry 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 degree of asymmetry is 0.
Number of entries in row n is 1+floor(n/2).
Sum of entries in row n is A000045(n+2) (Fibonacci).
T(n,0) = A053602(n+2) (= number of palindromic 00-avoiding binary words of length n).
Sum(k*T(n,k), k>=0) = A275436(n).

Examples

			Row 3 is [3,2] because the 00-avoiding binary words of length 3 are 010, 011, 101, 110, 111, having asymmetry degrees 0, 1, 0, 1, 0, respectively.
Triangle starts:
1;
2;
1,2;
3,2;
2,4,2;
5,6,2.
		

Crossrefs

Programs

  • Maple
    G := (1+2*z+t*z^2+z^3-t*z^5)/(1-z^2-t*z^2-z^4-t*z^4+t*z^6): Gser := simplify(series(G, z = 0, 20)): for n from 0 to 18 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 18 do seq(coeff(P[n], t, j), j = 0 .. (1/2)*n) end do; # yields sequence in triangular form
  • Mathematica
    Table[BinCounts[#, {0, Floor[n/2] + 1, 1}] &@ Map[Total@ BitXor[Take[#, Ceiling[Length[#]/2]], Reverse@ Take[#, -Ceiling[Length[#]/2]]] &, Select[PadLeft[IntegerDigits[#, 2], n] & /@ Range[0, 2^n - 1], Length@ SequenceCases[#, {0, 0}] == 0 &]], {n, 0, 15}] // Flatten (* Michael De Vlieger, Aug 15 2016, Version 10.1 *)

Formula

G.f.: G(t,z) = (1 + 2z + tz^2 +z^3 -tz^5)/(1 - z^2 - tz^2 - z^4 - tz^4 + tz^6).
Showing 1-10 of 16 results. Next