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

A179133 Denominators of A178381(4*n+3)/A178381(4*n+2).

Original entry on oeis.org

2, 4, 5, 26, 68, 89, 466, 1220, 1597, 8362, 21892, 28657, 150050, 392836, 514229, 2692538, 7049156, 9227465, 48315634, 126491972, 165580141, 866988874, 2269806340, 2971215073, 15557484098, 40730022148, 53316291173, 279167724890
Offset: 0

Views

Author

Johannes W. Meijer, Jul 01 2010

Keywords

Comments

For the numerators see A128052.

Crossrefs

Programs

  • Maple
    with(GraphTheory): nmax:=120; P:=9: G:=PathGraph(P): A:= AdjacencyMatrix(G): for n from 0 to nmax do B(n):=A^n; A178381(n):=add(B(n)[1,k],k=1..P); od: for n from 0 to nmax-1 do a(n):= denom(A178381(4*n+3)/A178381(4*n+2)) od: seq(a(n),n=0..nmax/4-1);
  • Mathematica
    Flatten[Table[{2*Fibonacci[6 n + 1], 2*Fibonacci[6 n + 3],
    Fibonacci[6 n + 5]}, {n, 0, 10}]] (* Greg Dresden, Oct 16 2021 *)
    LinearRecurrence[{0,0,18,0,0,-1},{2,4,5,26,68,89},30] (* Harvey P. Dale, Oct 08 2024 *)

Formula

a(n) = A179134(n)*A153727(n+1)/2.
Lim_{n->infinity} A128052(n+1)/A179133(n) = 1+cos(Pi/5) = A296182.
From Colin Barker, Jun 27 2013: (Start)
G.f.: -(x^5+4*x^4+10*x^3-5*x^2-4*x-2)/((x^2-3*x+1)*(x^4+3*x^3+8*x^2+3*x+1)).
a(n) = 18*a(n-3)-a(n-6). (End)
From Greg Dresden, Oct 16 2021: (Start)
a(3*n) = 2*Fibonacci(6*n+1),
a(3*n+1) = 2*Fibonacci(6*n+3),
a(3*n+2) = Fibonacci(6*n+5). (End)

A179131 Numerators of A178381(4*n+1)/A178381(4*n).

Original entry on oeis.org

1, 5, 25, 65, 85, 445, 1165, 1525, 7985, 20905, 27365, 143285, 375125, 491045, 2571145, 6731345, 8811445, 46137325, 120789085, 158114965, 827900705, 2167472185, 2837257925, 14856075365, 38893710245, 50912527685, 266581455865
Offset: 0

Views

Author

Johannes W. Meijer, Jul 01 2010

Keywords

Comments

For the denominators see A179132.

Crossrefs

Programs

  • Maple
    with(GraphTheory): nmax:=116; P:=9: G:=PathGraph(P): A:= AdjacencyMatrix(G): for n from 0 to nmax do B(n):=A^n; A178381(n):=add(B(n)[1,k],k=1..P); od: for n from 0 to nmax-1 do a(n):= numer(A178381(4*n+1)/A178381(4*n)) od: seq(a(n),n=0..nmax/4-1);

Formula

a(n) = 5*A167808(2*n+1) for n>=1.
Limit(A179131(n)/A179132(n), n =infinity) = 1+cos(Pi/5) = A296182.
a(n) = 18*a(n-3)-a(n-6) for n>6. G.f.: -(4*x^6+5*x^5+5*x^4-47*x^3-25*x^2-5*x-1) / ((x^2-3*x+1)*(x^4+3*x^3+8*x^2+3*x+1)). - Colin Barker, Jun 27 2013

A179132 Denominators of A178381(4*n+1)/A178381(4*n).

Original entry on oeis.org

1, 3, 14, 36, 47, 246, 644, 843, 4414, 11556, 15127, 79206, 207364, 271443, 1421294, 3720996, 4870847, 25504086, 66770564, 87403803, 457652254, 1198149156, 1568397607, 8212236486, 21499914244, 28143753123, 147362604494
Offset: 0

Views

Author

Johannes W. Meijer, Jul 01 2010

Keywords

Comments

For the numerators see A179131.

Crossrefs

Cf. A128052 and A179133.

Programs

  • Maple
    with(GraphTheory): nmax:=116; P:=9: G:=PathGraph(P): A:= AdjacencyMatrix(G): for n from 0 to nmax do B(n):=A^n; A178381(n):=add(B(n)[1,k],k=1..P); od: for n from 0 to nmax-1 do a(n):= denom(A178381(4*n+1)/A178381(4*n)) od: seq(a(n),n=0..nmax/4-1);
  • Mathematica
    LinearRecurrence[{0,0,18,0,0,-1},{1,3,14,36,47,246,644},30] (* Harvey P. Dale, Jun 11 2022 *)

Formula

a(n) = A069705(n-1)*A128052(n) for n>=1.
Limit(A179131(n)/A179132(n), n =infinity) = 1+cos(Pi/5) = A296182.
a(n) = 18*a(n-3)-a(n-6) for n>6. G.f.: -(3*x^6+6*x^5+7*x^4-18*x^3-14*x^2-3*x-1) / ((x^2-3*x+1)*(x^4+3*x^3+8*x^2+3*x+1)). - Colin Barker, Jun 27 2013

A038754 a(2n) = 3^n, a(2n+1) = 2*3^n.

Original entry on oeis.org

1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 129140163, 258280326, 387420489
Offset: 0

Views

Author

Henry Bottomley, May 03 2000

Keywords

Comments

In general, for the recurrence a(n) = a(n-1)*a(n-2)/a(n-3), all terms are integers iff a(0) divides a(2) and first three terms are positive integers, since a(2n+k) = a(k)*(a(2)/a(0))^n for all nonnegative integers n and k.
Equals eigensequence of triangle A070909; (1, 1, 2, 3, 6, 9, 18, ...) shifts to the left with multiplication by triangle A070909. - Gary W. Adamson, May 15 2010
The a(n) represent all paths of length (n+1), n >= 0, starting at the initial node on the path graph P_5, see the second Maple program. - Johannes W. Meijer, May 29 2010
a(n) is the difference between numbers of multiple of 3 evil (A001969) and odious (A000069) numbers in interval [0, 2^(n+1)). - Vladimir Shevelev, May 16 2012
A "half-geometric progression": to obtain a term (beginning with the third one) we multiply the before previous one by 3. - Vladimir Shevelev, May 21 2012
Pisano periods: 1, 2, 1, 4, 8, 2, 12, 4, 1, 8, 10, 4, 6, 12, 8, 8, 32, 2, 36, 8, ... . - R. J. Mathar, Aug 10 2012
Numbers k such that the k-th cyclotomic polynomial has a root mod 3. - Eric M. Schmidt, Jul 31 2013
Range of row n of the circular Pascal array of order 6. - Shaun V. Ault, Jun 05 2014
Also, the number of walks of length n on the graph 0--1--2--3--4 starting at vertex 1. - Sean A. Irvine, Jun 03 2025

Examples

			In the interval [0,2^5) we have 11 multiples of 3 numbers, from which 10 are evil and only one (21) is odious. Thus a(4) = 10 - 1 = 9. - _Vladimir Shevelev_, May 16 2012
		

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a038754 n = a038754_list !! n
    a038754_list = concat $ transpose [a000244_list, a008776_list]
    -- Reinhard Zumkeller, Oct 19 2015
    
  • Magma
    [n le 2 select n else 3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 18 2016
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=3*a[n-2]+2 od: seq(a[n]+1, n=0..34); # Zerinvary Lajos, Mar 20 2008
    with(GraphTheory): P:=5: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=35; for n from 1 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P) od: seq(a(n),n=1..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    LinearRecurrence[{0,3},{1,2},40] (* Harvey P. Dale, Jan 26 2014 *)
    CoefficientList[Series[(1+2x)/(1-3x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 18 2016 *)
    Module[{nn=20,c},c=3^Range[0,nn];Riffle[c,2c]] (* Harvey P. Dale, Aug 21 2021 *)
  • PARI
    a(n)=(1/6)*(5-(-1)^n)*3^floor(n/2)
    
  • PARI
    a(n)=3^(n>>1)<
    				
  • SageMath
    [2^(n%2)*3^((n-(n%2))/2) for n in range(61)] # G. C. Greubel, Oct 10 2022

Formula

a(n) = a(n-1)*a(n-2)/a(n-3) with a(0)=1, a(1)=2, a(2)=3.
a(2*n) = (3/2)*a(2*n-1) = 3^n, a(2*n+1) = 2*a(2*n) = 2*3^n.
From Benoit Cloitre, Apr 27 2003: (Start)
a(1)=1, a(n)= 2*a(n-1) if a(n-1) is odd, or a(n)= (3/2)*a(n-1) if a(n-1) is even.
a(n) = (1/6)*(5-(-1)^n)*3^floor(n/2).
a(2*n) = a(2*n-1) + a(2*n-2) + a(2*n-3).
a(2*n+1) = a(2*n) + a(2*n-1). (End)
G.f.: (1+2*x)/(1-3*x^2). - Paul Barry, Aug 25 2003
From Reinhard Zumkeller, Sep 11 2003: (Start)
a(n) = (1 + n mod 2) * 3^floor(n/2).
a(n) = A087503(n) - A087503(n-1). (End)
a(n) = sqrt(3)*(2+sqrt(3))*(sqrt(3))^n/6 - sqrt(3)*(2-sqrt(3))*(-sqrt(3))^n/6. - Paul Barry, Sep 16 2003
From Reinhard Zumkeller, May 26 2008: (Start)
a(n) = A140740(n+2,2).
a(n+1) = a(n) + a(n - n mod 2). (End)
If p(i) = Fibonacci(i-3) and if A is the Hessenberg matrix of order n defined by A(i,j) = p(j-i+1), (i<=j), A(i,j)=-1, (i=j+1), and A(i,j)=0 otherwise. Then, for n>=1, a(n-1) = (-1)^n det A. - Milan Janjic, May 08 2010
a(n) = A182751(n) for n >= 2. - Jaroslav Krizek, Nov 27 2010
a(n) = Sum_{i=0..2^(n+1), i==0 (mod 3)} (-1)^A000120(i). - Vladimir Shevelev, May 16 2012
a(0)=1, a(1)=2, for n>=3, a(n)=3*a(n-2). - Vladimir Shevelev, May 21 2012
Sum_(n>=0) 1/a(n) = 9/4. - Alexander R. Povolotsky, Aug 24 2012
a(n) = sqrt(3*a(n-1)^2 + (-3)^(n-1)). - Richard R. Forberg, Sep 04 2013
a(n) = 2^((1-(-1)^n)/2)*3^((2*n-1+(-1)^n)/4). - Luce ETIENNE, Aug 11 2014
From Reinhard Zumkeller, Oct 19 2015: (Start)
a(2*n) = A000244(n), a(2*n+1) = A008776(n).
For n > 0: a(n+1) = a(n) + if a(n) odd then min{a(n), a(n-1)} else max{a(n), a(n-1)}, see also A128588. (End)
E.g.f.: (7*cosh(sqrt(3)*x) + 4*sqrt(3)*sinh(sqrt(3)*x) - 4)/3. - Stefano Spezia, Feb 17 2022
Sum_{n>=0} (-1)^n/a(n) = 3/4. - Amiram Eldar, Dec 02 2022

A081567 Second binomial transform of F(n+1).

Original entry on oeis.org

1, 3, 10, 35, 125, 450, 1625, 5875, 21250, 76875, 278125, 1006250, 3640625, 13171875, 47656250, 172421875, 623828125, 2257031250, 8166015625, 29544921875, 106894531250, 386748046875, 1399267578125, 5062597656250, 18316650390625, 66270263671875, 239768066406250
Offset: 0

Views

Author

Paul Barry, Mar 22 2003

Keywords

Comments

Binomial transform of F(2*n-1), index shifted by 1, where F is A000045. - corrected by Richard R. Forberg, Aug 12 2013
Case k=2 of family of recurrences a(n) = (2k+1)*a(n-1) - A028387(k-1)*a(n-2), a(0)=1, a(1)=k+1.
Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 10 and |s(i) - s(i-1)| = 1 for i = 1, 2, ..., 2*n+1, s(0) = 3, s(2*n+1) = 4.
a(n+1) gives the number of periodic multiplex juggling sequences of length n with base state <2>. - Steve Butler, Jan 21 2008
a(n) is also the number of idempotent order-preserving partial transformations (of an n-element chain) of waist n (waist(alpha) = max(Im(alpha))). - Abdullahi Umar, Sep 14 2008
Counts all paths of length (2*n+1), n>=0, starting at the initial node on the path graph P_9, see the Maple program. - Johannes W. Meijer, May 29 2010
Given the 3 X 3 matrix M = [1,1,1; 1,1,0; 1,1,3], a(n) = term (1,1) in M^(n+1). - Gary W. Adamson, Aug 06 2010
Number of nonisomorphic graded posets with 0 and 1 of rank n+2, with exactly 2 elements of each rank level between 0 and 1. Also the number of nonisomorphic graded posets with 0 of rank n+1, with exactly 2 elements of each rank level above 0. (This is by Stanley's definition of graded, that all maximal chains have the same length.) - David Nacin, Feb 26 2012
a(n) = 3^n a(n;1/3) = Sum_{k=0..n} C(n,k) * F(k-1) * (-1)^k * 3^(n-k), which also implies the Deleham formula given below and where a(n;d), n=0,1,...,d, denote the delta-Fibonacci numbers defined in comments to A000045 (see also the papers of Witula et al.). - Roman Witula, Jul 12 2012
The limiting ratio a(n)/a(n-1) is 1 + phi^2. - Bob Selcoe, Mar 17 2014
a(n) counts closed walks on K_2 containing 3 loops on the index vertex and 2 loops on the other. Equivalently the (1,1) entry of A^n where the adjacency matrix of digraph is A=(3,1; 1,2). - David Neil McGrath, Nov 18 2014

Examples

			a(4)=125: 35*(3 + (35 mod 10 - 10 mod 3)/(10-3)) = 35*(3 + 4/7) = 125. - _Bob Selcoe_, Mar 17 2014
		

References

  • R. P. Stanley, Enumerative Combinatorics, Vol. 1, Cambridge University Press, Cambridge, 1997, pages 96-100.

Crossrefs

a(n) = 5*A052936(n-1), n > 1.
Row sums of A114164.
Cf. A000045, A007051 (INVERTi transform), A007598, A028387, A030191, A039717, A049310, A081568 (binomial transform), A086351 (INVERT transform), A090041, A093129, A094441, A111776, A147748, A178381, A189315.

Programs

  • Magma
    I:=[1, 3]; [n le 2 select I[n] else 5*Self(n-1)-5*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Feb 27 2012
    
  • Maple
    with(GraphTheory):G:=PathGraph(9): A:= AdjacencyMatrix(G): nmax:=23; n2:=nmax*2+2: for n from 0 to n2 do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..9); od: seq(a(2*n+1),n=0..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    Table[MatrixPower[{{2,1},{1,3}},n][[2]][[2]],{n,0,44}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{5,-5},{1,3},30] (* Vincenzo Librandi, Feb 27 2012 *)
  • PARI
    Vec((1-2*x)/(1-5*x+5*x^2)+O(x^99)) \\ Charles R Greathouse IV, Mar 18 2014
  • Python
    def a(n, adict={0:1, 1:3}):
        if n in adict:
            return adict[n]
        adict[n]=5*a(n-1) - 5*a(n-2)
        return adict[n] # David Nacin, Mar 04 2012
    

Formula

a(n) = 5*a(n-1) - 5*a(n-2) for n >= 2, with a(0) = 1 and a(1) = 3.
a(n) = (1/2 - sqrt(5)/10) * (5/2 - sqrt(5)/2)^n + (sqrt(5)/10 + 1/2) * (sqrt(5)/2 + 5/2)^n.
G.f.: (1 - 2*x)/(1 - 5*x + 5*x^2).
a(n-1) = Sum_{k=1..n} binomial(n, k)*F(k)^2. - Benoit Cloitre, Oct 26 2003
a(n) = A090041(n)/2^n. - Paul Barry, Mar 23 2004
The sequence 0, 1, 3, 10, ... with a(n) = (5/2 - sqrt(5)/2)^n/5 + (5/2 + sqrt(5)/2)^n/5 - 2(0)^n/5 is the binomial transform of F(n)^2 (A007598). - Paul Barry, Apr 27 2004
From Paul Barry, Nov 15 2005: (Start)
a(n) = Sum_{k=0..n} Sum_{j=0..n} binomial(n, j)*binomial(j+k, 2k);
a(n) = Sum_{k=0..n} Sum_{j=0..n} binomial(n, k+j)*binomial(k, k-j)2^(n-k-j);
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} binomial(n+k-j, n-k-j)*binomial(k, j)(-1)^j*2^(n-k-j). (End)
a(n) = A111776(n, n). - Abdullahi Umar, Sep 14 2008
a(n) = Sum_{k=0..n} A094441(n,k)*2^k. - Philippe Deléham, Dec 14 2009
a(n+1) = Sum_{k=-floor(n/5)..floor(n/5)} ((-1)^k*binomial(2*n, n+5*k)/2). -Mircea Merca, Jan 28 2012
a(n) = A030191(n) - 2*A030191(n-1). - R. J. Mathar, Jul 19 2012
G.f.: Q(0,u)/x - 1/x, where u=x/(1-2*x), Q(k,u) = 1 + u^2 + (k+2)*u - u*(k+1 + u)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
For n>=3: a(n) = a(n-1)*(3+(a(n-1) mod a(n-2) - a(n-2) mod a(n-3))/(a(n-2) - a(n-3))). - Bob Selcoe, Mar 17 2014
a(n) = sqrt(5)^(n-1)*(3*S(n-1, sqrt(5)) - sqrt(5)*S(n-2, sqrt(5))) with Chebyshev's S-polynomials (see A049310), where S(-1, x) = 0 and S(-2, x) = -1. This is the (1,1) entry of A^n with the matrix A=(3,1;1,2). See the comment by David Neil McGrath, Nov 18 2014. - Wolfdieter Lang, Dec 04 2014
Conjecture: a(n) = 2*a(n-1) + A039717(n). - Benito van der Zander, Nov 20 2015
a(n) = A189315(n+1) / 10. - Tom Copeland, Dec 08 2015
a(n) = A093129(n) + A030191(n-1). - Gary W. Adamson, Apr 24 2023
E.g.f.: exp(5*x/2)*(5*cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2))/5. - Stefano Spezia, Jun 03 2024

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

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 19, 33, 61, 108, 197, 352, 638, 1145, 2069, 3721, 6714, 12087, 21794, 39254, 70755, 127469, 229725, 413908, 745889, 1343980, 2421850, 4363921, 7863641, 14169633, 25532994, 46008619, 82904974, 149389218, 269190547, 485064009, 874055885
Offset: 0

Views

Author

Keywords

Comments

Form the graph with matrix A = [0,1,1; 1,0,0; 1,0,1] (P_3 with a loop at an extremity). Then A028495 counts closed walks of length n at the degree 3 vertex. - Paul Barry, Oct 02 2004
Equals INVERT transform of (1, 1, 0, 1, 0, 1, 0, 1, ...). - Gary W. Adamson, Apr 28 2009
From Johannes W. Meijer, May 29 2010: (Start)
a(n) is the number of ways White can force checkmate in exactly (n+1) moves, n>=0, ignoring the fifty-move and the triple repetition rules, in the following chess position: White Ka1, Ra8, Bc1, Nb8, pawns a6, a7, b2, c6, d2, f6 and h6; Black Kc8, pawns b3, c7, d3, f7 and h7. (After Noam D. Elkies, see link; diagram 5).
Counts all paths of length n, n>=0, starting at the initial node on the path graph P_6, see the second Maple program. (End)
a(n) is the number of length n-1 binary words such that each maximal block of 1's has odd length. a(4) = 6 because we have: 000, 001, 010, 100, 101, 111. - Geoffrey Critzer, Nov 17 2012
a(n) is the number of compositions of n where increments can only appear at every second position, starting with the second and third part, see example. Also, a(n) is the number of compositions of n where there is no fall between every second pair of parts, starting with the first and second part; see example. - Joerg Arndt, May 21 2013
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [1, 1, 0; 1, 0, 1; 0, 1, 0] or of the 3 X 3 matrix [1, 0, 1; 0, 0, 1; 1, 1, 0]. - R. J. Mathar, Feb 03 2014
Range of row n of the circular Pascal array of order 7. - Shaun V. Ault, Jun 05 2014
a(n) is the number of compositions of n into parts from {1,2,4,6,8,10,...}. Example: a(4)= 6 because we have 4, 22, 211, 121, 112, and 1111. - Emeric Deutsch, Aug 17 2016
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=6. - Herbert Kociemba, Sep 15 2020
a(n-1) is the number of triangular dcc-polyominoes having area n (see Baril et al. at page 11). - Stefano Spezia, Oct 14 2023
a(n) is the number of permutations p of [n] with p(j)Alois P. Heinz, Mar 29 2024

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 19*x^6 + 33*x^7 + 61*x^8 + ...
From _Joerg Arndt_, May 21 2013: (Start)
There are a(6)=19 compositions of 6 where increments can only appear at every second position:
  01:  [ 1 1 1 1 1 1 ]
  02:  [ 1 1 1 1 2 ]
  03:  [ 1 1 2 1 1 ]
  04:  [ 1 1 2 2 ]
  05:  [ 1 1 3 1 ]
  06:  [ 1 1 4 ]
  07:  [ 2 1 1 1 1 ]
  08:  [ 2 1 2 1 ]
  09:  [ 2 1 3 ]
  10:  [ 2 2 1 1 ]
  11:  [ 2 2 2 ]
  12:  [ 3 1 1 1 ]
  13:  [ 3 1 2 ]
  14:  [ 3 2 1 ]
  15:  [ 3 3 ]
  16:  [ 4 1 1 ]
  17:  [ 4 2 ]
  18:  [ 5 1 ]
  19:  [ 6 ]
There are a(6)=19 compositions of 6 where there is no fall between every second pair of parts, starting with the first and second part:
  01:  [ 1 1 1 1 1 1 ]
  02:  [ 1 1 1 1 2 ]
  03:  [ 1 1 1 2 1 ]
  04:  [ 1 1 1 3 ]
  05:  [ 1 1 2 2 ]
  06:  [ 1 1 4 ]
  07:  [ 1 2 1 1 1 ]
  08:  [ 1 2 1 2 ]
  09:  [ 1 2 3 ]
  10:  [ 1 3 1 1 ]
  11:  [ 1 3 2 ]
  12:  [ 1 4 1 ]
  13:  [ 1 5 ]
  14:  [ 2 2 1 1 ]
  15:  [ 2 2 2 ]
  16:  [ 2 3 1 ]
  17:  [ 2 4 ]
  18:  [ 3 3 ]
  19:  [ 6 ]
(End)
19 = (1, 0, 1, 0, 1, 1) dot (1, 1, 2, 3, 6, 10) = (1 + 0 + 2 + 0 + 6 + 10). Cf. comment of Apr 28 2009. - _Gary W. Adamson_, Aug 10 2016
		

Crossrefs

Programs

  • Maple
    spec := [S,{S=Sequence(Union(Prod(Sequence(Prod(Z,Z)),Z,Z),Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    with(GraphTheory): P:=6: G:= PathGraph(P): A:=AdjacencyMatrix(G): nmax:=34; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k], k=1..P) od: seq(a(n), n=0..nmax); # Johannes W. Meijer, May 29 2010
    a := (-1)^(3/7) - (-1)^(4/7):
    b := (-1)^(5/7) - (-1)^(2/7):
    c := (-1)^(1/7) - (-1)^(6/7):
    f := n -> (a^n * (2 + a) + b^n * (2 + b) + c^n * (2 + c))/7:
    seq(simplify(f(n)), n=0..36); # Peter Luschny, Sep 16 2020
  • Mathematica
    LinearRecurrence[{1, 2, -1}, {1, 1, 2}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    CoefficientList[Series[(1-x^2)/(1-x-2x^2+x^3),{x,0,40}],x] (* Harvey P. Dale, Dec 23 2018 *)
    a[n_,m_]:= 2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,6],{n,0,40}]//Round (* Herbert Kociemba, Sep 15 2020 *) (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    {a(n) = if( n<0, n = -1-n; polcoeff( (1 - x^2) / (1 - 2*x - x^2 + x^3) + x * O(x^n), n), polcoeff( (1 - x^2) / (1 - x - 2*x^2 + x^3) + x * O(x^n), n))} /* Michael Somos, Apr 05 2012 */
    
  • PARI
    a(n)=([0,1,0;0,0,1;-1,2,1]^n*[1;1;2])[1,1] \\ Charles R Greathouse IV, Aug 25 2016

Formula

Recurrence: {a(0)=1, a(1)=1, a(2)=2, a(n)-2*a(n+1)-a(n+2)+a(n+3)=0}.
a(n) = Sum_(1/7*(1+2*_alpha)*_alpha^(-1-n), _alpha=RootOf(_Z^3-2*_Z^2-_Z+1)).
a(n) = A094718(6, n). - N. J. A. Sloane, Jun 12 2004
a(n) = a(n-1) + Sum_{k=1..floor(n/2)} a(n-2*k). - Floor van Lamoen, Oct 29 2005
a(n) = 5*a(n-2) - 6*a(n-4) + a(n-6). - Floor van Lamoen, Nov 02 2005
a(n) = A006053(n+2) - A006053(n). - R. J. Mathar, Nov 16 2007
a(2*n) = A052975(n), a(2*n+1) = A060557(n). - Johannes W. Meijer, May 29 2010
G.f.: 1 / (1 - x / (1 - x / (1 + x / (1 + x / (1 - x))))). - Michael Somos, Apr 05 2012
a(-1 - n) = A052534(n). - Michael Somos, Apr 05 2012
a(n) = (2^n/7)*Sum_{r=1..6} (1-(-1)^r)*cos(Pi*r/7)^n*(1+cos(Pi*r/7)). - Herbert Kociemba, Sep 15 2020

Extensions

More terms from James Sellers, Jun 05 2000

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

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 34, 68, 116, 232, 396, 792, 1352, 2704, 4616, 9232, 15760, 31520, 53808, 107616, 183712, 367424, 627232, 1254464, 2141504, 4283008, 7311552, 14623104, 24963200, 49926400, 85229696, 170459392, 290992384, 581984768, 993510144, 1987020288, 3392055808
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Also (starting 3, 6, ...) the number of zig-zag paths from top to bottom of a rectangle of width 7 whose color is not that of the top right corner.
From Johannes W. Meijer, May 29 2010: (Start)
The a(n) represent the number of possible chess games, ignoring the fifty-move and the triple repetition rules, after n moves by White in the following position: White Ka1, Nh1, pawns a2, b6, c2, d6, f2, g3 and h2; Black Ka8, Bc8, pawns a3, b7, c3, d7, f3, g4 and h3.
Counts all paths of length n, n>=0, starting at the initial node on the path graph P_7, see the Maple program. (End)
Range of row n of the circular Pascal array of order 8. - Shaun V. Ault, Jun 05 2014.
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=7. - Herbert Kociemba, Sep 17 2020

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 20*x^6 + 34*x^7 + 68*x^8 + ...
		

Crossrefs

Programs

  • Maple
    with(GraphTheory): P:=7: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=31; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P); od: seq(a(n),n=0..nmax); # Johannes W. Meijer, May 29 2010
    X := j -> (-1)^(j/8) - (-1)^(1-j/8):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7])/8:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    CoefficientList[Series[(1+x-2x^2-x^3)/(1-4x^2+2x^4),{x,0,40}],x] (* or *) LinearRecurrence[{0,4,0,-2},{1,1,2,3},41] (* Harvey P. Dale, May 11 2011 *)
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,7],{n,0,40}]//Round (* Herbert Kociemba, Sep 17 2020 *)
  • PARI
    Vec((1+x-2*x^2-x^3)/(1-4*x^2+2*x^4)+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • PARI
    {a(n) = if( n<0, 0, polsym( x^4 - 4*x^2 + 2, n + n%2)[n + n%2 + 1] / (4 * (n%2 + 1)))}; /* Michael Somos, Feb 08 2015 */

Formula

a(0)=a(1)=1, a(2)=2, a(3)=3, a(n)=4*a(n-2)-2*a(n-4). - Harvey P. Dale, May 11 2011
a(n) = (2+sqrt(2+sqrt(2)))/8*(sqrt(2+sqrt(2)))^n + (2-sqrt(2+sqrt(2)))/8*(-sqrt(2+sqrt(2)))^n + (2+sqrt(2-sqrt(2)))/8*(sqrt(2-sqrt(2)))^n + (2-sqrt(2-sqrt(2)))/8*(-sqrt(2-sqrt(2)))^n. - Sergei N. Gladkovskii, Aug 23 2012
a(n) = A030435(n)/2. a(2*n) = A006012(n). a(2*n + 1) = A007052(n). - Michael Somos, Mar 06 2003
a(n) = (2^n/8)*Sum_{r=1..7} (1-(-1)^r)cos(Pi*r/8)^n*(1+cos(Pi*r/8)). - Herbert Kociemba, Sep 17 2020
E.g.f.: (2*cosh(r*x) + 2*cosh(s*x) + r*sinh(r*x) + s*sinh(s*x))/4, where r = sqrt(2 - sqrt(2)) and s = sqrt(2 + sqrt(2)). - Stefano Spezia, Jun 14 2023

Extensions

Comment and link added and typo in cross-reference corrected by Joseph Myers, Dec 24 2008, May 30 2010

A061551 Number of paths along a corridor width 8, starting from one side.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 69, 124, 241, 440, 846, 1560, 2977, 5525, 10490, 19551, 36994, 69142, 130532, 244419, 460737, 863788, 1626629, 3052100, 5743674, 10782928, 20283121, 38092457, 71632290, 134560491, 252989326, 475313762
Offset: 0

Views

Author

Henry Bottomley, May 16 2001

Keywords

Comments

Counts all paths of length n starting at initial node on the path graph P_8. - Paul Barry, May 11 2004
The a(n) represent the number of possible chess games, ignoring the fifty-move and the triple repetition rules, after n moves by White in the following position: White Ka1, pawns a2, b6, d2, d6 and g2; Black Ka8, Bc8, pawns a3, b7, d3, d7 and g3. - Johannes W. Meijer, May 29 2010
Define the 4 X 4 tridiagonal unit-primitive matrix (see [Jeffery]) M = A_{9,1} = [0,1,0,0; 1,0,1,0; 0,1,0,1; 0,0,1,1]; then a(n)=[M^n](4,4). - _L. Edson Jeffery, Mar 18 2011
a(n) is the length of n-th word derived by certain iterated substitutions on four letters {1,2,3,4} as follows. Define the substitution rules 1 -> {2}, 2 -> {1,3}, 3 -> {2,4}, 4 -> {3,4}, in which "," denotes concatenation, so 1 -> 2, 2 -> 13, 3 -> 24, 4 -> 34. Let w(k) be the k-th word formed by applying the substitution rules to each letter (digit) in word w(k-1), k>0, putting w(0) = 1. Then, for n=0,1,..., {w(n)} = {1, 2, 13, 224, 131334, 2242242434, 13133413133413342434, ...} in which {length(w(n))} = {1,1,2,3,6,10,...} = A061551. The maps 1 -> 2, etc., are given by the above matrix A_{9,1} by taking i -> {j : [A_{9,1}](i,j) <> 0}, i, j in {1,2,3,4}. Moreover, the entry in row 1 and column j of [A{9,1}]^n gives the relative frequency of the letter j in the n-th word w(n). Finally, the sum of the first-row entries of [A_{9,1}]^n again gives a(n), so obviously a(n) = sum of relative frequencies of each j in word w(n). - L. Edson Jeffery, Feb 06 2012
Range of row n of the circular Pascal array of order 9. - Shaun V. Ault, Jun 05 2014
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=8. - Herbert Kociemba, Sep 17 2020

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 20*x^6 + 35*x^7 + 69*x^8 + ....
		

Crossrefs

Narrower corridors effectively produce A000007, A000012, A016116, A000045, A038754, A028495, A030436, A061551, A178381, A336675, A336678.
An infinitely wide corridor (i.e., just one wall) would produce A001405.
Equivalently, the above mentioned corridor numbers are exactly the ranges of the circular Pascal array of order d = 2, 3, 4, 5, 6, 7, 8, respectively, and this is true for any natural number d greater than or equal to 2.
a(n) = A094718(8, n).
Cf. A030436 and A178381.

Programs

  • Maple
    a[0]:=1: a[1]:=1: a[2]:=2: a[3]:=3: a[4]:=6: a[5]:=10: a[6]:=20: a[7]:=35: for n from 8 to 33 do a[n]:=7*a[n-2]-15*a[n-4]+10*a[n-6]-a[n-8] od: seq(a[n],n=0..33); # Emeric Deutsch, Aug 14 2006
    with(GraphTheory): P:=8: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=33; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P); od: seq(a(n),n=0..nmax); # Johannes W. Meijer, May 29 2010
    X := j -> (-1)^(j/9) - (-1)^(1-j/9):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7])/9:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    LinearRecurrence[{1,3,-2,-1},{1,1,2,3},40] (* Harvey P. Dale, Dec 19 2011 *)
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,8],{n,0,40}]//Round (* Herbert Kociemba, Sep 17 2020 *)

Formula

a(n) = sum(b(n,i)) where b(n,0) = b(n,9) = 0, b(0,1)=1, b(0, n)=0 if n!=1 and b(n,i) = b(n-1,i) + b(n+1,i) if 0 < n < 9.
From Emeric Deutsch, Aug 14 2006: (Start)
G.f.: (1-2*x^2)/((1-x)*(1-3*x^2-x^3)).
a(n) = 7*a(n-2) - 15*a(n-4) + 10*a(n-6) - a(n-8). (End)
a(2*n) = A094854(n) and a(2*n+1) = A094855(n). - Johannes W. Meijer, May 29 2010
a(n) = a(n-1) + 3*a(n-2) - 2*a(n-3) - a(n-4), for n > 3, with {a(k)}={1,1,2,3}, k=0,1,2,3. - L. Edson Jeffery, Mar 18 2011
a(n) = A187498(3*n + 2). - L. Edson Jeffery, Mar 18 2011
a(n) = A205573(3,n). - L. Edson Jeffery, Feb 06 2012
G.f.: 1 / (1 - x / (1 - x / (1 + x / (1 + x / (1 - x / (1 - x / (1 + x))))))). - Michael Somos, Feb 08 2015
a(n) = 2^n/9*Sum_{r=1..8} (1-(-1)^r)cos(Pi*r/9)^n*(1+cos(Pi*r/9)). - Herbert Kociemba, Sep 17 2020

A128052 a(n) = (F(2*n-1) + F(2*n+1))*(5/6 - cos(2*Pi*n/3)/3), where F(n) = Fibonacci(n).

Original entry on oeis.org

1, 3, 7, 9, 47, 123, 161, 843, 2207, 2889, 15127, 39603, 51841, 271443, 710647, 930249, 4870847, 12752043, 16692641, 87403803, 228826127, 299537289, 1568397607, 4106118243, 5374978561, 28143753123, 73681302247, 96450076809, 505019158607, 1322157322203
Offset: 0

Views

Author

Paul Barry, Feb 13 2007

Keywords

Comments

The a(n+1) are the numerators of A178381(4*n+3)/A178381(4*n+2). For the denominators see A179133(n). - Johannes W. Meijer, Jul 01 2010

Crossrefs

Cf. A128053.
Cf. A179134. Trisection: A023039.

Programs

  • Magma
    I:=[1,3,7,9,47,123]; [n le 6 select I[n] else 18*Self(n-3)-Self(n-6): n in [1..30]]; // Vincenzo Librandi, Jul 17 2019
  • Maple
    with(combinat): nmax:=25; for n from 0 to nmax do a(n):= (fibonacci(2*n-1)+fibonacci(2*n+1))*(5/6-cos(2*Pi*n/3)/3) od: seq(a(n),n=0..nmax); # Johannes W. Meijer, Jul 01 2010
  • Mathematica
    LinearRecurrence[{0, 0, 18, 0, 0, -1}, {1, 3, 7, 9, 47, 123}, 40] (* Vincenzo Librandi, Jul 17 2019 *)

Formula

Lim_{n->infinity} A128052(n+1)/A179133(n) = 1 + cos(Pi/5). - Johannes W. Meijer, Jul 01 2010
a(n) = Lucas(2*n)*(Fibonacci(n) mod 2 + 1)/2, Lucas(n)=A000032, Fibonacci(n)=A000045. - Gary Detlefs, Jan 19 2001
From Colin Barker, Jun 27 2013: (Start)
a(n) = 18*a(n-3) - a(n-6).
G.f: -(3*x^5 + 7*x^4 + 9*x^3 - 7*x^2 - 3*x - 1) / ((x^2 - 3*x + 1)*(x^4 + 3*x^3 + 8*x^2 + 3*x + 1)). (End)
With L(n) the Lucas number A000032, a(n) = L(2*n)/2 or L(2*n) according as n is, or is not, divisible by 3. - David Callan, Jul 17 2019

A033191 Binomial transform of [ 1, 0, 1, 1, 3, 6, 15, 36, 91, 231, 595, ... ], which is essentially binomial(Fibonacci(k) + 1, 2).

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 132, 429, 1430, 4861, 16778, 58598, 206516, 732825, 2613834, 9358677, 33602822, 120902914, 435668420, 1571649221, 5674201118, 20497829133, 74079051906, 267803779710, 968355724724, 3502058316337, 12666676646162, 45818284122149
Offset: 0

Views

Author

Simon P. Norton

Keywords

Comments

Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 10 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = 1, s(2n) = 1. - Herbert Kociemba, Jun 14 2004
The sequence 1,2,5,14,... has g.f. 1/(1-2x-x^2/(1-2x-x^2/(1-2x-x^2/(1-2x)))) = (1-6x+10x^2-4x^3)/(1-8x+21x^2-20x^3+5x^4), and is the second binomial transform A001519 aerated. - Paul Barry, Dec 17 2009
Counts all paths of length (2*n), n>=0, starting and ending at the initial node on the path graph P_9, see the Maple program. - Johannes W. Meijer, May 29 2010

Examples

			1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 + 132*x^6 + 429*x^7 + 1430*x^8 + ...
		

Crossrefs

Cf. A033192.
Cf. A211216.

Programs

  • Maple
    with(GraphTheory): G:=PathGraph(9): A:= AdjacencyMatrix(G): nmax:=24; n2:=nmax*2: for n from 0 to n2 do B(n):=A^n; a(n):=B(n)[1,1]; od: seq(a(2*n),n=0..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    CoefficientList[Series[(1-7x+15x^2-10x^3+x^4)/(1-8x+21x^2-20x^3+5x^4), {x,0,30}],x] (* or *) Join[{1},LinearRecurrence[{8,-21,20,-5},{1,2,5,14}, 30]]  (* Harvey P. Dale, Apr 26 2011 *)
  • PARI
    {a(n) = local(A); A = 1; for( i=1, 8, A = 1 / (1 - x*A)); polcoeff( A + x * O(x^n), n)} /* Michael Somos, May 12 2012 */

Formula

G.f.: (1-7x+15x^2-10x^3+x^4)/(1-8x+21x^2-20x^3+5x^4). - Ralf Stephan, May 13 2003
From Herbert Kociemba, Jun 14 2004: (Start)
a(n) = (1/5)*Sum_{r=1..9} sin(r*Pi/10)^2*(2*cos(r*Pi/10))^(2n), n >= 1;
a(n) = 8*a(n-1) - 21*a(n-2) + 20*a(n-3) - 5*a(n-4), n >= 5. (End)
G.f.: 1 / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x )))))))). - Michael Somos, May 12 2012
Showing 1-10 of 17 results. Next