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

A007070 a(n) = 4*a(n-1) - 2*a(n-2) with a(0) = 1, a(1) = 4.

Original entry on oeis.org

1, 4, 14, 48, 164, 560, 1912, 6528, 22288, 76096, 259808, 887040, 3028544, 10340096, 35303296, 120532992, 411525376, 1405035520, 4797091328, 16378294272, 55918994432, 190919389184, 651839567872, 2225519493120, 7598398836736, 25942556360704, 88573427769344, 302408598355968
Offset: 0

Views

Author

Keywords

Comments

Joe Keane (jgk(AT)jgk.org) observes that this sequence (beginning at 4) is "size of raises in pot-limit poker, one blind, maximum raising."
It appears that this sequence is the BinomialMean transform of A002315 - see A075271. - John W. Layman, Oct 02 2002
Number of (s(0), s(1), ..., s(2n+3)) such that 0 < s(i) < 8 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+3, s(0) = 1, s(2n+3) = 4. - Herbert Kociemba, Jun 11 2004
a(n) = number of distinct matrix products in (A+B+C+D)^n where commutators [A,B]=[C,D]=0 but neither A nor B commutes with C or D. - Paul D. Hanna and Joshua Zucker, Feb 01 2006
The n-th term of the sequence is the entry (1,2) in the n-th power of the matrix M=[1,-1;-1,3]. - Simone Severini, Feb 15 2006
Hankel transform of this sequence is [1,-2,0,0,0,0,0,0,0,0,0,...]. - Philippe Deléham, Nov 21 2007
A204089 convolved with A000225, e.g., a(4) = 164 = (1*31 + 1*15 + 4*7 + 14*3 + 48*1) = (31 + 15 + 28 + 42 + 48). - Gary W. Adamson, Dec 23 2008
Equals INVERT transform of A000225: (1, 3, 7, 15, 31, ...). - Gary W. Adamson, May 03 2009
For n>=1, a(n-1) is the number of generalized compositions of n when there are 2^i-1 different types of the part i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Binomial transform of A078057. - R. J. Mathar, Mar 28 2011
Pisano period lengths: 1, 1, 8, 1, 24, 8, 6, 1, 24, 24, 120, 8, 168, 6, 24, 1, 8, 24, 360, 24, ... . - R. J. Mathar, Aug 10 2012
a(n) is the diagonal of array A228405. - Richard R. Forberg, Sep 02 2013
From Wolfdieter Lang, Oct 01 2013: (Start)
a(n) appears together with A106731, both interspersed with zeros, in the representation of nonnegative powers of the algebraic number rho(8) = 2*cos(Pi/8) = A179260 of degree 4, which is the length ratio of the smallest diagonal and the side in the regular octagon.
The minimal polynomial for rho(8) is C(8,x) = x^4 - 4*x^2 + 2, hence rho(8)^n = A(n+1)*1 + A(n)*rho(8) + B(n+1)*rho(8)^2 + B(n)*rho(8)^3, n >= 0, with A(2*k) = 0, k >= 0, A(1) = 1, A(2*k+1) = A106731(k-1), k >= 1, and B(2*k) = 0, k >= 0, B(1) = 0, B(2*k+1) = a(k-1), k >= 1. See also the P. Steinbach reference given under A049310. (End)
The ratio a(n)/A006012(n) converges to 1+sqrt(2). - Karl V. Keller, Jr., May 16 2015
From Tom Copeland, Dec 04 2015: (Start)
An aerated version of this sequence is given by the o.g.f. = 1 / (1 - 4 x^2 + 2 x^4) = 1 / [x^4 a_4(1/x)] = 1 / determinant(I - x M) = exp[-log(1 -4 x + 2 x^4)], where M is the adjacency matrix for the simple Lie algebra B_4 given in A265185 with the characteristic polynomial a_4(x) = x^4 - 4 x^2 + 2 = 2 T_4(x/2) = A127672(4,x), where T denotes a Chebyshev polynomial of the first kind.
A133314 relates a(n) to the reciprocal of the e.g.f. 1 - 4 x + 4 x^2/2!. (End)
a(n) is the number of vertices of the Minkowski sum of n simplices with vertices e_(2*i+1), e_(2*i+2), e_(2*i+3), e_(2*i+4) for i=0,...,n-1, where e_i is a standard basis vector. - Alejandro H. Morales, Oct 03 2022

Examples

			a(3) = 48 = 3 * 4 + 4 + 1 + 1 = 3*a(2) + a(1) + a(0) + 1.
Example for the octagon rho(8) powers: rho(8)^4  = 2 + sqrt(2) = -2*1 + 4*rho(8)^2  = A(5)*1 + A(4)*rho(8) + B(5)*rho(8)^2 + B(4)*rho(8)^3, with a(5) = A106731(1) = -2, B(5) = a(1) = 4, A(4) = 0, B(4) = 0. - _Wolfdieter Lang_, Oct 01 2013
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A059474. - David W. Wilson, Aug 14 2006
Equals 2 * A003480, n>0.
Row sums of A140071.

Programs

  • Haskell
    a007070 n = a007070_list !! n
    a007070_list = 1 : 4 : (map (* 2) $ zipWith (-)
       (tail $ map (* 2) a007070_list) a007070_list)
    -- Reinhard Zumkeller, Jan 16 2012
  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-8); S:=[ ((4+r)^(1+n)-(4-r)^(1+n))/((2^(1+n))*r): n in [0..20] ]; [ Integers()!S[j]: j in [1..#S] ]; // Vincenzo Librandi, Mar 27 2011
    
  • Magma
    [n le 2 select 3*n-2 else 4*Self(n-1)-2*Self(n-2): n in [1..23]];  // Bruno Berselli, Mar 28 2011
    
  • Maple
    A007070 :=proc(n) option remember; if n=0 then 1 elif n=1 then 4 else 4*procname(n-1)-2*procname(n-2); fi; end:
    seq(A007070(n), n=0..30); # Wesley Ivan Hurt, Dec 06 2015
  • Mathematica
    LinearRecurrence[{4,-2}, {1,4}, 30] (* Harvey P. Dale, Sep 16 2014 *)
  • PARI
    a(n)=polcoeff(1/(1-4*x+2*x^2)+x*O(x^n),n)
    
  • PARI
    a(n)=if(n<1,1,ceil((2+sqrt(2))*a(n-1)))
    
  • Sage
    [lucas_number1(n,4,2) for n in range(1, 24)]# Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: 1/(1 - 4*x + 2*x^2).
Preceded by 0, this is the binomial transform of the Pell numbers A000129. Its e.g.f. is then exp(2*x)*sinh(sqrt(2)*x)/sqrt(2). - Paul Barry, May 09 2003
a(n) = ((2+sqrt(2))^(n+1) - (2-sqrt(2))^(n+1))/sqrt(8). - Al Hakanson (hawkuu(AT)gmail.com), Dec 27 2008, corrected Mar 28 2011
a(n) = (2 - sqrt(2))^n*(1/2 - sqrt(2)/2) + (2 + sqrt(2))^n*(1/2 + sqrt(2)/2). - Paul Barry, May 09 2003
a(n) = ceiling((2 + sqrt(2))*a(n-1)). - Benoit Cloitre, Aug 15 2003
a(n) = U(n, sqrt(2))*sqrt(2)^n. - Paul Barry, Nov 19 2003
a(n) = (1/4)*Sum_{r=1..7} sin(r*Pi/8)*sin(r*Pi/2)*(2*cos(r*Pi/8))^(2*n+3). - Herbert Kociemba, Jun 11 2004
a(n) = center term in M^n * [1 1 1], where M = the 3 X 3 matrix [1 1 1 / 1 2 1 / 1 1 1]. M^n * [1 1 1] = [A007052(n) a(n) A007052(n)]. E.g., a(3) = 48 since M^3 * [1 1 1] = [34 48 34], where 34 = A007052(3). - Gary W. Adamson, Dec 18 2004
This is the binomial mean transform of A002307. See Spivey and Steil (2006). - Michael Z. Spivey (mspivey(AT)ups.edu), Feb 26 2006
a(2n) = Sum_{r=0..n} 2^(2n-1-r)*(4*binomial(2n-1,2r) + 3*binomial(2n-1,2r+1)) a(2n-1) = Sum_{r=0..n} 2^(2n-2-r)*(4*binomial(2n-2,2r) + 3*binomial(2n-2,2r+1)). - Jeffrey Liese, Oct 12 2006
a(n) = 3*a(n - 1) + a(n - 2) + a(n - 3) + ... + a(0) + 1. - Gary W. Adamson, Feb 18 2011
G.f.: 1/(1 - 4*x + 2*x^2) = 1/( x*(1 + U(0)) ) - 1/x where U(k)= 1 - 2^k/(1 - x/(x - 2^k/U(k+1) )); (continued fraction 3rd kind, 3-step). - Sergei N. Gladkovskii, Dec 05 2012
G.f.: A(x) = G(0)/(1-2*x) where G(k) = 1 + 2*x/(1 - 2*x - x*(1-2*x)/(x + (1-2*x)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 04 2013
G.f.: G(0)/(2*x) - 1/x, where G(k) = 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) - (1-x)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
a(n-1) = Sum_{k=0..n} binomial(2*n, n+k)*(k|8) where (k|8) is the Kronecker symbol. - Greg Dresden, Oct 11 2022
E.g.f.: exp(2*x)*(cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x)). - Stefano Spezia, May 20 2024

A204091 The number of 1 X n Haunted Mirror Maze puzzles with a unique solution ending with a mirror.

Original entry on oeis.org

1, 2, 10, 46, 210, 958, 4370, 19934, 90930, 414782, 1892050, 8630686, 39369330, 179585278, 819187730, 3736768094, 17045465010, 77753788862, 354678014290, 1617882493726, 7380056440050, 33664517212798, 153562473183890, 700483331493854, 3195291711101490
Offset: 0

Views

Author

David Nacin, Jan 10 2012

Keywords

Comments

The final slot can refer to a mirror of either type ('/' or '\'.)
A204092 counts the situation dropping the requirement that a board ends with a mirror. A204089 counts the situation where all mirrors have the same orientation. A204090 counts the boards with same orientation where the last square need not be a mirror.

Examples

			For n=2 we get the following ten boards:
('Z', '/')
('Z', '|')
('V', '/')
('V', '|')
('G', '/')
('G', '|')
('/', '/')
('/', '|')
('|', '/')
('|', '|')
		

Crossrefs

Apart from signs and the initial term, same as A106709.

Programs

  • Mathematica
    Join[{1}, LinearRecurrence[{5, -2}, {2, 10}, 40]]
  • PARI
    Vec((1-x)*(1-2*x)/(1-5*x+2*x^2) + O(x^30)) \\ Colin Barker, Nov 26 2016
  • Python
    def a(n, d={0:1,1:2,2:10}):
      if n in d:
        return d[n]
      d[n]=5*a(n-1) - 2*a(n-2)
      return d[n]
    for n in range(25):
      print(a(n), end=', ')
    
  • Python
    from itertools import product
    def Lprint(n):
        print("The following generate boards with a unique solution")
        s = 0
        for x in product(["Z", "V", "G", "/", "|"], repeat=n):
            if x[-1] == "/" or x[-1] == "|":
                y = list(x) # Splitting x up into a list pieces
                z = list()
                while y:
                    if "/" in y or "|" in y:
                        if "/" in y and "|" in y:
                            m = min(y.index("/"), y.index("|"))
                        else:
                            if "/" in y:
                                m = y.index("/")
                            else:
                                m = y.index("|")
                        if y[0] not in ["/", "|"]:
                            z.append(y[:m])
                        y = y[m + 1 :]
                    else:
                        z.append(y)
                        y = []
                goodword = True
                for w in z: # For each element in the list checking for Z&V together
                    if "Z" in w and "V" in w:
                        goodword = False
                if goodword:
                    s += 1
                    print(x)
        return s
    print(Lprint(5))
    

Formula

a(n) = 5*a(n-1) - 2*a(n-2) with a(1) = 2, a(2) = 10.
a(n) = 2 * sum_{i=0}^{i=n-1} a(n)(2^(n-i)-1), a(0) = 1.
G.f.: (1-x)*(1-2*x) / (1-5*x+2*x^2).
a(n) = (2^(1-n) * ((5+sqrt(17))^n - (5-sqrt(17))^n))/sqrt(17) for n>0. - Colin Barker, Nov 26 2016

A204090 The number of 1 X n Haunted Mirror Maze puzzles with a unique solution where mirror orientation is fixed.

Original entry on oeis.org

1, 2, 8, 34, 134, 498, 1786, 6274, 21778, 75074, 257762, 882946, 3020354, 10323714, 35270530, 120467458, 411394306, 1404773378, 4796567042, 16377245698, 55916897282, 190915194882, 651831179266, 2225502715906, 7598365282306, 25942489251842, 88573293551618
Offset: 0

Views

Author

David Nacin, Jan 10 2012

Keywords

Comments

Since the uniqueness of a solution is unaffected by the orientation of the mirrors in this 1 X n case, we assume mirror orientation is fixed for this sequence.
Connected to A204089, which counts the 1 X n boards with unique solutions that end in a mirror. Dropping the mirror orientation restriction would give A204092. Dropping the orientation restriction and requiring a mirror in the last slot gives A204091.

Examples

			For n=3 we would get the following 34 boards with unique solutions:
('Z', 'Z', '/')
('Z', 'G', '/')
('Z', '/', 'Z')
('Z', '/', 'V')
('Z', '/', 'G')
('Z', '/', '/')
('V', 'V', '/')
('V', 'G', '/')
('V', '/', 'Z')
('V', '/', 'V')
('V', '/', 'G')
('V', '/', '/')
('G', 'Z', '/')
('G', 'V', '/')
('G', 'G', 'G')
('G', 'G', '/')
('G', '/', 'Z')
('G', '/', 'V')
('G', '/', 'G')
('G', '/', '/')
('/', 'Z', 'Z')
('/', 'Z', 'G')
('/', 'Z', '/')
('/', 'V', 'V')
('/', 'V', 'G')
('/', 'V', '/')
('/', 'G', 'Z')
('/', 'G', 'V')
('/', 'G', 'G')
('/', 'G', '/')
('/', '/', 'Z')
('/', '/', 'V')
('/', '/', 'G')
('/', '/', '/')
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7, -16, 14, -4}, {1, 2, 8, 34}, 40]
  • PARI
    Vec((1-5*x+10*x^2-4*x^3) / ((1-x)*(1-2*x)*(1-4*x+2*x^2)) + O(x^30)) \\ Colin Barker, Nov 26 2016
  • Python
    def a(n, d={0:1,1:2,2:8,3:34}):
     if n in d:
      return d[n]
     d[n]=7*a(n-1) - 16*a(n-2) + 14*a(n-3) - 4*a(n-4)
     return d[n]
    
  • Python
    #Produces a(n) through enumeration and also displays boards:
    def Hprint(n):
     print('The following generate boards with a unique solution')
     s=0
     for x in product(['Z','V','G','/'],repeat=n):
      #Taking care of the no mirror case
      if '/' not in x:
       if 'Z' not in x and 'V' not in x:
        s+=1
        print(x)
      else:
       #Splitting x up into a list pieces
       y=list(x)
       z=list()
       while y:
        if '/' in y:
         if y[0] != '/': #Don't need to add blank pieces to z
          z.append(y[:y.index('/')])
         y=y[y.index('/')+1:]
        else:
         z.append(y)
         y=[]
       #For each element in the list checking for Z&V together
       goodword=True
       for w in z:
        if 'Z' in w and 'V' in w:
         goodword=False
       if goodword:
        s+=1
        print(x)
     return s
    

Formula

G.f.: (1 - 5*x + 10*x^2 - 4*x^3) / ((1 - x)*(1 - 2*x)*(1 - 4*x + 2*x^2)).
a(n) = A204089(n+1) - 2^(n+1) + 2.
a(n) = 7*a(n-1) - 16*a(n-2) + 14*a(n-3) - 4*a(n-4), a(0)=1, a(1)=2, a(2)=8, a(3)=34.
a(n) = 2 - 2^(1+n) + ((2+sqrt(2))^(1+n) - (2-sqrt(2))^(1+n))/(2*sqrt(2)). - Colin Barker, Nov 26 2016

A204092 The number of 1 by n Haunted Mirror Maze puzzles with a unique solution.

Original entry on oeis.org

1, 3, 17, 91, 449, 2123, 9841, 45211, 206881, 945003, 4313297, 19680571, 89784449, 409577483, 1868351281, 8522666971, 38876763361, 177338745003, 808940722577, 3690027171451, 16832256509249, 76781232397643, 350241657358321, 1597645838773531, 7287745912705441
Offset: 0

Views

Author

David Nacin, Jan 10 2012

Keywords

Comments

Requiring the last slot contain a mirror results in A204091. Fixing orientation of mirrors results in A204090. Fixing orientation and requiring the last slot be a mirror results in A204089.

Examples

			The following 17 boards illustrate K(2):
('Z', '/')
('Z', '|')
('V', '/')
('V', '|')
('G', 'G')
('G', '/')
('G', '|')
('/', 'Z')
('/', 'V')
('/', 'G')
('/', '/')
('/', '|')
('|', 'Z')
('|', 'V')
('|', 'G')
('|', '/')
('|', '|')
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8, -19, 16, -4}, {1, 3, 17, 91}, 40]
  • Python
    def a(n, d={0:1,1:3,2:17,3:91}):
     if n in d:
      return d[n]
     d[n]=8*a(n-1) - 19*a(n-2) + 16*a(n-3) - 4*a(n-4)
     return d[n]
    
  • Python
    #Produces a(n) through enumeration and also displays boards:
    def Kprint(n):
     print('The following generate boards with a unique solution')
     s=0
     for x in product(['Z','V','G','/','|'],repeat=n):
      #Taking care of the no mirror case
      if '/' not in x and '|' not in x:
       if 'Z' not in x and 'V' not in x:
        s+=1
        print(x)
      else:
       #Splitting x up into a list pieces
       y=list(x)
       z=list()
       while y:
        if '/' in y or '|' in y:
         if '/' in y and '|' in y:
          m = min(y.index('/'), y.index('|'))
         else:
          if '/' in y:
           m=y.index('/')
          else:
           m=y.index('|')
         if y[0] not in ['/','|']: #Don't need to add blank pieces to z
          z.append(y[:m])
         y=y[m+1:]
        else:
         z.append(y)
         y=[]
       #For each element in the list checking for Z&V together
       goodword=True
       for w in z:
        if 'Z' in w and 'V' in w:
         goodword=False
       if goodword:
        s+=1
        print(x)
     return s

Formula

a(n) = A204091(n+1)/2 - 2^(n+1) + 2.
a(n) = 8*a(n-1) - 19*a(n-2) + 16*a(n-3) - 4*a(n-4), a(0) = 1, a(1) = 3, a(2) = 17, a(3) = 91.
G.f.: (1-5x+12x^2-4x^3)/((1-x)(1-2x)(1-5x+2x^2)).

A206306 Riordan array (1, x/(1-3*x+2*x^2)).

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 7, 6, 1, 0, 15, 23, 9, 1, 0, 31, 72, 48, 12, 1, 0, 63, 201, 198, 82, 15, 1, 0, 127, 522, 699, 420, 125, 18, 1, 0, 255, 1291, 2223, 1795, 765, 177, 21, 1, 0, 511, 3084, 6562, 6768, 3840, 1260, 238, 24, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 06 2012

Keywords

Comments

The convolution triangle of the Mersenne numbers A000225. - Peter Luschny, Oct 09 2022

Examples

			Triangle begins:
  1;
  0,    1;
  0,    3,    1;
  0,    7,    6,     1;
  0,   15,   23,     9,     1;
  0,   31,   72,    48,    12,     1;
  0,   63,  201,   198,    82,    15,    1;
  0,  127,  522,   699,   420,   125,   18,    1;
  0,  255, 1291,  2223,  1795,   765,  177,   21,   1;
  0,  511, 3084,  6562,  6768,  3840, 1260,  238,  24,  1;
  0, 1023, 7181, 18324, 23276, 16758, 7266, 1932, 308, 27,  1;
		

Crossrefs

Programs

  • Magma
    function T(n,k) // T = A206306
      if k lt 0 or k gt n then return 0;
      elif k eq n then return 1;
      elif k eq 0 then return 0;
      else return 3*T(n-1, k) +T(n-1, k-1) -2*T(n-2, k);
      end if; return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 20 2022
    
  • Maple
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> 2^n - 1); # Peter Luschny, Oct 09 2022
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==n, 1, If[k==0, 0, 3*T[n- 1, k] +T[n-1, k-1] -2*T[n-2, k]]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 20 2022 *)
  • SageMath
    def T(n,k): # T = A206306
        if (k<0 or k>n): return 0
        elif (k==n): return 1
        elif (k==0): return 0
        else: return 3*T(n-1, k) +T(n-1, k-1) -2*T(n-2, k)
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Dec 20 2022

Formula

Triangle T(n,k), read by rows, given by (0, 3, -2/3, 2/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Diagonals sums are even-indexed Fibonacci numbers.
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A204089(n), A204091(n) for x = 0, 1, 2 respectively.
G.f.: (1-3*x+2*x^)/(1-(3+y)*x+2*x^2).
From Philippe Deléham, Nov 17 2013; corrected Feb 13 2020: (Start)
T(n, n) = 1.
T(n+1, n) = 3n = A008585(n).
T(n+2, n) = A062725(n).
T(n,k) = 3*T(n-1,k)+T(n-1,k-1)-2*T(n-2,k), T(0,0)=T(1,1)=T(2,2)=1, T(1,0)=T(2,0)=0, T(2,1)=3, T(n,k)=0 if k<0 or if k>n. (End)
From G. C. Greubel, Dec 20 2022: (Start)
Sum_{k=0..n} (-1)^k*T(n,k) = [n=1] - A009545(n).
Sum_{k=0..n} (-2)^k*T(n,k) = [n=1] + A078020(n+1).
T(2*n, n+1) = A045741(n+2), n >= 0.
T(2*n+1, n+1) = A244038(n). (End)

A217730 Expansion of (1+2*x-x^3)/(1-4*x^2+2*x^4).

Original entry on oeis.org

1, 2, 4, 7, 14, 24, 48, 82, 164, 280, 560, 956, 1912, 3264, 6528, 11144, 22288, 38048, 76096, 129904, 259808, 443520, 887040, 1514272, 3028544, 5170048, 10340096, 17651648, 35303296, 60266496, 120532992, 205762688, 411525376, 702517760, 1405035520, 2398545664, 4797091328, 8189147136, 16378294272, 27959497216
Offset: 0

Views

Author

Philippe Deléham, Mar 22 2013

Keywords

Comments

In general, a(n,j,m) = Sum_{r=1..m} (2^n*(1-(-1)^r)*cos(Pi*r/(m+1))^n*cot(Pi*r/(2*(m+1)))*sin(j*Pi*r/(m+1)))/(m+1) gives the number of paths of length n starting at the j-th node on the path graph P_m. Here we have the case m=7 and j=3. - Herbert Kociemba, Sep 17 2020

Crossrefs

First differences are in A062113.

Programs

  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+2*x-x^3)/(1-4*x^2+2*x^4))); // Bruno Berselli, Mar 22 2013
    
  • Mathematica
    CoefficientList[Series[(1 + 2 x - x^3)/(1 - 4 x^2 + 2 x^4), {x, 0, 40}], x] (* Bruno Berselli, Mar 22 2013 *)
    a[n_,j_,m_]:=Sum[(2^(n+1)Cos[Pi r/(m+1)]^n Cot[Pi r/(2(m+1))] Sin[j Pi r/(m+1)])/(m+1),{r,1,m,2}]
    Table[a[n,3,7],{n,0,40}]//Round (* Herbert Kociemba, Sep 17 2020 *)
  • Maxima
    makelist(coeff(taylor((1+2*x-x^3)/(1-4*x^2+2*x^4), x, 0, n), x, n), n, 0, 40); /* Bruno Berselli, Mar 22 2013 */

Formula

G.f.: (1+x)*(1+x-x^2)/(1-4*x^2+2*x^4).
a(n) = Sum_{k=0..n} A216232(n-k,k).
a(n) = 4*a(n-2) - 2*a(n-4) for n>=4, a(0)=1, a(1)=2, a(2)=4, a(3)=7.
a(2*n) = A007070(n), a(2*n-1) = a(2*n)/2 = A007070(n)/2.
a(n)*a(n+1)-a(n-1)*a(n+2) = (1-(-1)^n)*2^floor(n/2-1) for n>0. - Bruno Berselli, Mar 22 2013
a(n) = Sum_{r=1..7} (2^n*(1-(-1)^r)*cos(Pi*r/8)^n*cot(Pi*r/16)*sin(3*Pi*r/8))/8. - Herbert Kociemba, Sep 17 2020
Showing 1-6 of 6 results.