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.

Previous Showing 11-20 of 66 results. Next

A143608 A005319 and A002315 interleaved.

Original entry on oeis.org

0, 1, 4, 7, 24, 41, 140, 239, 816, 1393, 4756, 8119, 27720, 47321, 161564, 275807, 941664, 1607521, 5488420, 9369319, 31988856, 54608393, 186444716, 318281039, 1086679440, 1855077841, 6333631924, 10812186007, 36915112104, 63018038201, 215157040700
Offset: 0

Views

Author

Originally submitted by Clark Kimberling, Aug 27 2008. Merged with an essentially identical sequence submitted by Kenneth J Ramsey, Jun 01 2012, by N. J. A. Sloane, Aug 02 2012

Keywords

Comments

Also, numerators of the lower principal and intermediate convergents to 2^(1/2). The lower principal and intermediate convergents to 2^(1/2), beginning with 1/1, 4/3, 7/5, 24/17, 41/29, form a strictly increasing sequence; essentially, numerators=A143608 and denominators=A079496.
Sequence a(n) such that a(2*n) = sqrt(2*A001108(2*n)) and a(2*n+1) = sqrt(A001108(2*n+1)).
For n > 0, a(n) divides A******(k+1,n+1)-A******(k,n+1) where A****** is any one of A182431, A182439, A182440, A182441 and k is any nonnegative integer.
If p is a prime of the form 8*r +/- 3 then a(p+1) == 0 (mod p); if p is a prime of the form 8*r +/- 1 then a(p-1) == 0 (mod p).
Numbers n such that sqrt(floor(n^2/2 + 1)) is an integer. The integer square roots are given by A079496. - Richard R. Forberg, Aug 01 2013
From Peter Bala, Mar 23 2018: (Start)
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + y^2) + y*sqrt(1 + x^2). The operation o is commutative and associative with identity 0. Then we have
a(2*n + 1) = 1 o 1 o ... o 1 (2*n + 1 terms) and
a(2*n) = sqrt(2)*(1 o 1 o ... o 1) (2*n terms). Cf. A084068.
This is a fourth-order divisibility sequence. Indeed, a(2*n) = sqrt(2)*U(2*n) and a(2*n+1) = U(2*n+1), where U(n) is the Lehmer sequence [Lehmer, 1930] defined by the recurrence U(n) = 2*sqrt(2)*U(n-1) - U(n-2) with U(0) = 0 and U(1) = 1. The solution to the recurrence is U(n) = (1/2)*( (sqrt(2) + 1)^n - (sqrt(2) - 1)^n ). (End)

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.

Crossrefs

Programs

  • Magma
    I:=[0,1,4,7]; [n le 4 select I[n] else 6*Self(n-2) - Self(n-4): n in [1..30]]; // G. C. Greubel, Mar 27 2018
  • Maple
    A143608 := proc(n)
        option remember;
        if n <= 3 then
            op(n+1,[0,1,4,7]) ;
        else
            6*procname(n-2)-procname(n-4) ;
        end if;
    end proc: # R. J. Mathar, Jul 22 2012
  • Mathematica
    a = -4; b = -1; Reap[While[b<2000000000, t = 4*b-a; Sow[t]; a=b; b=t; t = 2*b-a; Sow[t]; a=b; b=t]][[2,1]]
    CoefficientList[Series[x*(1 + 4*x + x^2)/(1 - 6*x^2 + x^4), {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 24 2014 *)
    LinearRecurrence[{0, 6, 0, -1}, {0, 1, 4, 7}, 31] (* Jean-François Alcover, Sep 21 2017 *)
  • PARI
    a(n)=([0,1,0,0;0,0,1,0;0,0,0,1;-1,0,6,0]^n*[0;1;4;7])[1,1] \\ Charles R Greathouse IV, Jun 11 2015
    
  • PARI
    concat(0, Vec(x*(1+4*x+x^2)/((1+2*x-x^2)*(1-2*x-x^2)) + O(x^50))) \\ Colin Barker, Mar 27 2016
    

Formula

a(2*n) = (a(2*n - 1) + a(2*n + 1))/2.
a(2*n + 1) = (a(2*n) + a(2*n + 2))/4.
a(2*n) = 4*A001109(n).
a(2*n + 1) = 4*A001109(n) + A001541(n).
From Colin Barker, Jun 29 2012: (Start)
a(n) = 6*a(n-2) - a(n-4).
G.f.: x*(1 + 4*x + x^2)/((1 + 2*x - x^2)*(1 - 2*x - x^2)) = x*(1 + 4*x + x^2)/(1 - 6*x^2 + x^4). (End)
2*a(n) = A078057(n) - A123335(n-1). - R. J. Mathar, Jul 04 2012
a(2n) = A005319(n); a(2n+1) = A002315(n). - R. J. Mathar, Jul 17 2009
a(n)*a(n+1) + 1 = A001653(n+1). - Charlie Marion, Dec 11 2012
a(n) = (((-2 - sqrt(2) + (-1)^n * (-2+sqrt(2))) * ((-1+sqrt(2))^n - (1+sqrt(2))^n)))/(4*sqrt(2)). - Colin Barker, Mar 27 2016
a(n) = A084068(n) - A079496(n). - César Aguilera, Feb 14 2023

A287825 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 1.

Original entry on oeis.org

1, 10, 82, 674, 5540, 45538, 374316, 3076828, 25291120, 207889674, 1708825732, 14046322404, 115458919774, 949057110644, 7801124426174, 64124215108032, 527092600834054, 4332631742719370, 35613662169258228, 292739611493034596, 2406281042646218328
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, -4, -21, 9, 5}, {1, 10, 82, 674, 5540, 45538}, 40]
  • Python
    def a(n):
        if n in [0, 1, 2, 3, 4, 5]:
            return [1, 10, 82, 674, 5540, 45538][n]
        return 9*a(n-1) - 4*a(n-2) - 21*a(n-3) + 9*a(n-4) + 5*a(n-5)

Formula

For n>5, a(n) = 9*a(n-1) - 4*a(n-2) - 21*a(n-3) + 9*a(n-4) + 5*a(n-5), a(0)=1, a(1)=10, a(2)=82, a(3)=674, a(4)=5540, a(5)=45538.
G.f.: (-1 - x + 4*x^2 + 3*x^3 - 3*x^4 - x^5)/(-1 + 9*x - 4*x^2 - 21*x^3 + 9*x^4 + 5*x^5).

A084159 Pell oblongs.

Original entry on oeis.org

1, 3, 21, 119, 697, 4059, 23661, 137903, 803761, 4684659, 27304197, 159140519, 927538921, 5406093003, 31509019101, 183648021599, 1070379110497, 6238626641379, 36361380737781, 211929657785303, 1235216565974041, 7199369738058939, 41961001862379597, 244566641436218639
Offset: 0

Views

Author

Paul Barry, May 18 2003

Keywords

Comments

Essentially the same as A046727.

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 60 at p. 123.

Crossrefs

Cf. A046727 (same sequence except for first term).

Programs

  • Magma
    [Floor(((Sqrt(2)+1)^(2*n+1)-(Sqrt(2)-1)^(2*n+1)+2*(-1)^n)/4): n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
    
  • Mathematica
    b[n_]:= Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[2], n]]];
    Join[{1}, Table[b[n+1], {n,50}]*Table[b[n], {n,50}]] (* Vladimir Joseph Stephan Orlovsky, Jan 15 2011 *)
    LinearRecurrence[{5,5,-1},{1,3,21},30] (* Harvey P. Dale, Aug 04 2019 *)
  • SageMath
    [(lucas_number2(2*n+1, 2, -1) + 2*(-1)^n)/4 for n in range(31)] # G. C. Greubel, Oct 11 2022

Formula

a(n) = ((sqrt(2)+1)^(2*n+1) - (sqrt(2)-1)^(2*n+1) + 2*(-1)^n)/4.
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3). - Paul Curtz, May 17 2008
G.f.: (1-x)^2/((1+x)*(1-6*x+x^2)). - R. J. Mathar, Sep 17 2008
a(n) = A078057(n)*A001333(n). - R. J. Mathar, Jul 08 2009
a(n) = A001333(n)*A001333(n+1).
From Peter Bala, May 01 2012: (Start)
a(n) = (-1)^n*R(n,-4), where R(n,x) is the n-th row polynomial of A211955.
a(n) = (-1)^n*1/u*T(n,u)*T(n+1,u) with u = sqrt(-1) and T(n,x) the Chebyshev polynomial of the first kind.
a(n) = (-1)^n + 4*Sum_{k = 1..n} (-1)^(n-k)*8^(k-1)*binomial(n+k,2*k).
Recurrence equations: a(n) = 6*a(n-1) - a(n-2) + 4*(-1)^n, with a(0) = 1 and a(1) = 3; a(n)*a(n-2) = a(n-1)*(a(n-1)+4*(-1)^n).
Sum_{k >= 0} (-1)^k/a(k) = 1/sqrt(2).
1 - 2*(Sum_{k = 0..n} (-1)^k/a(k))^2 = (-1)^(n+1)/A090390(n+1). (End)
a(n) = (A001333(2*n+1) + (-1)^n)/2. - G. C. Greubel, Oct 11 2022
E.g.f.: exp(-x)*(1 + exp(4*x)*(cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x)))/2. - Stefano Spezia, Aug 03 2024

A118800 Triangle read by rows: T satisfies the matrix products: C*T*C = T^-1 and T*C*T = C^-1, where C is Pascal's triangle.

Original entry on oeis.org

1, 1, -1, 2, -3, 1, 4, -8, 5, -1, 8, -20, 18, -7, 1, 16, -48, 56, -32, 9, -1, 32, -112, 160, -120, 50, -11, 1, 64, -256, 432, -400, 220, -72, 13, -1, 128, -576, 1120, -1232, 840, -364, 98, -15, 1, 256, -1280, 2816, -3584, 2912, -1568, 560, -128, 17, -1, 512, -2816, 6912, -9984, 9408, -6048, 2688, -816, 162, -19, 1
Offset: 0

Views

Author

Paul D. Hanna, May 02 2006

Keywords

Comments

The matrix square, T^2, consists of columns that are all the same.
Matrix inverse is triangle A118801. Row sums form {0^n, n>=0}.
Unsigned row sums equal A025192(n) = 2*3^(n-1), n>=1.
Row squared sums equal A051708.
Antidiagonal sums equals all 1's.
Unsigned antidiagonal sums form A078057 (with offset).
Antidiagonal squared sums form A002002(n) = Sum_{k=0..n-1} C(n,k+1)*C(n+k,k), n>=1.
From Paul Barry, Nov 10 2008: (Start)
T is [1,1,0,0,0,...] DELTA [ -1,0,0,0,0,...] or C(1,n) DELTA -C(0,n). (DELTA defined in A084938).
The positive matrix T_p is [1,1,0,0,0,...] DELTA [1,0,0,0,0,...]. T_p*C^-1 is
[0,1,0,0,0,....] DELTA [1,0,0,0,0,...] which is C(n-1,k-1) for n,k>=1. (End)
The triangle formed by deleting the minus signs is the mirror of the self-fusion of Pascal's triangle; see Comments at A081277 and A193722. - Clark Kimberling, Aug 04 2011
Riordan array ( (1 - x)/(1 - 2*x), -x/(1 - 2*x) ). Cf. A209149. The matrix square is the Riordan array ( (1 - x)^2/(1 - 2*x), x ), which belongs to the Appell subgroup of the Riordan group. See the Example section below. - Peter Bala, Jul 17 2013
From Peter Bala, Feb 23 2019: (Start)
There is a 1-parameter family of solutions to the simultaneous equations C*T*C = T^-1 and T*C*T = C^-1, where C is Pascal's triangle. Let T(k) denote the Riordan array ( (1 - k*x)/(1 - (k + 1)*x), -x/(1 - (k + 1)*x) ) so that T(1) = T. Then C*T(k)*C = T(k)^-1 and T(k)*C*T(k) = C^-1, for arbitrary k. For arbitrary m, the Riordan arrays (T(k)*C^m)^2 and (C^m*T(k))^2 both belong to the Appell subgroup of the Riordan group.
More generally, given a fixed m, we can ask for a lower triangular array X solving the simultaneous equations (C^m)*X*(C^m) = X^-1 and X*(C^m)*X = C^(-m). A 1-parameter family of solutions is given by the Riordan arrays X = ( (1 - m*k*x)/(1 - m*(k + 1)*x), -x/(1 - m*(k + 1)*x) ). The Riordan arrays X^2 , (X*C^n)^2 and (C^n*X)^2, for arbitrary n, all belong to the Appell subgroup of the Riordan group. (End)

Examples

			Triangle begins:
     1;
     1,    -1;
     2,    -3,     1;
     4,    -8,     5,     -1;
     8,   -20,    18,     -7,     1;
    16,   -48,    56,    -32,     9,     -1;
    32,  -112,   160,   -120,    50,    -11,     1;
    64,  -256,   432,   -400,   220,    -72,    13,    -1;
   128,  -576,  1120,  -1232,   840,   -364,    98,   -15,    1;
   256, -1280,  2816,  -3584,  2912,  -1568,   560,  -128,   17,   -1;
   512, -2816,  6912,  -9984,  9408,  -6048,  2688,  -816,  162,  -19,  1;
  1024, -6144, 16640, -26880, 28800, -21504, 11424, -4320, 1140, -200, 21, -1;
  ...
The matrix square, T^2, equals:
   1;
   0,  1;
   1,  0,  1;
   2,  1,  0,  1;
   4,  2,  1,  0,  1;
   8,  4,  2,  1,  0,  1;
  16,  8,  4,  2,  1,  0,  1;
  32, 16,  8,  4,  2,  1,  0,  1;
  64, 32, 16,  8,  4,  2,  1,  0,  1; ...
where all columns are the same.
		

Crossrefs

Cf. A118801 (inverse), A025192 (unsigned row sums), A051708 (row squared sums), A078057 (unsigned antidiagonal sums), A002002 (antidiagonal squared sums).

Programs

  • Mathematica
    (* This program generates A118800 as the mirror of the self-fusion of Pascal's triangle. *)
    z = 8; a = 1; b = 1; c = 1; d = 1;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n;
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, 0];
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, _] = 1;
    g[n_] := CoefficientList[w[n, -x], x];
    TableForm[Table[Reverse[Abs@g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[Abs@g[n]], {n, -1, z}]] (* A081277 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]] (* A118800 *)
    (* Clark Kimberling, Aug 04 2011 *)
    T[ n_, k_] := If[ n<0 || k<0, 0, (-1)^k 2^(n-k) (Binomial[ n, k] + Binomial[ n-1, n-k]) / 2]; (* Michael Somos, Nov 25 2016 *)
  • PARI
    {T(n,k)=if(n==0&k==0,1,(-1)^k*2^(n-k)*(binomial(n,k)+binomial(n-1,k-1))/2)}
    for(n=0,12,for(k=0,n,print1(T(n,k),", "));print(""))
    
  • PARI
    /* Chebyshev Polynomials as Antidiagonals: */
    {T(n,k)=local(Ox=x*O(x^(2*k))); polcoeff(((1+sqrt(1-x^2+Ox))^(n+k)+(1-sqrt(1-x^2+Ox))^(n+k))/2,2*k,x)}
    for(n=0,12,for(k=0,n,print1(T(n,k),", "));print(""))
    
  • Sage
    # uses[riordan_square from A321620]
    # Computes the unsigned triangle.
    riordan_square((1-x)/(1-2*x), 8) # Peter Luschny, Jan 03 2019

Formula

T(n,k) = (-1)^k * 2^(n-k) * ( C(n,k) + C(n-1,k-1) )/2 for n>=k>=0 with T(0,0) = 1. Antidiagonals form the coefficients of Chebyshev polynomials: T(n,k) = [x^(2*n)] [(1+sqrt(1-x^2))^(n+k) + (1-sqrt(1-x^2))^(n+k)]/2.
Rows of the triangle are generated by taking successive iterates of (A135387)^n * [1, 1, 0, 0, 0, ...]. - Gary W. Adamson, Dec 09 2007
O.g.f.: (1 - t)/(1 + t*(x - 2)) = 1 + (1 - x)*t + (2 - 3*x + x^2)^t^2 + (4 - 8*x + 5*x^2 - x^3)*t^3 + .... Row polynomial R(n,x) = (1 - x)*(2 - x)^(n-1) for n >= 1. - Peter Bala, Jul 17 2013
T(n,k)=2*T(n-1,k)-T(n-1,k-1) with T(0,0)=T(1,0)=1, T(1,1)=-1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Nov 25 2013
G.f. for row n (n>=1): Sum_{k=0..n} T(n,k)*x^k = (1-x)*(2-x)^(n-1). - Philippe Deléham, Nov 25 2013
From Tom Copeland, Nov 15 2016: (Start)
E.g.f. is [1 + (1-x)e^((2-x)t)]/(2-x), so the row polynomials are p_n(x) = (1-q,(x))^n, umbrally, where (q.(x))^k = q_k(x) are the row polynomials of A239473, or, equivalently, T = M*A239473, where M is the inverse Pascal matrix C^(-1) = A130595 with the odd rows negated, i.e., M(n,k) = (-1)^n C^(-1)(n,k) with e.g.f. exp[(1-x)t]. Cf. A200139: A200139(n,k) = (-1)^k* A118800(n,k).
TCT = C^(-1) = A130595 and A239473 = A000012*C^(-1) = S*C^(-1) imply (M*S)^2 = Identity matrix, i.e., M*S = (M*S)^(-1) = S^(-1)*M^(-1) = A167374*M^(-1). Note that M = M^(-1). Cf. A097805. (End)

A157751 Triangle of coefficients of polynomials F(n,x) in descending powers of x generated by F(n,x)=(x+1)*F(n-1,x)+F(n-1,-x), with initial F(0,x)=1.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 4, 4, 8, 1, 4, 12, 8, 16, 1, 6, 12, 32, 16, 32, 1, 6, 24, 32, 80, 32, 64, 1, 8, 24, 80, 80, 192, 64, 128, 1, 8, 40, 80, 240, 192, 448, 128, 256, 1, 10, 40, 160, 240, 672, 448, 1024, 256, 512, 1, 10, 60, 160, 560, 672, 1792, 1024, 2304, 512, 1024, 1, 12, 60, 280, 560, 1792, 1792, 4608, 2304, 5120, 1024, 2048
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2009

Keywords

Comments

Conjecture 1. If n>1 is even then F(n,x) has no real roots.
Conjecture 2. If n>0 is odd then F(n,x) has exactly one real root, r,
and if n>4 then 0 < -r < n.
Conjectures 1 and 2 are true. [From Alain Thiery (Alain.Thiery(AT)math.u-bordeaux1.fr), May 14 2010]
Cayley (1876) states "We, in fact, find 1 + sin u = 1 + x, 1 - sin 3u = (1 + x)(1 - 2x)^2, 1 + sin 5u = (1 + x)(1 + 2x - 4x^2)^2, 1 - sin 7u = (1 + x)(1 - 4x - 4x^2 + 8x^3)^2, &c.". - Michael Somos, Jun 19 2012
Appears to be the unsigned row reverse of A180870 and A228565. - Peter Bala, Feb 17 2014
From Wolfdieter Lang, Jul 29 2014: (Start)
This triangle is the Riordan triangle ((1+z)/(1-z^2), 2*z/(1-z^2)). For Riordan triangles see the W. Lang link 'Sheffer a-and z-sequences' under A006232, also for references. The o.g.f. given by Peter Bala in the formula section refers to the row reversed triangle. The usual information on this triangle, like o.g.f. for the columns, the row sums, the alternating row sums, the recurrences using A- and Z-sequences, etc. follows from this Riordan property. The Riordan proof follows from the given o.g.f. by Peter Bala, call it Grev(x,z), by row reversion: G(x,z) = Grev(1/x,x*z) = (1+z)/(1- 2*x*z - z^2) = G(z)*(1/(1 - x*F(z))) with G(z) = (1+z)/(1-z^2) and F(z) = z*2/(1-z^2). See A244419 for the discussion for a signed version of this triangle.
(End)

Examples

			Rows 0 to 8:
1
1 2
1 2 4
1 4 4 8
1 4 12 8 16
1 6 12 32 16 32
1 6 24 32 80 32 64
1 8 24 80 80 192 64 128
1 8 40 80 240 192 448 128 256
(Row 8) = (1, 4*2, 10*4, 10*8, 15*16, 6*32, 7*64, 1*128, 1*256).
First few polynomials:
F(0,x)=1, F(1,x)=x+2, F(2,x)=x^2+2*x+4, F(3,x)=x^3+4*x^2+4*x+8.
The row polynomials R(n,x) start: 1, 1 + 2*x = x*F(1,1/x), 1 + 2*x + 4^x^2 = x^2*F(2,1/x), ...  - _Wolfdieter Lang_, Jul 29 2014
		

References

  • A. Cayley, On an Expression for 1 +- sin(2p+1)u in Terms of sin u, Messenger of Mathematics, 5 (1876), pp. 7-8 = Mathematical Papers Vol. 10, n. 630, pp. 1-2.

Crossrefs

Programs

  • Mathematica
    T[n_, 0]:= 1; T[n_, n_]:= 2^n; T[n_, k_]:= T[n, k] = T[n-1, k] + (1 + (-1)^(n-k))*T[n-1, k-1]; Table[T[n, k], {n, 0, 15}, {k, 0, n}] (* G. C. Greubel, Sep 24 2018 *)
  • PARI
    t(n,k) = if(k==0, 1, if(k==n, 2^n, t(n-1,k) + (1+(-1)^(n-k))*t(n-1,k-1)));
    for(n=0,15, for(k=0,n, print1(t(n,k), ", "))) \\ G. C. Greubel, Sep 24 2018

Formula

Count the top row as row 0 and let C(n,k) denote the usual binomial
coefficient. For row 2n, define p(0)=C(n,0), p(1)=C(n,1), p(2)=C(n+1,2),
p(3)=C(n+1,3), p(4)=C(n+2,4), p(5)=c(n+2,5),..., until reaching two final
1's: p(2n-1)=C(2n-1,2n-1) and p(2n)=C(2n,2n). Then the k-th number in row
2n is p(k)*2^k. For row 2n+1, define q(0)=C(n,0), q(1)=C(n+1,1),
q(2)=C(n+1,2), q(3)=C(n+2,3),..., until reaching q(2n+1)=C(2n+1,2n+1).
Then the k-th number in row 2n+1 is q(k)*2^k.
From Peter Bala, Jan 17 2014: (Start)
Working with an offset of 0, the o.g.f. is (1 + x*z)/(1 - 2*z - x^2*z^2) = 1 + (x + 2)*z + (x^2 + 2*x + 4)*z^2 + ....
Recurrence equation: T(n,k) = 2*T(n-1,k-1) + T(n-2,k-2) with T(n,0) = 1.
The polynomials G(n,x) defined by G(0,x) = 1 and G(n,x) = x*F(n-1,x) for n >= 1 satisfy G(n,x) = (x + 1)*G(n-1,x) - G(n-1,-x). Cf. A140070 and A140071. (End)
From Wolfdieter Lang, Jul 29 2014: (Start)
O.g.f. for the row polynomials (rising powers of x) R(n,x) = x^n*F(n,1/x): (1+z)/(1 - 2*x*z - z^2). Riordan triangle ((1+z)/(1-z^2), 2*z/(1-z^2)). See a comment above.
Recurrence for the row polynomials R(n,x) = (1+x)*R(n-1,x) - (-1)^n*x*R(n-1,-x), n >= 1, R(0,x) = 1.
R(n,x) = Ftilde(n,2*x) + Ftilde(n-1,2*x) with the monic Fibonacci polynomials Ftilde(n,x) given in A168561.
Recurrence for the triangle: R(n,m) = R(n-1,m) + (1 + (-1)^(n-m))*R(n-1,m-1), n >= m >= 1, R(n,m) = 0 if n < m, R(n,0) = 1.
O.g.f. column sequences ((1+x)/(1-x^2))*(2*x/(1-x^2))^m, m >= 0. See A000012, 2*A004526, 4*A008805, 8*A058187, 16*A189976, 32*A189980, ...
Row sums A078057. Alternating row sums A123335.
(End)

Extensions

Offset corrected to 0. Cf.s added, keyword easy added by Wolfdieter Lang, Jul 29 2014

A215928 a(n) = 2*a(n-1) + a(n-2) for n > 2, a(0) = a(1) = 1, a(2) = 2.

Original entry on oeis.org

1, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860, 33461, 80782, 195025, 470832, 1136689, 2744210, 6625109, 15994428, 38613965, 93222358, 225058681, 543339720, 1311738121, 3166815962, 7645370045, 18457556052, 44560482149, 107578520350, 259717522849
Offset: 0

Views

Author

Michael Somos, Aug 27 2012

Keywords

Comments

Number of 132-avoiding two-stack sortable permutations. See Theorem 2.2 of Egge and Mansour which gives a generating function equation P(x) = 1 + x + 2*x^2 + x*(P(x) - 1 - x) + x^2*(P(x) - 1) + x*(P(x) - 1 - x).
Row sums of triangle A155161. - Philippe Deléham, Aug 31 2012
a(n) is the top left entry of the n-th power of any of the 3 X 3 matrices [1, 1, 1; 1, 1, 1; 0, 1, 0] or [1, 1, 0; 1, 1, 1; 1, 1, 0] or [1, 1, 1; 0, 0, 1; 1, 1, 1] or [1, 0, 1; 1, 0, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
For n > 0, A001333(n)/a(n) = A001333(n)/A000129(n), which converges to sqrt(2). - Karl V. Keller, Jr., May 17 2015

Examples

			G.f. = 1 + x + 2*x^2 + 5*x^3 + 12*x^4 + 29*x^5 + 70*x^6 + 169*x^7 + 408*x^8 + 985*x^9 + ...
		

Crossrefs

Programs

  • Magma
    [1] cat [ n le 2 select (n) else 2*Self(n-1)+Self(n-2): n in [1..35] ]; // Vincenzo Librandi, May 14 2015
  • Maple
    f:= gfun:-rectoproc({a(n)=2*a(n-1)+a(n-2), a(0)=1, a(1)=1, a(2)=2}, a(n), remember):
    map(f, [$0..100]); # Robert Israel, May 29 2015
  • Mathematica
    CoefficientList[Series[(1 - x - x^2)/(1 - 2 x - x^2), {x, 0, 30}], x] (* Vincenzo Librandi, May 14 2015 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / (1 - x / (1 - x / (1 - x / (1 + x)))) + x * O(x^n), n))};
    

Formula

a(n) = 2*a(n-1) + a(n-2) for n > 2, a(0) = a(1) = 1, a(2) = 2.
G.f.: 1 / (1 - x / (1 - x / (1 - x / (1 + x)))) = (1 - x - x^2) / (1 - 2*x - x^2).
a(n) = A000129(n) unless n = 0.
a(n+1) - a(n) = A078057(n-1).
PSUM transform is A024537.
PSUMSIGN transform is A097075.
INVERT transform of A000045(n). [Corrected by Wolfdieter Lang, Dec 07 2020]
G.f.: 1/( 1 - (Sum_{k>=0} x*(x + x^2)^k) ) = 1/( 1 - (Sum_{k>=1} (x/(1 - x^2))^k) ). - Joerg Arndt, Sep 30 2012
G.f.: 1 + Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(4*k + 2 + x)/( x*(4*k + 4 + x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 06 2013
a(n) = A069306(n-1) if n > 1. - Michael Somos, Oct 23 2018
E.g.f.: 1 + exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Franck Maminirina Ramaharo, Nov 29 2018

A287839 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 9.

Original entry on oeis.org

1, 11, 117, 1247, 13289, 141619, 1509213, 16083463, 171399121, 1826575451, 19465548357, 207441511727, 2210673955769, 23558830139779, 251063019088173, 2675542001860183, 28512861152219041, 303857405535211691, 3238164083417650197, 34508642672922983807
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Comments

In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).

Crossrefs

Programs

  • Maple
    a:=proc(n) option remember; if n=0 then 1 elif n=1 then 11 elif n=2 then 117 else 10*a(n-1)+7*a(n-2); fi; end: seq(a(n), n=0..30); # Wesley Ivan Hurt, Nov 25 2017
  • Mathematica
    LinearRecurrence[{10, 7}, {1, 11, 117}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 7*x^2) + O(x^30)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 117][n]
     return 10*a(n-1) + 7*a(n-2)
    

Formula

For n>2, a(n) = 10*a(n-1) + 7*a(n-2), a(0)=1, a(1)=11, a(2)=117.
G.f.: (-1 - x)/(-1 + 10 x + 7 x^2).
a(n) = (((5-4*sqrt(2))^n*(-3+2*sqrt(2)) + (3+2*sqrt(2))*(5+4*sqrt(2))^n)) / (4*sqrt(2)). - Colin Barker, Nov 25 2017

A287831 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 8.

Original entry on oeis.org

1, 10, 96, 924, 8892, 85572, 823500, 7924932, 76265388, 733938084, 7063035084, 67970944260, 654116708844, 6294876045156, 60578584659468, 582976518206148, 5610260171812140, 53990200655546148, 519573366930788172, 5000101506310370436, 48118353758378062956
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Comments

In general, the number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 5+k for k in {0,1,2,3,4} is given by a(n) = 9*a(n-1) + 2*k*a(n-2), a(0)=1, a(1)=10.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, 6}, {1, 10}, 30]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 10][n]
     return 9*a(n-1)+6*a(n-2)

Formula

a(n) = 9*a(n-1) + 6*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 6*x^2).
a(n) = ((1 - 11/sqrt(105))/2)*((9 - sqrt(105))/2)^n + ((1 + 11/sqrt(105))/2)*((9 + sqrt(105))/2)^n.

A208345 Triangle of coefficients of polynomials v(n,x) jointly generated with A208344; see the Formula section.

Original entry on oeis.org

1, 0, 3, 0, 1, 7, 0, 1, 3, 17, 0, 1, 3, 10, 41, 0, 1, 3, 11, 30, 99, 0, 1, 3, 12, 35, 87, 239, 0, 1, 3, 13, 40, 108, 245, 577, 0, 1, 3, 14, 45, 130, 322, 676, 1393, 0, 1, 3, 15, 50, 153, 406, 938, 1836, 3363, 0, 1, 3, 16, 55, 177, 497, 1236, 2682, 4925, 8119, 0, 1
Offset: 1

Views

Author

Clark Kimberling, Feb 25 2012

Keywords

Comments

Row sums, u(n,1): (1,2,5,13,...), odd-indexed Fibonacci numbers.
Row sums, v(n,1): (1,3,8,21,...), even-indexed Fibonacci numbers.
As triangle T(n,k) with 0<=k<=n, it is (0, 1/3, 2/3, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (3, -2/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 26 2012

Examples

			First five rows:
  1
  0   3
  0   1   7
  0   1   3   17
  0   1   3   10   41
First five polynomials u(n,x):
  1, 3*x, x + 7*x^2, x + 3*x^2 + 17*x^3, x + 3*x^2 + 10*x^3 + 41*x^4.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 13;
    u[n_, x_] := u[n - 1, x] + x*v[n - 1, x];
    v[n_, x_] := x*u[n - 1, x] + 2 x*v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A208344 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A208345 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]
    Table[v[n, x] /. x -> 1, {n, 1, z}]

Formula

u(n,x) = u(n-1,x) + x*v(n-1,x),
v(n,x) = x*u(n-1,x) + 2x*v(n-1,x),
where u(1,x)=1, v(1,x)=1.
From Philippe Deléham, Feb 26 2012: (Start)
As triangle T(n,k), 0<=k<=n:
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k-2) - 2*T(n-2,k-1) with T(0,0) = 1, T(1,0) = 0, T(1,1) = 3, T(n,k) = 0 if k<0 or if k>n.
G.f.: (1+(y-1)*x)/(1-(1+2*y)*x+y*(2-y)*x^2).
Sum_{k=0..n} T(n,k)*x^k = A152167(n), A000007(n), A001906(n+1), A003948(n) for x = -1, 0, 1, 2 respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A078057(n), A001906(n+1), A000244(n), A081567(n), A083878(n), A165310(n) for x = 0, 1, 2, 3, 4, 5 respectively. (End)

A209144 Triangle of coefficients of polynomials v(n,x) jointly generated with A209143; see the Formula section.

Original entry on oeis.org

1, 3, 6, 1, 12, 5, 24, 16, 1, 48, 44, 7, 96, 112, 30, 1, 192, 272, 104, 9, 384, 640, 320, 48, 1, 768, 1472, 912, 200, 11, 1536, 3328, 2464, 720, 70, 1, 3072, 7424, 6400, 2352, 340, 13, 6144, 16384, 16128, 7168, 1400, 96, 1, 12288, 35840, 39680, 20736
Offset: 1

Views

Author

Clark Kimberling, Mar 06 2012

Keywords

Comments

Alternating row sums: 1,3,5,7,9,11,13,15,17,...
For a discussion and guide to related arrays, see A208510.
Subtriangle of the triangle given by (3,-1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/3, -1/3, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 07 2012

Examples

			First five rows:
   1;
   3;
   6,  1;
  12,  5;
  24, 16, 1;
First three polynomials v(n,x): 1, 3, 6 + x.
(3,-1, 0, 0, 0, ...) DELTA (0, 1/3, -1/3, 0, 0, ...) begins:
    1;
    3,   0;
    6,   1,   0;
   12,   5,   0, 0;
   24,  16,   1, 0, 0;
   48,  44,   7, 0, 0, 0;
   96, 112,  30, 1, 0, 0, 0;
  192, 272, 104, 9, 0, 0, 0, 0;
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A209143 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A209144 *)

Formula

u(n,x) = u(n-1,x) + (x+1)*v(n-1,x),
v(n,x) = u(n-1,x) + v(n-1,x) + 1,
where u(1,x)=1, v(1,x)=1.
From Philippe Deléham, Mar 07 2012: (Start)
As triangle T(n,k) with 0 <= k <= n:
T(n,k) = 2*T(n-1,k) + T(n-2,k-1), T(0,0) = 1, T(1,0) = 3, T(1,1) = 0 and T(n,k) = 0 if k < 0 or if k > n.
G.f.: (1+x)/(1-2*x-y*x^2).
Sum_{k=0..n} T(n,k)*x^k = A005408(n), A003945(n), A078057(n), A028859(n), A000244(n), A063782(n), A180168(n) for x = -1, 0, 1, 2, 3, 4, 5 respectively. (End)
Previous Showing 11-20 of 66 results. Next