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

A176263 Triangle T(n,k) = A015440(k) - A015440(n) + A015440(n-k), read by rows.

Original entry on oeis.org

1, 1, 1, 1, -4, 1, 1, -4, -4, 1, 1, -29, -29, -29, 1, 1, -54, -79, -79, -54, 1, 1, -204, -254, -279, -254, -204, 1, 1, -479, -679, -729, -729, -679, -479, 1, 1, -1504, -1979, -2179, -2204, -2179, -1979, -1504, 1, 1, -3904, -5404, -5879, -6054, -6054, -5879, -5404, -3904, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 13 2010

Keywords

Comments

Row sums are s(n) = {1, 2, -2, -6, -85, -264, -1193, -3772, -13526, -42480, -139159, ...}, obeying s(n) = 3*s(n-1) + 7*s(n-2) - 19*s(n-3) - 15*s(n-4) + 25*s(n-5) with g.f. (1-x-15*x^2+5*x^3)/((1-x)*(1-x-5*x^2)^2).

Examples

			Triangle begins as:
  1;
  1,     1;
  1,    -4,     1;
  1,    -4,    -4,     1;
  1,   -29,   -29,   -29,     1;
  1,   -54,   -79,   -79,   -54,     1;
  1,  -204,  -254,  -279,  -254,  -204,     1;
  1,  -479,  -679,  -729,  -729,  -679,  -479,     1;
  1, -1504, -1979, -2179, -2204, -2179, -1979, -1504,     1;
  1, -3904, -5404, -5879, -6054, -6054, -5879, -5404, -3904, 1;
		

Programs

  • Magma
    A015440:= func< n | &+[5^j*Binomial(n-j,j): j in [0..Floor(n/2)]] >;
    [A015440(k) - A015440(n) + A015440(n-k): k in [0..n], n in [0..10]]; // G. C. Greubel, Nov 24 2019
    
  • Maple
    A176263 := proc(n,k)
            A015440(k)-A015440(n)+A015440(n-k) ;
    end proc; # R. J. Mathar, May 03 2013
  • Mathematica
    (* Set of sequences q=0..10. This sequence is q=5. *)
    f[n_, q_]:= f[n, q] = If[n<2, n, f[n-1, q] + q*f[n-2, q]];
    T[n_, k_, q_]:= f[k+1, q] + f[n-k+1, q] - f[n+1, q];
    Table[Flatten[Table[T[n, k, q], {n,0,10}, {k,0,n}]], {q,0,10}]
    (* Second program *)
    A015440[n_]:= Sum[5^j*Binomial[n-j, j], {j,0,(n+1)/2}]; T[n_, k_]:= T[n, k]= A015440[k] +A015440[n-k] -A015440[n]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 24 2019 *)
  • PARI
    A015440(n) = sum(j=0,(n+1)\2, 5^j*binomial(n-j,j));
    T(n,k) = A015440(k) - A015440(n) + A015440(n-k); \\ G. C. Greubel, Nov 24 2019
    
  • Sage
    def A015440(n): return sum(5^j*binomial(n-j,j) for j in (0..floor(n/2)))
    [[A015440(k) - A015440(n) + A015440(n-k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Nov 24 2019

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

Original entry on oeis.org

1, 1, 4, 7, 19, 40, 97, 217, 508, 1159, 2683, 6160, 14209, 32689, 75316, 173383, 399331, 919480, 2117473, 4875913, 11228332, 25856071, 59541067, 137109280, 315732481, 727060321, 1674257764, 3855438727, 8878212019, 20444528200, 47079164257, 108412748857
Offset: 0

Views

Author

Keywords

Comments

Counts walks of length n at the vertex of degree five in the graph with adjacency matrix A = [1,1,1,1;1,0,0,0;1,0,0,0;1,0,0,0]. - Paul Barry, Oct 02 2004
Form the graph with matrix A = [0,1,1,1;1,1,0,0;1,0,1,0;1,0,0,1]. The sequence 0,1,1,4,... counts walks of length n between the vertex without loop and another vertex. - Paul Barry, Oct 02 2004
Length-n words with letters {0,1,2,3} where no two consecutive letters are nonzero, see fxtbook link below. - Joerg Arndt, Apr 08 2011
Hankel transform is the sequence [1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...]. - Philippe Deléham, Nov 10 2007
Let M = [1, sqrt(3); sqrt(3), 0] be a 2 X 2 matrix. Then A006130(n)={[M^n]A006130-A052533%20=%20A006130%20(shifted%20to%20the%20right%20one%20place,%20with%20first%20term%20=%200).%20-%20_L.%20Edson%20Jeffery">(1,1)}. Note that A006130-A052533 = A006130 (shifted to the right one place, with first term = 0). - _L. Edson Jeffery, Nov 25 2011 [Any matrix M = [1, y; 3/y, 0], with y not 0, will do it. - Wolfdieter Lang, Feb 18 2018]
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=2, 4*a(n-2) equals the number of 4-colored compositions of n with all parts >=2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011
a(n) is the number of compositions (ordered partitions) of n into parts 1 and 2 where there are three sorts of part 2 (see the g.f.). - Joerg Arndt, Jan 16 2024
Number of pairs of rabbits when there are 3 pairs per litter and offspring reach parenthood after 2 gestation periods. - Robert FERREOL, Oct 28 2018
Numerators of stationary probabilities sequence for number of customers in steady state of M2/M/1 queue, whose g.f. is (1-z)/(3-3z-z(1-z^2)). - Igor Kleiner, Nov 03 2018
INVERT transform of (1, 0, 3, 0, 9, 0, 27, ...). - Gary W. Adamson, Jul 15 2019
Number of 3-compositions of n+2 with 1 not allowed as a part; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
Number of ways to tile a strip of length n with 3 colors of dominoes and 1 color of squares. - Greg Dresden, Sep 01 2021
Number of 3-permutations of n elements avoiding the patterns 231, 312, 321. See Bonichon and Sun. - Michel Marcus, Aug 20 2022
a(n-1), with a(-1) = 0, appears in the formula for the powers of the fundamental (integer) algebraic number c = (1 + sqrt(13))/2 = A209927: c^n = A052533(n) + a(n-1)*c. With the formulas given below, and also in A052533, in terms of S-Chebyshev polynomials this is valid also for the powers of 1/c = (-1 + sqrt(13))/6 = A356033. - Wolfdieter Lang, Nov 26 2023

Examples

			G.f. = 1 + x + 4*x^2 + 7*x^3 + 19*x^4 + 40*x^5 + 97*x^6 + 217*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Stephen Wolfram, 'The Mathematica Book,' Fourth Edition, Wolfram Media or Cambridge University Press, 1999, p. 96.

Crossrefs

Cf. A006131, A015440, A049310, A052533, A140167, A175291 (Pisano periods), A099232 (partial sums), A274977.

Programs

  • GAP
    a := [1, 1];; for n in [3..30] do a[n] := a[n-1] + 3*a[n-2]; od; a; # Muniru A Asiru, Feb 18 2018
  • Magma
    [n le 2 select 1 else Self(n-1) + 3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Oct 17 2012
    
  • Maple
    a := n -> add(binomial(n-k, k)*3^k, k=0..n): seq(a(n), n=0..29); # Zerinvary Lajos, Sep 30 2006
    f:= gfun:-rectoproc({a(n) = a(n-1) + 3*a(n-2), a(0) = 1, a(1) = 1},a(n),remember):
    map(f, [$0..100]); # Robert Israel, Aug 31 2015
  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = a[n - 1] + 3a[n - 2]; Table[ a[n], {n, 0, 30}]
    LinearRecurrence[{1, 3}, {1, 1}, 30] (* Vincenzo Librandi, Oct 17 2012 *)
    RecurrenceTable[{a[n]== a[n-1] + 3*a[n-2], a[0]== 1, a[1]== 1}, a, {n,0,30}] (* G. C. Greubel, Aug 30 2015 *)
    a[0] := 1; a[n_] := Hypergeometric2F1[1/2-n/2, -n/2, -n, -12]; Table[a[n], {n, 0, 29}] (* Peter Luschny, Feb 18 2018 *)
    a[ n_] := With[{s = Sqrt[-1/3]}, ChebyshevU[n, s/2] / s^n] // Simplify; (* Michael Somos, Nov 04 2018 *)
  • PARI
    Vec(1/(1-x-3*x^2+O(x^66))) \\ Franklin T. Adams-Watters, May 26 2011
    
  • Python
    an = an1 = 1
    while an<10**5:
       print(an)
       an1 += an*3
       an = an1 - an*3   # Alex Ratushnyak, Apr 20 2012
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen2
    it = recur_gen2(1,1,1,3)
    [next(it) for i in range(30)] # Zerinvary Lajos, Jun 25 2008
    
  • Sage
    [lucas_number1(n,1,-3) for n in range(1, 31)] # Zerinvary Lajos, Apr 22 2009
    

Formula

O.g.f.: 1/(1 - x - 3*x^2). - Simon Plouffe in his 1992 dissertation.
a(n) = (( (1 + sqrt(13))/2 )^(n+1) - ( (1 - sqrt(13))/2 )^(n+1))/sqrt(13).
a(n) = Sum_{k = 0..ceiling(n/2)} 3^k*C(n-k, k). - Benoit Cloitre, Philippe Deléham, Mar 07 2004
a(0) = 1; a(1) = 1; for n >= 1, a(n+1) = (a(n)^2 - (-3)^n) / a(n-1). - Philippe Deléham, Mar 07 2004
The i-th term of the sequence is the (1, 2) entry in the i-th power of the 2 X 2 matrix M = ((-1, 1), (1, 2)). - Simone Severini, Oct 15 2005
a(n) = lower right term in the 2 X 2 matrix [0,3; 1,1]^n. - Gary W. Adamson, Mar 02 2008
a(n) = Sum_{k = 0..n} A109466(n,k)*(-3)^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = Product_{k = 1..floor((n - 1)/2)} (1 + 12*cos(k*Pi/n)^2). - Roger L. Bagula and Gary W. Adamson, Nov 21 2008
Limiting ratio = (1 + sqrt(13))/2 = 2.30277563.. = A098316 - 1. - Roger L. Bagula and Gary W. Adamson, Nov 21 2008
G.f.: G(0)/(2-x), where G(k)= 1 + 1/(1 - x*(13*k - 1)/(x*(13*k + 12) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 18 2013
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+1 + 3*x)/( x*(4*k+3 + 3*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
a(n) = ( Sum_{1 <= k <= n+1, k odd} C(n+1,k)*13^((k-1)/2) )/2^n. - Vladimir Shevelev, Feb 05 2014
E.g.f.: (1/(a - b))*(a*exp(a*x) - b*exp(b*x)), where 2*a = 1 + sqrt(13) and 2*b = 1 - sqrt(13). - G. C. Greubel, Aug 30 2015
a(n) = ((i*sqrt(3))^n)*S(n, (-i/sqrt(3))), with the imaginary unit i and the Chebyshev S polynomials (coefficients in A049310). - Wolfdieter Lang, Feb 18 2018
a(n) = hypergeom([(1-n)/2, -n/2], [-n], -12) for n >= 1. - Peter Luschny, Feb 18 2018
a(n) = 3 * (-3)^n * a(-2-n) for all n in Z. - Michael Somos, Nov 04 2018
a(n) = ( sqrt(3) )^n * Fibonacci(n+1, 1/sqrt(3)). - G. C. Greubel, Dec 26 2019
a(n) = numerator of the continued fraction 1 + 3/(1 + 3/(1 + 3/ ... + 3/1)) with exactly n 1's, for n>0. - Greg Dresden and Alexander Mark, Aug 16 2020
With an initial 0 prepended, the sequence [0, 1, 1, 4, 7, 19, 40, ...] satisfies the congruences a(n*p^k) == e*a(n*p^(k-1)) (mod p^k) for positive integers k and n and all primes p, where e = +1 for the primes p listed in A296937, e = 0 if p = 13, otherwise e = -1. See Young, Theorem 1, Corollary 1 (i). - Peter Bala, Dec 28 2022
From Wolfdieter Lang, Nov 27 2023: (Start)
a(n) = sqrt(-3)^n*S(n, 1/sqrt(-3)) with the S-Chebyshev polynomials (see A049310), also valid for negative n, using S(-n, x) = -S(n-2, x), for n >= 2, and S(-1, x) = 0. See above the formula in terms of Fibonacci polynomials).
a(n) = A052533(n+2)/3, for n >= 0. (End)
From Peter Bala, Jun 27 2025: (Start)
G.f.: Sum_{n >= 0} x^n * Product_{k = 1..n} (k + 3*x)/(1 + k*x) = Sum_{n >= 0} x^n * Product_{k = 1..n} (1 + 3*k*x)/(1 + 3*k*x^2).
The following products telescope:
Product_{k >= 0} (1 + 3^k/a(2*k+1)) = 1 + sqrt(13).
Product_{k >= 1} (1 - 3^k/a(2*k+1)) = 1/14 * (1 + sqrt(13)).
Product_{k >= 0} (1 + (-3)^k/a(2*k+1)) = (1/13) * (13 + sqrt(13)).
Product_{k >= 1} (1 - (-3)^k/a(2*k+1)) = (1/14) * (13 + sqrt(13)). (End)

A109466 Riordan array (1, x(1-x)).

Original entry on oeis.org

1, 0, 1, 0, -1, 1, 0, 0, -2, 1, 0, 0, 1, -3, 1, 0, 0, 0, 3, -4, 1, 0, 0, 0, -1, 6, -5, 1, 0, 0, 0, 0, -4, 10, -6, 1, 0, 0, 0, 0, 1, -10, 15, -7, 1, 0, 0, 0, 0, 0, 5, -20, 21, -8, 1, 0, 0, 0, 0, 0, -1, 15, -35, 28, -9, 1, 0, 0, 0, 0, 0, 0, -6, 35, -56, 36, -10, 1, 0, 0, 0, 0, 0, 0, 1, -21, 70, -84, 45, -11, 1, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Aug 28 2005

Keywords

Comments

Inverse is Riordan array (1, xc(x)) (A106566).
Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, -1, 1, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.
Modulo 2, this sequence gives A106344. - Philippe Deléham, Dec 18 2008
Coefficient array of the polynomials Chebyshev_U(n, sqrt(x)/2)*(sqrt(x))^n. - Paul Barry, Sep 28 2009

Examples

			Rows begin:
  1;
  0,  1;
  0, -1,  1;
  0,  0, -2,  1;
  0,  0,  1, -3,  1;
  0,  0,  0,  3, -4,   1;
  0,  0,  0, -1,  6,  -5,   1;
  0,  0,  0,  0, -4,  10,  -6,   1;
  0,  0,  0,  0,  1, -10,  15,  -7,  1;
  0,  0,  0,  0,  0,   5, -20,  21, -8,  1;
  0,  0,  0,  0,  0,  -1,  15, -35, 28, -9, 1;
From _Paul Barry_, Sep 28 2009: (Start)
Production array is
  0,    1,
  0,   -1,    1,
  0,   -1,   -1,   1,
  0,   -2,   -1,  -1,   1,
  0,   -5,   -2,  -1,  -1,  1,
  0,  -14,   -5,  -2,  -1, -1,  1,
  0,  -42,  -14,  -5,  -2, -1, -1,  1,
  0, -132,  -42, -14,  -5, -2, -1, -1,  1,
  0, -429, -132, -42, -14, -5, -2, -1, -1, 1 (End)
		

Crossrefs

Cf. A026729 (unsigned version), A000108, A030528, A124644.

Programs

  • Magma
    /* As triangle */ [[(-1)^(n-k)*Binomial(k, n-k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jan 14 2016
  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[1&, #(1-#)&, 13] // Flatten (* Jean-François Alcover, Jul 16 2019 *)

Formula

Number triangle T(n, k) = (-1)^(n-k)*binomial(k, n-k).
T(n, k)*2^(n-k) = A110509(n, k); T(n, k)*3^(n-k) = A110517(n, k).
Sum_{k=0..n} T(n,k)*A000108(k)=1. - Philippe Deléham, Jun 11 2007
From Philippe Deléham, Oct 30 2008: (Start)
Sum_{k=0..n} T(n,k)*A144706(k) = A082505(n+1).
Sum_{k=0..n} T(n,k)*A002450(k) = A100335(n).
Sum_{k=0..n} T(n,k)*A001906(k) = A100334(n).
Sum_{k=0..n} T(n,k)*A015565(k) = A099322(n).
Sum_{k=0..n} T(n,k)*A003462(k) = A106233(n). (End)
Sum_{k=0..n} T(n,k)*x^(n-k) = A053404(n), A015447(n), A015446(n), A015445(n), A015443(n), A015442(n), A015441(n), A015440(n), A006131(n), A006130(n), A001045(n+1), A000045(n+1), A000012(n), A010892(n), A107920(n+1), A106852(n), A106853(n), A106854(n), A145934(n), A145976(n), A145978(n), A146078(n), A146080(n), A146083(n), A146084(n) for x = -12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12 respectively. - Philippe Deléham, Oct 27 2008
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A010892(n), A099087(n), A057083(n), A001787(n+1), A030191(n), A030192(n), A030240(n), A057084(n), A057085(n+1), A057086(n) for x = 0,1,2,3,4,5,6,7,8,9,10 respectively. - Philippe Deléham, Oct 28 2008
G.f.: 1/(1-y*x+y*x^2). - Philippe Deléham, Dec 15 2011
T(n,k) = T(n-1,k-1) - T(n-2,k-1), T(n,0) = 0^n. - Philippe Deléham, Feb 15 2012
Sum_{k=0..n} T(n,k)*x^(n-k) = F(n+1,-x) where F(n,x)is the n-th Fibonacci polynomial in x defined in A011973. - Philippe Deléham, Feb 22 2013
Sum_{k=0..n} T(n,k)^2 = A051286(n). - Philippe Deléham, Feb 26 2013
Sum_{k=0..n} T(n,k)*T(n+1,k) = -A110320(n). - Philippe Deléham, Feb 26 2013
For T(0,0) = 0, the signed triangle below has the o.g.f. G(x,t) = [t*x(1-x)]/[1-t*x(1-x)] = L[t*Cinv(x)] where L(x) = x/(1-x) and Cinv(x)=x(1-x) with the inverses Linv(x) = x/(1+x) and C(x)= [1-sqrt(1-4*x)]/2, an o.g.f. for the shifted Catalan numbers A000108, so the inverse o.g.f. is Ginv(x,t) = C[Linv(x)/t] = [1-sqrt[1-4*x/(t(1+x))]]/2 (cf. A124644 and A030528). - Tom Copeland, Jan 19 2016

A006131 a(n) = a(n-1) + 4*a(n-2), a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 5, 9, 29, 65, 181, 441, 1165, 2929, 7589, 19305, 49661, 126881, 325525, 833049, 2135149, 5467345, 14007941, 35877321, 91909085, 235418369, 603054709, 1544728185, 3956947021, 10135859761, 25963647845, 66507086889, 170361678269
Offset: 0

Views

Author

Keywords

Comments

Length-n words with letters {0,1,2,3,4} where no two consecutive letters are nonzero, see fxtbook link below. - Joerg Arndt, Apr 08 2011
Equals INVERTi transform of A063727: (1, 2, 8, 24, 80, 256, 832, ...). - Gary W. Adamson, Aug 12 2010
a(n) is equal to the permanent of the n X n Hessenberg matrix with 1's along the main diagonal, 2's along the superdiagonal and the subdiagonal, and 0's everywhere else. - John M. Campbell, Jun 09 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 2, 5*a(n-2) equals the number of 5-colored compositions of n with all parts >= 2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011
Pisano period lengths: 1, 1, 8, 1, 6, 8, 48, 2, 24, 6,120, 8, 12, 48, 24, 4,136, 24, 18, 6, ... - R. J. Mathar, Aug 10 2012
This is one of only two Lucas-type sequences whose 8th term is a square. The other one is A097705. - Michel Marcus, Dec 07 2012
Numerators of stationary probabilities for the M2/M/1 queue. In this queue, customers arrives in groups of 2. Intensity of arrival = 1. Service rate = 4. There is only one server and an infinite queue. - Igor Kleiner, Nov 02 2018
Number of 4-compositions of n+2 with 1 not allowed as a part; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
From M. Eren Kesim, May 13 2021: (Start)
a(n) is equal to the number of n-step walks from a universal vertex to another (itself or the other) on the diamond graph. It is also equal to the number of (n+1)-step walks from vertex A to vertex B on the graph below.
B--C
| /|
|/ |
A--D
(End)
From Wolfdieter Lang, Jan 03 2024: (Start)
This sequence {a(n-1)}, with a(-1) = 0, appears in the formula for powers of phi17 := (1 + sqrt(17))/2 = A222132, the fundamental (integer) algebraic number of Q(sqrt(17)): phi17^n = A052923(n) + a(n-1)*phi17, for n >= 0.
Limit_{n->oo} a(n+1)/a(n) = phi17. (End)

Examples

			G.f. = 1 + x + 5*x^2 + 9*x^3 + 29*x^4 + 65*x^5 + 181*x^6 + 441*x^7 + 1165*x^8 + ...
		

References

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

Crossrefs

Programs

  • GAP
    a:=[1,1];; for n in [3..30] do a[n]:=a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Dec 26 2019
    
  • Magma
    [ n eq 1 select 1 else n eq 2 select 1 else Self(n-1)+4*Self(n-2): n in [1..40] ]; // Vincenzo Librandi, Aug 19 2011
    
  • Maple
    A006131:=-1/(-1+z+4*z**2); # conjectured by Simon Plouffe in his 1992 dissertation
    seq( simplify((2/I)^n*ChebyshevU(n, I/4)), n=0..30); # G. C. Greubel, Dec 26 2019
  • Mathematica
    m = 16; f[n_] = Product[(1 + m*Cos[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]; Table[FullSimplify[ExpandAll[f[n]]], {n, 0, 15}]; N[%] (* Roger L. Bagula, Nov 21 2008 *)
    a[n_]:=(MatrixPower[{{1,4},{1,0}},n].{{1},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
    LinearRecurrence[{1, 4}, {1, 1}, 29] (* Jean-François Alcover, Sep 25 2017 *)
    Table[2^n*Fibonacci[n+1, 1/2], {n,0,30}] (* G. C. Greubel, Dec 26 2019 *)
  • PARI
    a(n)=([0,1; 4,1]^n*[1;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    
  • PARI
    vector(31, n, (2/I)^(n-1)*polchebyshev(n-1, 2, I/4) ) \\ G. C. Greubel, Dec 26 2019
    
  • Python
    def A006131_list(n):
        list = [1, 1] + [0] * (n - 2)
        for i in range(2, n):
            list[i] = list[i - 1] + 4 * list[i - 2]
        return list
    print(A006131_list(29)) # M. Eren Kesim, Jul 19 2021
  • Sage
    [lucas_number1(n,1,-4) for n in range(1, 30)] # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: 1/(1 - x - 4*x^2).
a(n) = (((1+sqrt(17))/2)^(n+1) - ((1-sqrt(17))/2)^(n+1))/sqrt(17).
a(n+1) = Sum_{k=0..ceiling(n/2)} 4^k*binomial(n-k, k). - Benoit Cloitre, Mar 06 2004
a(n) = Sum_{k=0..n} binomial((n+k)/2, (n-k)/2)*(1+(-1)^(n-k))*2^(n-k)/2. - Paul Barry, Aug 28 2005
a(n) = A102446(n)/2. - Zerinvary Lajos, Jul 09 2008
a(n) = Sum_{k=0..n} A109466(n,k)*(-4)^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = Product_{k=1..floor((n - 1)/2)} (1 + 16*cos(k*Pi/n)^2). - Roger L. Bagula, Nov 21 2008
Limiting ratio a(n+1)/a(n) is (1 + sqrt(17))/2 = 2.561552812... - Roger L. Bagula, Nov 21 2008
The fraction b(n) = a(n)/2^n satisfies b(n) = 1/2 b(n-1) + b(n-2); g.f. 1/(1-x/2-x^2); b(n) = (( (1+sqrt(17))/4 )^(n+1) - ( (1-sqrt(17))/4 )^(n+1))*2/sqrt(17). - Franklin T. Adams-Watters, Nov 30 2009
G.f.: G(0)/(2-x), where G(k) = 1 + 1/(1 - x*(17*k-1)/(x*(17*k+16) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 20 2013
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+1 + 4*x)/( x*(4*k+3 + 4*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013
G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(k+1 + 4*x)/( x*(k+3/2 + 4*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 14 2013
G.f.: 1 / (1 - x / (1 - 4*x / (1 + 4*x))). - Michael Somos, Sep 15 2013
a(n) = (Sum_{1<=k<=n+1, k odd} C(n+1,k)*17^((k-1)/2))/2^n. - Vladimir Shevelev, Feb 05 2014
a(n) = 2^n*Fibonacci(n+1, 1/2) = (2/i)^n*ChebyshevU(n, i/4). - G. C. Greubel, Dec 26 2019
E.g.f.: exp(x/2)*(sqrt(17)*cosh(sqrt(17)*x/2) + sinh(sqrt(17)*x/2))/sqrt(17). - Stefano Spezia, Dec 27 2019
a(n) = A344236(n) + A344261(n). - M. Eren Kesim, May 13 2021
With an initial 0 prepended, the sequence [0, 1, 1, 5, 9, 29, 65, ...] satisfies the congruences a(n*p^k) == e*a(n*p^(k-1)) (mod p^k) for positive integers k and n and all primes p, where e = +1 for the primes p listed in A296938, e = 0 when p = 17, otherwise e = -1. - Peter Bala, Dec 28 2022
a(n) = A052923(n+2)/4. - Wolfdieter Lang, Jan 03 2024
From Peter Bala, Jun 27 2025: (Start)
The following products telescope:
Product_{k >= 0} (1 + 4^k/a(2*k+1)) = 1 + sqrt(17).
Product_{k >= 1} (1 - 4^k/a(2*k+1)) = 1/18 * (1 + sqrt(17)).
Product_{k >= 0} (1 + (-4)^k/a(2*k+1)) = (1/17) * (17 + sqrt(17)).
Product_{k >= 1} (1 - (-4)^k/a(2*k+1)) = (1/18) * (17 + sqrt(17)). (End)

Extensions

More terms from Roger L. Bagula, Sep 26 2006

A053404 Expansion of 1/((1+3*x)*(1-4*x)).

Original entry on oeis.org

1, 1, 13, 25, 181, 481, 2653, 8425, 40261, 141361, 624493, 2320825, 9814741, 37664641, 155441533, 607417225, 2472715621, 9761722321, 39434309773, 156574977625, 629786694901, 2508686426401, 10066126765213, 40170363882025
Offset: 0

Views

Author

Barry E. Williams, Jan 07 2000

Keywords

Comments

Hankel transform is := 1,12,0,0,0,... - Philippe Deléham, Nov 02 2008
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=2, 13*a(n-2) equals the number of 13-colored compositions of n with all parts >=2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 194-196.

Crossrefs

Programs

  • Magma
    [((4^(n+1)) - (-3)^(n+1))/7: n in [0..30]]; // G. C. Greubel, Jan 16 2018
  • Maple
    seq(simplify(hypergeom([1/2 - (1/2)*n, -(1/2)*n], [-n], -48)), n = 1..40); # Peter Bala, Jul 05 2025
  • Mathematica
    CoefficientList[Series[1/((1 + 3 x) (1 - 4 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 06 2014 *)
  • PARI
    a(n)=([0,1; 12,1]^n*[1;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    
  • Sage
    [lucas_number1(n,1,-12) for n in range(1, 25)] # Zerinvary Lajos, Apr 22 2009
    

Formula

a(n) = ((4^(n+1))-(-3)^(n+1))/7.
a(n) = a(n-1) + 12*a(n-2), n > 1; a(0)=1, a(1)=1.
From Paul Barry, Jul 30 2004: (Start)
Convolution of 4^n and (-3)^n.
G.f.: 1/((1+3x)(1-4x)); a(n) = Sum_{k=0..n, 4^k*(-3)^(n-k)} = Sum_{k=0..n, (-3)^k*4^(n-k)}. (End)
a(n) = Sum_{k, 0<=k<=n} A109466(n,k)*(-12)^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = (sum_{1<=k<=n+1, k odd} C(n+1,k)*7^(k-1))/2^n. - Vladimir Shevelev, Feb 05 2014
From Peter Bala, Jun 27 2025: (Start)
a(n) = hypergeom([1/2 - (1/2)*n, -(1/2)*n], [-n], -48) for n >= 1.
The following products telescope:
Product_{k >= 0} (1 + 12^k/a(2*k+1)) = 8.
Product_{k >= 1} (1 - 12^k/a(2*k+1)) = 4/25.
Product_{k >= 0} (1 + (-12)^k/a(2*k+1)) = 8/7.
Product_{k >= 1} (1 - (-12)^k/a(2*k+1)) = 28/25. (End)

Extensions

More terms from James Sellers, Feb 02 2000

A015442 a(n) = a(n-1) + 7*a(n-2), a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 8, 15, 71, 176, 673, 1905, 6616, 19951, 66263, 205920, 669761, 2111201, 6799528, 21577935, 69174631, 220220176, 704442593, 2245983825, 7177081976, 22898968751, 73138542583, 233431323840, 745401121921, 2379420388801
Offset: 0

Views

Author

Keywords

Comments

One obtains A015523 through a binomial transform, and A197189 by shifting one place left (starting 1,1,8 with offset 0) followed by a binomial transform. - R. J. Mathar, Oct 11 2011
The compositions of n in which each positive integer is colored by one of p different colors are called p-colored compositions of n. For n>=2, 8*a(n-1) equals the number of 8-colored compositions of n, with all parts >=2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011
a(n+1) is the number of compositions (ordered partitions) of n into parts 1 and 2, where there are 7 sorts of part 2. - Joerg Arndt, Jan 16 2024
Pisano period lengths: 1, 3, 8, 6, 4, 24, 1, 6, 24, 12, 60, 24, 12, 3, 8, 6, 288, 24, 120, 12, ... - R. J. Mathar, Aug 10 2012

Crossrefs

Programs

  • Magma
    I:=[0, 1]; [n le 2 select I[n] else Self(n-1) + 7*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Oct 17 2012
    
  • Mathematica
    LinearRecurrence[{1, 7}, {0, 1}, 30] (* Vincenzo Librandi, Oct 17 2012 *)
    nxt[{a_,b_}]:={b,7a+b}; NestList[nxt,{0,1},30][[All,1]] (* Harvey P. Dale, Feb 25 2022 *)
  • PARI
    concat(0,Vec(1/(1-x-7*x^2)+O(x^99))) \\ Charles R Greathouse IV, Mar 12 2014
  • Sage
    [lucas_number1(n,1,-7) for n in range(0, 27)] # Zerinvary Lajos, Apr 22 2009
    

Formula

O.g.f.: x/(1-x-7x^2). - R. J. Mathar, May 06 2008
a(n) = ( ((1+sqrt(29))/2)^(n+1) - ((1-sqrt(29))/2)^(n+1) )/sqrt(29).
a(n) = 8*a(n-2) + 7*a(n-3) with characteristic polynomial x^3 - 8*x - 7. - Roger L. Bagula, May 30 2007
a(n+1) = Sum_{k=0..n} A109466(n,k)*(-7)^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = (Sum_{1<=k<=n, k odd} C(n,k)*29^((k-1)/2))/2^(n-1). - Vladimir Shevelev, Feb 05 2014
a(n) = sqrt(-7)^(n-1)*S(n-1, 1/sqrt(-7)), with the Chebyshev polynomial S(n, x), and S(-1, x) = 1 (see A049310). - Wolfdieter Lang, Nov 26 2023

A057089 Scaled Chebyshev U-polynomials evaluated at i*sqrt(6)/2. Generalized Fibonacci sequence.

Original entry on oeis.org

1, 6, 42, 288, 1980, 13608, 93528, 642816, 4418064, 30365280, 208700064, 1434392064, 9858552768, 67757668992, 465697330560, 3200729997312, 21998563967232, 151195763787264, 1039165966526976, 7142170381885440
Offset: 0

Views

Author

Wolfdieter Lang, Aug 11 2000

Keywords

Comments

a(n) gives the length of the word obtained after n steps with the substitution rule 0->1^6, 1->(1^6)0, starting from 0. The number of 1's and 0's of this word is 6*a(n-1) and 6*a(n-2), resp.

Crossrefs

Programs

Formula

a(n) = 6*a(n-1) + 6*a(n-2); a(0)=1, a(1)=6.
a(n) = S(n, i*sqrt(6))*(-i*sqrt(6))^n with S(n, x) := U(n, x/2), Chebyshev's polynomials of the 2nd kind, A049310.
G.f.: 1/(1-6*x-6*x^2).
a(n) = Sum_{k=0..n} 5^k*A063967(n,k). - Philippe Deléham, Nov 03 2006

A111006 Another version of Fibonacci-Pascal triangle A037027.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 0, 2, 3, 0, 0, 1, 5, 5, 0, 0, 0, 3, 10, 8, 0, 0, 0, 1, 9, 20, 13, 0, 0, 0, 0, 4, 22, 38, 21, 0, 0, 0, 0, 1, 14, 51, 71, 34, 0, 0, 0, 0, 0, 5, 40, 111, 130, 55, 0, 0, 0, 0, 0, 1, 20, 105, 233, 235, 89, 0, 0, 0, 0, 0, 0, 6, 65, 256, 474, 420, 144
Offset: 0

Views

Author

Philippe Deléham, Oct 02 2005

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, -1, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.
Row sums are the Jacobsthal numbers A001045(n+1) and column sums form Pell numbers A000129.
Maximal column entries: A038149 = {1, 1, 2, 5, 10, 22, ...}.
T(n,k) gives a convolved Fibonacci sequence (A001629, A001872, ...).
Triangle read by rows: T(n,n-k) is the number of ways to tile a 2 X n rectangle with k pieces of 2 X 2 tiles and n-2k pieces of 1 X 2 tiles (0 <= k <= floor(n/2)). - Philippe Deléham, Feb 17 2014
Diagonal sums are A013979(n). - Philippe Deléham, Feb 17 2014
T(n,k) is the number of ways to tile a 2 X n rectangle with k pieces of 2 X 2 tiles and 1 X 2 tiles. - Emeric Deutsch, Aug 14 2014

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 2;
  0, 0, 2, 3;
  0, 0, 1, 5,  5;
  0, 0, 0, 3, 10,  8;
  0, 0, 0, 1,  9, 20, 13;
  0, 0, 0, 0,  4, 22, 38,  21;
  0, 0, 0, 0,  1, 14, 51,  71,  34;
  0, 0, 0, 0,  0,  5, 40, 111, 130,  55;
  0, 0, 0, 0,  0,  1, 20, 105, 233, 235,  89;
  0, 0, 0, 0,  0,  0,  6,  65, 256, 474, 420, 144;
		

Crossrefs

Cf. A000045, A000129, A001045, A037027, A038112, A038149, A084938, A128100 (reversed version).
Some other Fibonacci-Pascal triangles: A027926, A036355, A037027, A074829, A105809, A109906, A114197, A162741, A228074.

Programs

  • Haskell
    a111006 n k = a111006_tabl !! n !! k
    a111006_row n = a111006_tabl !! n
    a111006_tabl =  map fst $ iterate (\(us, vs) ->
       (vs, zipWith (+) (zipWith (+) ([0] ++ us ++ [0]) ([0,0] ++ us))
                        ([0] ++ vs))) ([1], [0,1])
    -- Reinhard Zumkeller, Aug 15 2013

Formula

T(0, 0) = 1, T(n, k) = 0 for k < 0 or for n < k, T(n, k) = T(n-1, k-1) + T(n-2, k-1) + T(n-2, k-2).
T(n, k) = A037027(k, n-k). T(n, n) = A000045(n+1). T(3n, 2n) = (n+1)*A001002(n+1) = A038112(n).
G.f.: 1/(1-yx(1-x)-x^2*y^2). - Paul Barry, Oct 04 2005
Sum_{k=0..n} x^k*T(n,k) = (-1)^n*A053524(n+1), (-1)^n*A083858(n+1), (-1)^n*A002605(n), A033999(n), A000007(n), A001045(n+1), A083099(n) for x = -4, -3, -2, -1, 0, 1, 2 respectively. - Philippe Deléham, Dec 02 2006
Sum_{k=0..n} T(n,k)*x^(n-k) = A053404(n), A015447(n), A015446(n), A015445(n), A015443(n), A015442(n), A015441(n), A015440(n), A006131(n), A006130(n), A001045(n+1), A000045(n+1) for x = 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 respectively. - Philippe Deléham, Feb 17 2014

A135030 Generalized Fibonacci numbers: a(n) = 6*a(n-1) + 2*a(n-2).

Original entry on oeis.org

0, 1, 6, 38, 240, 1516, 9576, 60488, 382080, 2413456, 15244896, 96296288, 608267520, 3842197696, 24269721216, 153302722688, 968355778560, 6116740116736, 38637152257536, 244056393778688, 1541612667187200
Offset: 0

Views

Author

Rolf Pleisch, Feb 10 2008, Feb 14 2008

Keywords

Comments

For n>0, a(n) equals the number of words of length n-1 over {0,1,...,7} in which 0 and 1 avoid runs of odd lengths. - Milan Janjic, Jan 08 2017

Crossrefs

Programs

  • Magma
    [n le 2 select n-1 else 6*Self(n-1) + 2*Self(n-2): n in [1..35]]; // Vincenzo Librandi, Sep 18 2016
    
  • Maple
    A:= gfun:-rectoproc({a(0) = 0, a(1) = 1, a(n) = 2*(3*a(n-1) + a(n-2))},a(n),remember):
    seq(A(n),n=1..30); # Robert Israel, Sep 16 2014
  • Mathematica
    Join[{a=0,b=1},Table[c=6*b+2*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 16 2011 *)
    LinearRecurrence[{6,2},{0,1},30] (* or *) CoefficientList[Series[ -(x/(2x^2+6x-1)),{x,0,30}],x] (* Harvey P. Dale, Jun 20 2011 *)
  • PARI
    a(n)=([0,1; 2,6]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
  • Sage
    [lucas_number1(n,6,-2) for n in range(0, 21)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(0) = 0; a(1) = 1; a(n) = 2*(3*a(n-1) + a(n-2)).
a(n) = 1/(2*sqrt(11))*( (3 + sqrt(11))^n - (3 - sqrt(11))^n ).
G.f.: x/(1 - 6*x - 2*x^2). - Harvey P. Dale, Jun 20 2011
a(n+1) = Sum_{k=0..n} A099097(n,k)*2^k. - Philippe Deléham, Sep 16 2014
E.g.f.: (1/sqrt(11))*exp(3*x)*sinh(sqrt(11)*x). - G. C. Greubel, Sep 17 2016

Extensions

More terms from Joshua Zucker, Feb 23 2008

A083856 Square array T(n,k) of generalized Fibonacci numbers, read by antidiagonals upwards (n, k >= 0).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 3, 3, 1, 0, 1, 1, 4, 5, 5, 1, 0, 1, 1, 5, 7, 11, 8, 1, 0, 1, 1, 6, 9, 19, 21, 13, 1, 0, 1, 1, 7, 11, 29, 40, 43, 21, 1, 0, 1, 1, 8, 13, 41, 65, 97, 85, 34, 1, 0, 1, 1, 9, 15, 55, 96, 181, 217, 171, 55, 1
Offset: 0

Views

Author

Paul Barry, May 06 2003

Keywords

Comments

Row n >= 0 of the array gives the solution to the recurrence b(k) = b(k-1) + n*b(k-2) for k >= 2 with b(0) = 0 and b(1) = 1.

Examples

			Array T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:
  0, 1, 1,  1,  1,   1,   1,    1,    1,     1, ... [A057427]
  0, 1, 1,  2,  3,   5,   8,   13,   21,    34, ... [A000045]
  0, 1, 1,  3,  5,  11,  21,   43,   85,   171, ... [A001045]
  0, 1, 1,  4,  7,  19,  40,   97,  217,   508, ... [A006130]
  0, 1, 1,  5,  9,  29,  65,  181,  441,  1165, ... [A006131]
  0, 1, 1,  6, 11,  41,  96,  301,  781,  2286, ... [A015440]
  0, 1, 1,  7, 13,  55, 133,  463, 1261,  4039, ... [A015441]
  0, 1, 1,  8, 15,  71, 176,  673, 1905,  6616, ... [A015442]
  0, 1, 1,  9, 17,  89, 225,  937, 2737, 10233, ... [A015443]
  0, 1, 1, 10, 19, 109, 280, 1261, 3781, 15130, ... [A015445]
  ...
		

Crossrefs

Rows include A057427 (n=0), A000045 (n=1), A001045 (n=2), A006130 (n=3), A006131 (n=4), A015440 (n=5), A015441 (n=6), A015442 (n=7), A015443 (n=8), A015445 (n=9).
Columns include A000012 (k=1,2), A000027 (k=3), A005408 (k=4), A028387 (k=5), A000567 (k=6), A106734 (k=7).
Cf. A083857 (binomial transform), A083859 (main diagonal), A083860 (first subdiagonal), A083861 (second binomial transform), A110112, A110113 (diagonal sums), A193376 (transposed variant), A172237 (transposed variant).

Programs

  • Julia
    function generalized_fibonacci(r, n)
       F = BigInt[1 r; 1 0]
       Fn = F^n
       Fn[2, 1]
    end
    for r in 0:6 println([generalized_fibonacci(r, n) for n in 0:9]) end # Peter Luschny, Mar 06 2017
  • Maple
    A083856_row := proc(r, n) local R; R := proc(n) option remember;
    if n<=1 then n else R(n-1)+r*R(n-2) fi end: R(n) end:
    for r from 0 to 9 do seq(A083856_row(r, n), n=0..9) od; # Peter Luschny, Mar 06 2017
  • Mathematica
    T[, 0] = 0; T[, 1|2] = 1; T[n_, k_] := T[n, k] = T[n, k-1] + n T[n, k-2];
    Table[T[n-k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 22 2018 *)

Formula

T(n, k) = (((1 + sqrt(4*n + 1))/2)^k - ((1 - sqrt(4*n + 1))/2)^k)/sqrt(4*n + 1). [corrected by Michel Marcus, Jun 25 2018]
From Thomas Baruchel, Jun 25 2018: (Start)
The g.f. for row n >= 0 is x/(1 - x - n*x^2).
The g.f. for column k >= 1 is g(k,x) = 1/(1-x) + Sum_{m = 1..floor((k-1)/2)} (1 - x)^(-1 - m) * binomial(k - 1 - m, m) * Sum_{i = 0..m} x^i * Sum_{j = 0..i} (-1)^j * (i - j)^m * binomial(1 + m, j).
The g.f. for column k >= 1 is also g(k,x) = 1 + Sum_{m = 1..floor((k+1)/2)} ((1 - x)^(-m) * binomial(k-m, m-1) * Sum_{j = 0..m} (-1)^j * binomial(m, j) * x^m * Phi(x, -m+1, -j+m)) + Sum_{s = 0..floor((k-1)/2)} binomial(k-s-1, s) * PolyLog(-s, x), where Phi is the Lerch transcendent function. (End)
T(n,k) = Sum_{i = 0..k} (-1)^(k+i) * binomial(k,i) * A083857(n,i). - Petros Hadjicostas, Dec 24 2019

Extensions

Various sections edited by Petros Hadjicostas, Dec 24 2019
Showing 1-10 of 25 results. Next