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

A005248 Bisection of Lucas numbers: a(n) = L(2*n) = A000032(2*n).

Original entry on oeis.org

2, 3, 7, 18, 47, 123, 322, 843, 2207, 5778, 15127, 39603, 103682, 271443, 710647, 1860498, 4870847, 12752043, 33385282, 87403803, 228826127, 599074578, 1568397607, 4106118243, 10749957122, 28143753123, 73681302247, 192900153618, 505019158607, 1322157322203
Offset: 0

Views

Author

Keywords

Comments

Drop initial 2; then iterates of A050411 do not diverge for these starting values. - David W. Wilson
All nonnegative integer solutions of Pell equation a(n)^2 - 5*b(n)^2 = +4 together with b(n)=A001906(n), n>=0. - Wolfdieter Lang, Aug 31 2004
a(n+1) = B^(n)AB(1), n>=0, with compositions of Wythoff's complementary A(n):=A000201(n) and B(n)=A001950(n) sequences. See the W. Lang link under A135817 for the Wythoff representation of numbers (with A as 1 and B as 0 and the argument 1 omitted). E.g., 3=`10`, 7=`010`, 18=`0010`, 47=`00010`, ..., in Wythoff code. a(0) = 2 = B(1) in Wythoff code.
Output of Tesler's formula (as well as that of Lu and Wu) for the number of perfect matchings of an m X n Möbius band where m and n are both even specializes to this sequence for m=2. - Sarah-Marie Belcastro, Jul 04 2009
Numbers having two 1's in their base-phi representation. - Robert G. Wilson v, Sep 13 2010
Pisano period lengths: 1, 3, 4, 3, 2, 12, 8, 6, 12, 6, 5, 12, 14, 24, 4, 12, 18, 12, 9, 6, ... - R. J. Mathar, Aug 10 2012
From Wolfdieter Lang, Feb 18 2013: (Start)
a(n) is also one half of the total number of round trips, each of length 2*n, on the graph P_4 (o-o-o-o) (the simple path with 4 points (vertices) and 3 lines (or edges)). See the array and triangle A198632 for the general case of the graph P_N (there N is n and the length is l=2*k).
O.g.f. for w(4,l) (with zeros for odd l): y*(d/dy)S(4,y)/S(4,y) with y=1/x and Chebyshev S-polynomials (coefficients A049310). See also A198632 for a rewritten form. One half of this o.g.f. for x -> sqrt(x) produces the g.f. (2-3x)/(1-3x+x^2) given below. (End)
Solutions (x, y) = (a(n), a(n+1)) satisfying x^2 + y^2 = 3xy - 5. - Michel Lagneau, Feb 01 2014
Except for the first term, positive values of x (or y) satisfying x^2 - 7xy + y^2 + 45 = 0. - Colin Barker, Feb 16 2014
Except for the first term, positive values of x (or y) satisfying x^2 - 18xy + y^2 + 320 = 0. - Colin Barker, Feb 16 2014
a(n) are the numbers such that a(n)^2-2 are Lucas numbers. - Michel Lagneau, Jul 22 2014
All sequences of this form, b(n+1) = 3*b(n) - b(n-1), regardless of initial values, which includes this sequence, yield this sequence as follows: a(n) = (b(j+n) + b(j-n))/b(j), for any j, except where b(j) = 0. Also note formula below relating this a(n) to all sequences of the form G(n+1) = G(n) + G(n-1). - Richard R. Forberg, Nov 18 2014
A non-simple continued fraction expansion for F(2n*(k+1))/F(2nk) k>=1 is a(n) + (-1)/(a(n) + (-1)/(a(n) + ... + (-1)/a(n))) where a(n) appears exactly k times (F(n) denotes the n-th Fibonacci number). E.g., F(16)/F(12) equals 7 + (-1)/(7 + (-1)/7). Furthermore, these a(n) are exactly the positive integers k such that the non-simple infinite continued fraction k + (-1)/(k + (-1)/(k + (-1)/(k + ...))) belongs to Q(sqrt(5)). Compare to Benoit Cloitre and Thomas Baruchel's comments at A002878. - Greg Dresden, Aug 13 2019
For n >= 1, a(n) is the number of cyclic up-down words of length 2*n over an alphabet of size 3. - Sela Fried, Apr 08 2025

Examples

			G.f. = 2 + 3*x + 7*x^2 + 18*x^3 + 47*x^4 + 123*x^5 + 322*x^6 + 843*x^7 + ... - _Michael Somos_, Aug 11 2009
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Richard P. Stanley, Enumerative combinatorics, Vol. 2. Volume 62 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge, 1999.

Crossrefs

Cf. A000032, A002878 (odd-indexed Lucas numbers), A001906 (Chebyshev S(n-1, 3)), a(n) = sqrt(4+5*A001906(n)^2), A228842.
a(n) = A005592(n)+1 = A004146(n)+2 = A065034(n)-1.
First differences of A002878. Pairwise sums of A001519. First row of array A103997.
Cf. A153415, A201157. Also Lucas(k*n): A000032 (k = 1), A014448 (k = 3), A056854 (k = 4), A001946 (k = 5), A087215 (k = 6), A087281 (k = 7), A087265 (k = 8), A087287 (k = 9), A065705 (k = 10), A089772 (k = 11), A089775 (k = 12).

Programs

  • Haskell
    a005248 n = a005248_list !! n
    a005248_list = zipWith (+) (tail a001519_list) a001519_list
    -- Reinhard Zumkeller, Jan 11 2012
  • Magma
    [Lucas(2*n) : n in [0..100]]; // Vincenzo Librandi, Apr 14 2011
    
  • Maple
    a:= n-> (<<2|3>>. <<3|1>, <-1|0>>^n)[1$2]: seq(a(n), n=0..30); # Alois P. Heinz, Jul 31 2008
    with(combinat): seq(5*fibonacci(n)^2+2*(-1)^n, n= 0..26);
  • Mathematica
    a[0] = 2; a[1] = 3; a[n_] := 3a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 27}] (* Robert G. Wilson v, Jan 30 2004 *)
    Fibonacci[1 + 2n] + 1/2 (-Fibonacci[2n] + LucasL[2n]) (* Tesler. Sarah-Marie Belcastro, Jul 04 2009 *)
    LinearRecurrence[{3, -1}, {2, 3}, 50] (* Sture Sjöstedt, Nov 27 2011 *)
    LucasL[Range[0,60,2]] (* Harvey P. Dale, Sep 30 2014 *)
  • PARI
    {a(n) = fibonacci(2*n + 1) + fibonacci(2*n - 1)}; /* Michael Somos, Jun 23 2002 */
    
  • PARI
    {a(n) = 2 * subst( poltchebi(n), x, 3/2)}; /* Michael Somos, Jun 28 2003 */
    
  • Sage
    [lucas_number2(n,3,1) for n in range(37)] # Zerinvary Lajos, Jun 25 2008
    

Formula

a(n) = Fibonacci(2*n-1) + Fibonacci(2*n+1).
G.f.: (2-3*x)/(1-3*x+x^2). - Simon Plouffe in his 1992 dissertation.
a(n) = S(n, 3) - S(n-2, 3) = 2*T(n, 3/2) with S(n-1, 3) = A001906(n) and S(-2, x) = -1. U(n, x)=S(n, 2*x) and T(n, x) are Chebyshev's U- and T-polynomials.
a(n) = a(k)*a(n - k) - a(n - 2k) for all k, i.e., a(n) = 2*a(n) - a(n) = 3*a(n - 1) - a(n - 2) = 7*a(n - 2) - a(n - 4) = 18*a(n - 3) - a(n - 6) = 47*a(n - 4) - a(n - 8) etc., a(2n) = a(n)^2 - 2. - Henry Bottomley, May 08 2001
a(n) = A060924(n-1, 0) = 3*A001906(n) - 2*A001906(n-1), n >= 1. - Wolfdieter Lang, Apr 26 2001
a(n) ~ phi^(2*n) where phi=(1+sqrt(5))/2. - Joe Keane (jgk(AT)jgk.org), May 15 2002
a(0)=2, a(1)=3, a(n) = 3*a(n-1) - a(n-2) = a(-n). - Michael Somos, Jun 28 2003
a(n) = phi^(2*n) + phi^(-2*n) where phi=(sqrt(5)+1)/2, the golden ratio. E.g., a(4)=47 because phi^(8) + phi^(-8) = 47. - Dennis P. Walsh, Jul 24 2003
With interpolated zeros, trace(A^n)/4, where A is the adjacency matrix of path graph P_4. Binomial transform is then A049680. - Paul Barry, Apr 24 2004
a(n) = (floor((3+sqrt(5))^n) + 1)/2^n. - Lekraj Beedassy, Oct 22 2004
a(n) = ((3-sqrt(5))^n + (3+sqrt(5))^n)/2^n (Note: substituting the number 1 for 3 in the last equation gives A000204, substituting 5 for 3 gives A020876). - Creighton Dement, Apr 19 2005
a(n) = (1/(n+1/2))*Sum_{k=0..n} B(2k)*L(2n+1-2k)*binomial(2n+1, 2k) where B(2k) is the (2k)-th Bernoulli number. - Benoit Cloitre, Nov 02 2005
a(n) = term (1,1) in the 1 X 2 matrix [2,3] . [3,1; -1,0]^n. - Alois P. Heinz, Jul 31 2008
a(n) = 2*cosh(2*n*psi), where psi=log((1+sqrt(5))/2). - Al Hakanson, Mar 21 2009
From Sarah-Marie Belcastro, Jul 04 2009: (Start)
a(n) - (a(n) - F(2n))/2 - F(2n+1) = 0. (Tesler)
Product_{r=1..n} (1 + 4*(sin((4r-1)*Pi/(4n)))^2). (Lu/Wu) (End)
a(n) = Fibonacci(2n+6) mod Fibonacci(2n+2), n > 1. - Gary Detlefs, Nov 22 2010
a(n) = 5*Fibonacci(n)^2 + 2*(-1)^n. - Gary Detlefs, Nov 22 2010
a(n) = A033888(n)/A001906(n), n > 0. - Gary Detlefs, Dec 26 2010
a(n) = 2^(2*n) * Sum_{k=1..2} (cos(k*Pi/5))^(2*n). - L. Edson Jeffery, Jan 21 2012
From Peter Bala, Jan 04 2013: (Start)
Let F(x) = Product_{n>=0} (1 + x^(4*n+1))/(1 + x^(4*n+3)). Let alpha = 1/2*(3 - sqrt(5)). This sequence gives the simple continued fraction expansion of 1 + F(alpha) = 2.31829 56058 81914 31334 ... = 2 + 1/(3 + 1/(7 + 1/(18 + ...))).
Also F(-alpha) = 0.64985 97768 07374 32950 has the continued fraction representation 1 - 1/(3 - 1/(7 - 1/(18 - ...))) and the simple continued fraction expansion 1/(1 + 1/((3-2) + 1/(1 + 1/((7-2) + 1/(1 + 1/((18-2) + 1/(1 + ...))))))).
F(alpha)*F(-alpha) has the simple continued fraction expansion 1/(1 + 1/((3^2-4) + 1/(1 + 1/((7^2-4) + 1/(1 + 1/((18^2-4) + 1/(1 + ...))))))).
Added Oct 13 2019: 1/2 + 1/2*F(alpha)/F(-alpha) = 1.5142923542... has the simple continued fraction expansion 1 + 1/((3 - 2) + 1/(1 + 1/((18 - 2) + 1/(1 + 1/(123 - 2) + 1/(1 + ...))))). (End)
G.f.: (W(0)+6)/(5*x), where W(k) = 5*x*k + x - 6 + 6*x*(5*k-9)/W(k+1) (continued fraction). - Sergei N. Gladkovskii, Aug 19 2013
Sum_{n >= 1} 1/( a(n) - 5/a(n) ) = 1. Compare with A001906, A002878 and A023039. - Peter Bala, Nov 29 2013
0 = a(n) * a(n+2) - a(n+1)^2 - 5 for all n in Z. - Michael Somos, Aug 24 2014
a(n) = (G(j+2n) + G(j-2n))/G(j), for n >= 0 and any j, positive or negative, except where G(j) = 0, and for any sequence of the form G(n+1) = G(n) + G(n-1) with any initial values for G(0), G(1), including non-integer values. G(n) includes Lucas, Fibonacci. Compare with A081067 for odd number offsets from j. - Richard R. Forberg, Nov 16 2014
a(n) = [x^n] ( (1 + 3*x + sqrt(1 + 6*x + 5*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
From J. M. Bergot, Oct 28 2015: (Start)
For n>0, a(n) = F(n-1) * L(n) + F(2*n+1) - (-1)^n with F(k) = A000045(k).
For n>1, a(n) = F(n+1) * L(n) + F(2*n-1) - (-1)^n.
For n>2, a(n) = 5*F(2*n-3) + 2*L(n-3) * L(n) + 8*(-1)^n. (End)
For n>1, a(n) = L(n-2)*L(n+2) -7*(-1)^n. - J. M. Bergot, Feb 10 2016
a(n) = 6*F(n-1)*L(n-1) - F(2*n-6) with F(n)=A000045(n) and L(n)=A000032(n). - J. M. Bergot, Apr 21 2017
a(n) = F(2*n) + 2*F(n-1)*L(n) with F(n)=A000045(n) and L(n)=A000032(n). - J. M. Bergot, May 01 2017
E.g.f.: exp(4*x/(1+sqrt(5))^2) + exp((1/4)*(1+sqrt(5))^2*x). - Stefano Spezia, Aug 13 2019
From Peter Bala, Oct 14 2019: (Start)
a(n) = F(2*n+2) - F(2*n-2) = A001906(n+1) - A001906(n-1).
a(n) = trace(M^n), where M is the 2 X 2 matrix [0, 1; 1, 1]^2 = [1, 1; 1, 2].
Consequently the Gauss congruences hold: a(n*p^k) = a(n*p^(k-1)) ( mod p^k ) for all prime p and positive integers n and k. See Zarelua and also Stanley (Ch. 5, Ex. 5.2(a) and its solution).
Sum_{n >= 1} (-1)^(n+1)/( a(n) + 1/a(n) ) = 1/5.
Sum_{n >= 1} (-1)^(n+1)/( a(n) + 3/(a(n) + 2/(a(n))) ) = 1/6.
Sum_{n >= 1} (-1)^(n+1)/( a(n) + 9/(a(n) + 4/(a(n) + 1/(a(n)))) ) = 1/9.
x*exp(Sum_{n >= 1} a(n)*x^/n) = x + 3*x^2 + 8*x^3 + 21*x^4 + ... is the o.g.f. for A001906. (End)
a(n) = n + 2 + Sum_{k=1..n-1} k*a(n-k). - Yu Xiao, May 30 2020
Sum_{n>=1} 1/a(n) = A153415. - Amiram Eldar, Nov 11 2020
Sum_{n>=0} 1/(a(n) + 3) = (2*sqrt(5) + 1)/10 (André-Jeannin, 1991). - Amiram Eldar, Jan 23 2022
a(n) = 2*cosh(2*n*arccsch(2)) = 2*cosh(2*n*asinh(1/2)). - Peter Luschny, May 25 2022
a(n) = (5/2)*(Sum_{k=-n..n} binomial(2*n, n+5*k)) - (1/2)*4^n. - Greg Dresden, Jan 05 2023
a(n) = Sum_{k>=0} Lucas(2*n*k)/(Lucas(2*n)^(k+1)). - Diego Rattaggi, Jan 12 2025

Extensions

Additional comments from Michael Somos, Jun 23 2001

A126869 a(n) = Sum_{k = 0..n} binomial(n,floor(k/2))*(-1)^(n-k).

Original entry on oeis.org

1, 0, 2, 0, 6, 0, 20, 0, 70, 0, 252, 0, 924, 0, 3432, 0, 12870, 0, 48620, 0, 184756, 0, 705432, 0, 2704156, 0, 10400600, 0, 40116600, 0, 155117520, 0, 601080390, 0, 2333606220, 0, 9075135300, 0, 35345263800, 0, 137846528820, 0, 538257874440, 0, 2104098963720, 0, 8233430727600, 0, 32247603683100, 0, 126410606437752, 0
Offset: 0

Views

Author

Philippe Deléham, Mar 16 2007

Keywords

Comments

Hankel transform is 2^n. Successive binomial transforms are A002426, A000984, A026375, A081671, A098409, A098410.
From Andrew V. Sutherland, Feb 29 2008: (Start)
Counts returning walks of length n on a 1-d integer lattice with step set {-1,+1}.
Moment sequence of the trace of a random matrix in G = SO(2). If X = tr(A) is a random variable (A distributed with Haar measure on G), then a(n) = E[X^n].
Also the moment sequence of the trace of the k-th power of a random matrix in USp(2) = SU(2), for all k > 2.
(End)
From Paul Barry, Aug 10 2009: (Start)
The Hankel transform of 0,1,0,2,0,6,... is 0,-1,0,4,0,-16,0,... with general term I*(-4)^(n/2)(1 - (-1)^n)/4, I = sqrt(-1).
The Hankel transform of 1,1,0,2,0,6,... (which has g.f. 1 + x/sqrt(1 - 4*x^2)) is A164111. (End)
a(n) = A204293(2*n,n): central terms of the triangle in A204293. - Reinhard Zumkeller, Jan 14 2012
a(n) is the total number of closed walks (round trips) of length n on the graph P_N (a line with N nodes and N-1 edges), divided by N, in the limit N -> infinity. See a comment on A198632 and a link under A201198. - Wolfdieter Lang, Oct 10 2012

Examples

			a(4) = 6 {UUDD,UDUD,UDDU,DUUD,DUDU,DDUU}.
		

References

  • Lin Yang and S.-L. Yang, The parametric Pascal rhombus. Fib. Q., 57:4 (2019), 337-346.

Crossrefs

This is A000984 with interspersed zeros. m-th binomial transforms of A000984: A126869 (m = -2), A002426 (m = -1 and m = -3 for signed version), A000984 (m = 0 and m = -4 for signed version), A026375 (m = 1 and m = -5 for signed version), A081671 (m = 2 and m = -6 for signed version), A098409 (m = 3 and m = -7 for signed version), A098410 (m = 4 and m = -8 for signed version), A104454 (m = 5 and m = -9 for signed version).

Programs

  • Haskell
    a126869 n = a204293_row (2*n) !! n  -- Reinhard Zumkeller, Jan 14 2012
    
  • Maple
    seq((-1)^(n/2)*pochhammer(-n,n/2)/(n/2)!, n=0..43); # Peter Luschny, May 17 2013
    seq(n!*coeff(series(hypergeom([],[1],x^2),x,n+1),x,n),n=0..42); # Peter Luschny, Jan 31 2015
  • Mathematica
    Table[(-1)^Floor[n/2] HypergeometricPFQ[{-n,-n},{1},-1],{n,0,30}] (* Peter Luschny, Nov 01 2011 *)
  • Sage
    A126869 = lambda n: (2^(n-1)*((-1)^n+1)*gamma((n+1)/2))/(sqrt(pi)*gamma((n+2)/2))
    [A126869(n) for n in range(44)] # Peter Luschny, Sep 10 2014

Formula

From Andrew V. Sutherland, Feb 29 2008: (Start)
a(2*n) = binomial(2*n,n) = A000984(n); a(2*n+1) = 0.
a(n) = Sum_{k = 0..n} A107430(n,k)*(-1)^(n-k).
a(n) = Sum_{k = 0..n} A061554(n,k)*(-1)^k.
a(n) = (1/Pi)*Integral_{t = 0..Pi} cos^n(t) dt. (End)
E.g.f.: I_0(2*x) where I_n(x) is the modified Bessel function as a function of x. - Benjamin Phillabaum, Mar 10 2011
G.f.: A(x) = 1/sqrt(1 - 4*x^2). - Vladimir Kruchinin, Apr 16 2011
a(n) = (1/Pi)*Integral{x = -2..2} x^n/sqrt((2 - x)*(2 + x)). - Peter Luschny, Sep 12 2011
a(n) = (-1)^floor(n/2) * Hypergeometric([-n,-n],[1], -1). - Peter Luschny, Nov 01 2011
E.g.f.: E(0)/(1 - x) where E(k) = 1 - x/(1 - x/(x - (k+1)^2/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Apr 05 2013
E.g.f.: 1 + x^2/(Q(0) - x^2), where Q(k) = x^2 + (k+1)^2 - x^2*(k+1)^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 28 2013
G.f.: 1/(1 - 2*x^2*Q(0)), where Q(k) = 1 + (4*k+1)*x^2/(k+1 - x^2*(2*k+2)*(4*k+3)/(2*x^2*(4*k+3) + (2*k+3)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 15 2013
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - 2*x/(2*x + (k+1)/(x*(2*k+1))/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
G.f.: G(0)/(1+x), where G(k) = 1 + x*(2+5*x)*(4*k+1)/((4*k+2)*(1+x)^2 - 2*(2*k+1)*(4*k+3)*x*(2+5*x)*(1+x)^2/((4*k+3)*x*(2+5*x) + 4*(k+1)*(1+x)^2/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 19 2014
a(n) = 2^n*JacobiP(n,0,-1/2-n,-3). - Peter Luschny, Aug 02 2014
a(n) = (2^(n-1)*((-1)^n+1)*Gamma((n+1)/2))/(sqrt(Pi)*Gamma((n+2)/2)). - Peter Luschny, Sep 10 2014
a(n) = n!*[x^n]hypergeom([],[1],x^2). - Peter Luschny, Jan 31 2015
a(n) = 2^n*hypergeom([1/2,-n],[1],2). - Peter Luschny, Feb 03 2015
From Peter Bala, Jul 25 2016: (Start)
a(n) = (-1)^floor(n/2)*Sum_{k = 0..n} (-1)^k*binomial(n,k)^2.
D-finite with recurrence: a(n) = 4*(n - 1)/n * a(n-2) with a(0) = 1, a(1) = 0. (End)
From Ilya Gutkovskiy, Jul 25 2016: (Start)
Inverse binomial transform of A002426.
a(n) = Sum_{k=0..n} (-1)^k*A128014(k).
a(n) ~ 2^n*((-1)^n + 1)/sqrt(2*Pi*n). (End)

A220062 Number A(n,k) of n length words over k-ary alphabet, where neighboring letters are neighbors in the alphabet; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 4, 4, 2, 0, 0, 1, 5, 6, 6, 2, 0, 0, 1, 6, 8, 10, 8, 2, 0, 0, 1, 7, 10, 14, 16, 12, 2, 0, 0, 1, 8, 12, 18, 24, 26, 16, 2, 0, 0, 1, 9, 14, 22, 32, 42, 42, 24, 2, 0, 0, 1, 10, 16, 26, 40, 58, 72, 68, 32, 2, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Dec 03 2012

Keywords

Comments

Equivalently, the number of walks of length n-1 on the path graph P_k. - Andrew Howroyd, Apr 17 2017

Examples

			A(5,3) = 12: there are 12 words of length 5 over 3-ary alphabet {a,b,c}, where neighboring letters are neighbors in the alphabet: ababa, ababc, abcba, abcbc, babab, babcb, bcbab, bcbcb, cbaba, cbabc, cbcba, cbcbc.
Square array A(n,k) begins:
  1,  1,  1,  1,  1,   1,   1,   1, ...
  0,  1,  2,  3,  4,   5,   6,   7, ...
  0,  0,  2,  4,  6,   8,  10,  12, ...
  0,  0,  2,  6, 10,  14,  18,  22, ...
  0,  0,  2,  8, 16,  24,  32,  40, ...
  0,  0,  2, 12, 26,  42,  58,  74, ...
  0,  0,  2, 16, 42,  72, 104, 136, ...
  0,  0,  2, 24, 68, 126, 188, 252, ...
		

Crossrefs

Columns k=0, 2-10 give: A000007, A040000, A029744(n+2) for n>0, A006355(n+3) for n>0, A090993(n+1) for n>0, A090995(n-1) for n>2, A129639, A153340, A153362, A153360.
Rows 0-6 give: A000012, A001477, A005843(k-1) for k>0, A016825(k-2) for k>1, A008590(k-2) for k>2, A113770(k-2) for k>3, A063164(k-2) for k>4.
Main diagonal gives: A102699.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i=0, add(b(n-1, j, k), j=1..k),
          `if`(i>1, b(n-1, i-1, k), 0)+
          `if`(i b(n, 0, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, Sum[b[n-1, j, k], {j, 1, k}], If[i>1, b[n-1, i-1, k], 0] + If[iJean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
  • PARI
    TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
    ColGf(m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)==1, j->1, z);
    a(n,k)=Vec(ColGf(k,x) + O(x^(n+1)))[n+1];
    for(n=0, 7, for(k=0, 7, print1( a(n,k), ", ") ); print(); );
    \\ Andrew Howroyd, Apr 17 2017

A198633 Total number of round trips, each of length 2*n on the graph P_3 (o-o-o).

Original entry on oeis.org

3, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648
Offset: 0

Views

Author

Wolfdieter Lang, Nov 02 2011

Keywords

Comments

See the array and triangle A198632 for the general case for the graph P_N (there N is n and the length is l=2*k).

Examples

			With the graph P_3 as 1-2-3:
n=0: 3, from the length 0 walks starting at 1, 2 and 3.
n=2: 8, from the walks of length 4, namely 12121, 12321, 21212, 23232, 21232, 23212, 32323 and 32123.
		

Crossrefs

Essentially the same as A000079, A020707, A077552 etc.

Programs

  • Mathematica
    Join[{3},NestList[2#&,4,30]] (* Harvey P. Dale, Nov 07 2020 *)
  • PARI
    a(n)=if(n,2<Charles R Greathouse IV, Jan 02 2012

Formula

a(n) = w(3,2*n), n>=0, with w(3,l) the total number of closed walks on the graph P_3 (the simple path with 3 points (vertices) and 2 lines (or edges)).
O.g.f. for w(3,l) (with zeros for odd l): y*(d/dy)S(3,y)/S(3,y) with y=1/x and Chebyshev S-polynomials (coefficients A049310). See A198632, also for a rewritten form.
Empirical g.f.: (3-2*x)/(1-2*x). - Colin Barker, Jan 02 2012
This g.f. follows from the Chebyshev o.g.f. given above with x -> sqrt(x). Therefore a(0) = 3 and a(n) = 2^(n+1), n >= 1. - Wolfdieter Lang, Feb 18 2013.

A208727 T(n,k)=Number of 2n-bead necklaces labeled with numbers 1..k not allowing reversal, with neighbors differing by exactly 1.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 5, 4, 1, 0, 5, 7, 8, 6, 1, 0, 6, 9, 12, 15, 8, 1, 0, 7, 11, 16, 25, 27, 14, 1, 0, 8, 13, 20, 35, 52, 60, 20, 1, 0, 9, 15, 24, 45, 78, 131, 123, 36, 1, 0, 10, 17, 28, 55, 104, 210, 316, 285, 60, 1, 0, 11, 19, 32, 65, 130, 290, 551, 835, 648, 108, 1, 0, 12, 21, 36
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Table starts
.0.1..2...3...4....5....6....7....8....9...10...11...12..13..14..15.16.17.18
.0.1..3...5...7....9...11...13...15...17...19...21...23..25..27..29.31.33
.0.1..4...8..12...16...20...24...28...32...36...40...44..48..52..56.60
.0.1..6..15..25...35...45...55...65...75...85...95..105.115.125.135
.0.1..8..27..52...78..104..130..156..182..208..234..260.286.312
.0.1.14..60.131..210..290..370..450..530..610..690..770.850
.0.1.20.123.316..551..796.1042.1288.1534.1780.2026.2272
.0.1.36.285.835.1569.2366.3175.3985.4795.5605.6415

Examples

			All solutions for n=5, k=3:
..2....1....1....1....1....1....1....1
..3....2....2....2....2....2....2....2
..2....3....1....1....1....3....1....1
..3....2....2....2....2....2....2....2
..2....1....1....3....1....3....3....1
..3....2....2....2....2....2....2....2
..2....3....1....3....3....3....1....1
..3....2....2....2....2....2....2....2
..2....3....3....3....3....3....3....1
..3....2....2....2....2....2....2....2
		

Crossrefs

Column 3 is A000031.

A198636 One half of total number of round trips, each of length 2n, on the graph P_6 (o-o-o-o-o-o).

Original entry on oeis.org

3, 5, 13, 38, 117, 370, 1186, 3827, 12389, 40169, 130338, 423065, 1373466, 4459278, 14478659, 47011093, 152642789, 495626046, 1609284589, 5225309458, 16966465802, 55089756851, 178875298901, 580804419201, 1885860059450, 6123349080945
Offset: 0

Views

Author

Wolfdieter Lang, Nov 03 2011

Keywords

Comments

See the array and triangle A198632 for the general graph P_N case (there N is n and the length is l=2*k).

Examples

			With the graph P_6 as 1-2-3-4-5-6:
n=0: a(0)=3 because w(6,0)=6, the number of vertices.
n=2: a(2)=5 because the 10 round trips of length 2 are 121, 212, 232, 323, 343, 434, 454, 545, 565 and 656.
		

Crossrefs

Programs

  • Mathematica
    Table[7 (Binomial[2 n - 1, n - 1] + Sum[Binomial[2 n, n - 7 k], {k, Floor[n/7]}]) - 2^(2 n - 1) - (7/2) Boole[n == 0], {n, 0, 25}] (* Michael De Vlieger, Jul 17 2017 *)
  • PARI
    vec_A198636(Nmax)=Vec((3-10*x+6*x^2)/(1-5*x+6*x^2-x^3)+O(x^Nmax)) \\ Indices will start at 1 in this vector. - M. F. Hasler, Nov 03 2013
    
  • PARI
    {a(n) = if( n<0, n=-n; polcoeff( (3 - 12*x + 5*x^2) / (1 - 6*x + 5*x^2 - x^3) + x * O(x^n), n), polcoeff( (3 - 10*x + 6*x^2) / (1 - 5*x + 6*x^2 -x^3) + x * O(x^n), n))}; /* Michael Somos, Jul 17 2017 */

Formula

a(n) = w(6,2*n)/2, n>=0, with w(6,l) the total number of closed walks on the graph P_6 (the simple path with 6 points (vertices) and 5 lines (or edges)).
O.g.f. for w(6,l) (with zeros for odd l): y*(d/dy)S(6,y)/S(6,y) with y=1/x and Chebyshev S-polynomials (coefficients A049310). See also A198632 for a rewritten form.
O.g.f.: (3-10*x+6*x^2)/(1-5*x+6*x^2-x^3). - Colin Barker, Jan 02 2012
Conjecture: a(n) = 2^(2*n)*(sum_{k=1,2,3} (cos(k*Pi/7))^(2*n)). - L. Edson Jeffery, Jan 21 2012 (in fact this conjecture was recently proved in [Barbero, et al.])
a(n) = 7*(binomial(2n-1,n-1) + sum_{k = 1..floor(n/7)} binomial(2n,n-7k)) - 2^(2n-1). - M. Lawrence Glasser, Feb 20 2013
Let r,s,t be the roots of x^3 + x^2 - 2x - 1; then apparently a(n) = r^(2n) + s^(2n) + t^(2n). - James R. Buddenhagen, Nov 03 2013 [This is equivalent to the conjecture by L. Edson Jeffery.]
a(n) = 5*a(n-1) - 6*a(n-2) + a(n-3). - M. F. Hasler, Nov 05 2013
G.f.: F(x) = (sum_{r=0..2} ((3-r)*(-1)^r*binomial(6-r,r))*x^r)/(sum_{s=0..3} ((-1)^s*binomial(6-s,s))*x^s). - L. Edson Jeffery, Nov 23 2013

A185095 Rectangular array read by antidiagonals: row q has generating function F_q(x) = sum_{r=0,...,q-1} ((q-r)*(-1)^r*binomial(2*q-r,r)*x^r) / sum_{s=0,...,q} ((-1)^s*binomial(2*q-s,s)*x^s), where q=1,2,....

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 5, 7, 1, 5, 7, 13, 18, 1, 6, 9, 19, 38, 47, 1, 7, 11, 25, 58, 117, 123, 1, 8, 13, 31, 78, 187, 370, 322, 1, 9, 15, 37, 98, 257, 622, 1186, 843, 1, 10, 17, 43, 118, 327, 874, 2110, 3827, 2207, 1, 11, 19, 49, 138, 397, 1126, 3034, 7252, 12389, 5778, 1
Offset: 0

Views

Author

L. Edson Jeffery, Jan 23 2012

Keywords

Comments

Row indices q begin with 1, column indices n begin with 0.

Examples

			Array begins as
1,  1,  1,  1,   1,    1, ...
2,  3,  7, 18,  47,  123, ...
3,  5, 13, 38, 117,  370, ...
4,  7, 19, 58, 187,  622, ...
5,  9, 25, 78, 257,  874, ...
6, 11, 31, 98, 327, 1126, ...
...
		

Crossrefs

Conjecture. Transpose of array A186740.
Conjecture. Rows 0,1,2 (up to an offset) are A000012, A005248, A198636 (proved, see the Barbero, et al., reference there).
Conjecture. Columns 0,1,2,3,4 (up to an offset) are A000027, A005408, A016921, A114698, A114646.
Cf. A209235.

Formula

Conjecture. The n-th entry in row q is given by R_q(n) = 2^(2*n)*(sum_{j=1,...,n+1} (cos(j*Pi/(2*q+1)))^(2*n)), q >= 1, n >= 0.
Conjecture. G.f. for column n is of the form G_n(x) = H_n(x)/(1-x)^2, where H_n(x) is a polynomial in x, n >= 0.
Conjecture. 2*A185095(q,n) = A198632(2*q,n), q >= 1, n >= 0. - L. Edson Jeffery, Nov 23 2013

A198635 Total number of round trips, each of length 2*n on the graph P_5 (o-o-o-o-o).

Original entry on oeis.org

5, 8, 20, 56, 164, 488, 1460, 4376, 13124, 39368, 118100, 354296, 1062884, 3188648, 9565940, 28697816, 86093444, 258280328, 774840980, 2324522936, 6973568804, 20920706408, 62762119220, 188286357656, 564859072964, 1694577218888, 5083731656660, 15251194969976
Offset: 0

Views

Author

Wolfdieter Lang, Nov 02 2011

Keywords

Comments

See the array and triangle A198632 for the general case for the graph P_N (there N is n and the length is l = 2*k).

Examples

			With the graph P_5 as 1-2-3-4-5:
n=0: 5, from the length 0 walks starting at 1,2,3,4 and 5.
n=1: 8, from the walks of length 2, namely 121, 212, 232, 323, 343, 434, 454 and 545.
		

Crossrefs

Essentially the same as A115099.

Programs

Formula

a(n) = w(5,2*n), n >= 0, with w(5,l) the total number of closed walks on the graph P_5 (the simple path with 5 points (vertices) and 4 lines (or edges)).
O.g.f. for w(5,l) (with zeros for odd l): y*(d/dy)S(5,y)/S(5,y) with y = 1/x and Chebyshev S-polynomials (coefficients A049310). See also A198632 for a rewritten form.
G.f.: (5-12*x+3*x^2)/(1-4*x+3*x^2). - Colin Barker, Jan 02 2012
a(n) = 3*a(n-1) - 4, n > 1. - Vincenzo Librandi, Jan 02 2012
a(n) = 2*3^n + 2 for n > 0. - Andrew Howroyd, Mar 18 2017
a(n) = 2*A034472(n) for n > 0. - Andrew Howroyd, Mar 18 2017

A232441 Sequence read from antidiagonals of rectangular array given by A(n,k) = 2^(2*k)*(Sum_{j=1..n-floor(n/2)-1} (cos(j*Pi/n))^(2*k)), rows n >= 3, columns k >= 0.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 3, 4, 1, 3, 4, 7, 8, 1, 3, 5, 10, 18, 16, 1, 4, 6, 13, 28, 47, 32, 1, 4, 7, 16, 38, 82, 123, 64, 1, 5, 8, 19, 48, 117, 244, 322, 128, 1, 5, 9, 22, 58, 152, 370, 730, 843, 256, 1, 6, 10, 25, 68
Offset: 3

Views

Author

L. Edson Jeffery, Nov 23 2013

Keywords

Comments

Row indices n begin with 3, column indices k begin with 0.

Examples

			1,    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,...
1,    2,    4,    8,   16,   32,   64,  128,  256,  512, 1024,...
2,    3,    7,   18,   47,  123,  322,  843, 2207, 5778,15127,...
2,    4,   10,   28,   82,  244,  730, 2188, 6562,19684,59050,...
		

Crossrefs

Programs

  • Mathematica
    Table[Function[m, FullSimplify[2^(2 k)*Sum[Cos[j*Pi/m]^(2 k), {j, m - Floor[m/2] - 1}]]][n - k + 1], {n, 3, 12}, {k, 0, n - 2}] // Flatten (* Michael De Vlieger, Mar 18 2017 *)

Formula

A(2*m+1,k) = A186740(m,k), m = 1,2,....
Conjecture: A(n,k) = floor(A198632(n-1,k)/2), n >= 3, k >= 0.
Showing 1-9 of 9 results.