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

A084868 Main diagonal of symmetric square table A084867, in which the antidiagonal sums (A006012) form the first row shifted left.

Original entry on oeis.org

1, 2, 8, 36, 168, 796, 3800, 18216, 87536, 421292, 2029592, 9784088, 47187536, 227651352, 1098523504, 5301727824, 25590307552, 123529362124, 596337248024, 2878947861432, 13899229883024, 67105641925064, 323993230750672
Offset: 0

Views

Author

Paul D. Hanna, Jun 10 2003, Jun 11 2003

Keywords

Comments

The Hankel transform (see A001906 for definition) of this sequence is A000302 (powers of 4): 1, 4, 16, 64, 256, 1024, ... - Philippe Deléham, Aug 17 2005

Examples

			1 + 2*x + 8*x^2 + 36*x^3 + 168*x^4 + 796*x^5 + 3800*x^6 + 18216*x^7 + ...
		

Crossrefs

Programs

  • Maple
    1/(1-x/(sqrt(1/4-x))): series(%,x,23): seq(coeff(%,x,n),n=0..22); # Peter Luschny, Feb 06 2017
  • Mathematica
    Table[SeriesCoefficient[((1-4*x)+2*x*Sqrt[1-4*x])/(1-4*x-4*x^2),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 14 2012 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff((1 - 4*x + 2*x * sqrt(1 - 4*x + x * O(x^n))) /(1 - 4*x - 4*x^2), n))} /* Michael Somos, Jan 05 2012 */

Formula

Differential equation: (16*x^3 + 12*x^2 - 8*x + 1) * x*(d/dx)A(x) + (8x^3 - 12*x^2 + 6*x - 1) * A(x) + (8x^2 - 6*x + 1) = 0.
G.f.: ((1 - 4*x) + 2*x * sqrt(1 - 4*x)) / (1 - 4*x - 4*x^2). a(n) * (n-1) = a(n-1) * (8*n - 14) - a(n-2) * 12*(n-3) - a(n-3) * 8*(2*n - 5), n > 2. Hankel number wall zig-zag diagonal is A011782. - Michael Somos, Sep 14 2003
INVERT transform of A028329 (offset 1). - Michael Somos, Jan 05 2012
G.f.: (1-2*x*f(x))/(1-2*x*f(x)-2*x) where f(x) is the g.f. of A000108 (Catalan numbers). - Philippe Deléham, Jan 30 2012
a(n) ~ (1-1/sqrt(2))*(2+2*sqrt(2))^n. - Vaclav Kotesovec, Oct 14 2012
From Peter Bala, Feb 05 2017: (Start)
G.f: sqrt(1 - 4*x)/(sqrt(1 - 4*x) - 2*x) = 1/(1 - 2*x/(1 - 2*x/(1 - x/(1 - x/(1 - x/(1 - ...)))))) (continued fraction). Cf. A026671, A081696.
Catalan transform of A006012, that is, equals A106566*A006012, as noted by R. J. Mathar. (End)

A166231 a(n) = 2^C(n+1,2)*A006012(n).

Original entry on oeis.org

1, 4, 48, 1280, 69632, 7602176, 1660944384, 725849473024, 634418209226752, 1109011408239984640, 3877275019992826380288, 27111105978154633171828736, 379138479844261543254652092416, 10604214183559196000870296488771584
Offset: 0

Views

Author

Paul Barry, Oct 09 2009

Keywords

Comments

Hankel transform of A166228, A166229.

Crossrefs

Programs

  • Mathematica
    Table[2^(Binomial[n + 1, 2])*Sum[Binomial[n, 2 k]*2^(n - k), {k, 0, Floor[n/2]}], {n, 0, 25}] (* G. C. Greubel, May 07 2016 *)

Formula

a(n) = 2^C(n+1,2)*Sum_{k=0..floor(n/2)} C(n,2k)*2^(n-k).
a(n) = 4^n*A166232(n).

A152252 Triangle read by rows, M*Q, where M = an infinite lower triangular matrix with powers of 3 prefaced by a 1 in every row: (1, 1, 3, 9, 27, ...) and Q = a matrix with A006012 prefaced by a 1 as the main diagonal and the rest zeros.

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 9, 3, 2, 6, 27, 9, 6, 6, 20, 81, 27, 18, 18, 20, 68, 243, 81, 54, 54, 60, 68, 232, 729, 243, 162, 162, 180, 204, 232, 792, 2187, 729, 486, 486, 540, 612, 696, 792, 2704, 6561, 2187, 1458, 1458, 1620, 1836, 2088, 2376, 2704, 9232
Offset: 0

Views

Author

Gary W. Adamson, Nov 30 2008

Keywords

Comments

Eigentriangle, row sums = A006012
Row sums = A006012: (1, 2, 6, 20, 68, 232, ...).
Sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle:
     1;
     1,   1;
     3,   1,   2;
     9,   3,   2,   6;
    27,   9,   6,   6,  20;
    81,  27,  18,  18,  20,  68;
   243,  81,  54,  54,  60,  68, 232;
   729, 243, 162, 162, 180, 204, 232, 792;
  2187, 729, 846, 486, 540, 612, 696, 792, 2704;
  ...
Row 3 = (9, 3, 2, 6) = termwise products of (9, 3, 1, 1) and (1, 1, 2, 6).
		

Crossrefs

Cf. A006012.

A001333 Pell-Lucas numbers: numerators of continued fraction convergents to sqrt(2).

Original entry on oeis.org

1, 1, 3, 7, 17, 41, 99, 239, 577, 1393, 3363, 8119, 19601, 47321, 114243, 275807, 665857, 1607521, 3880899, 9369319, 22619537, 54608393, 131836323, 318281039, 768398401, 1855077841, 4478554083, 10812186007, 26102926097, 63018038201, 152139002499, 367296043199
Offset: 0

Views

Author

Keywords

Comments

Number of n-step non-selfintersecting paths starting at (0,0) with steps of types (1,0), (-1,0) or (0,1) [Stanley].
Number of n steps one-sided prudent walks with east, west and north steps. - Shanzhen Gao, Apr 26 2011
Number of ternary strings of length n-1 with subwords (0,2) and (2,0) not allowed. - Olivier Gérard, Aug 28 2012
Number of symmetric 2n X 2 or (2n-1) X 2 crossword puzzle grids: all white squares are edge connected; at least 1 white square on every edge of grid; 180-degree rotational symmetry. - Erich Friedman
a(n+1) is the number of ways to put molecules on a 2 X n ladder lattice so that the molecules do not touch each other.
In other words, a(n+1) is the number of independent vertex sets and vertex covers in the n-ladder graph P_2 X P_n. - Eric W. Weisstein, Apr 04 2017
Number of (n-1) X 2 binary arrays with a path of adjacent 1's from top row to bottom row, see A359576. - R. H. Hardin, Mar 16 2002
a(2*n+1) with b(2*n+1) := A000129(2*n+1), n >= 0, give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = -1.
a(2*n) with b(2*n) := A000129(2*n), n >= 1, give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = +1 (see Emerson reference).
Bisection: a(2*n) = T(n,3) = A001541(n), n >= 0 and a(2*n+1) = S(2*n,2*sqrt(2)) = A002315(n), n >= 0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second kind. See A053120, resp. A049310.
Binomial transform of A077957. - Paul Barry, Feb 25 2003
For n > 0, the number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 4 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 2, s(n) = 2. - Herbert Kociemba, Jun 02 2004
For n > 1, a(n) corresponds to the longer side of a near right-angled isosceles triangle, one of the equal sides being A000129(n). - Lekraj Beedassy, Aug 06 2004
Exponents of terms in the series F(x,1), where F is determined by the equation F(x,y) = xy + F(x^2*y,x). - Jonathan Sondow, Dec 18 2004
Number of n-words from the alphabet A={0,1,2} which two neighbors differ by at most 1. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Aug 30 2006
Consider the mapping f(a/b) = (a + 2b)/(a + b). Taking a = b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the following sequence 1/1, 3/2, 7/5, 17/12, 41/29, ... converging to 2^(1/2). Sequence contains the numerators. - Amarnath Murthy, Mar 22 2003 [Amended by Paul E. Black (paul.black(AT)nist.gov), Dec 18 2006]
Odd-indexed prime numerators are prime RMS numbers (A140480) and also NSW primes (A088165). - Ctibor O. Zizka, Aug 13 2008
The intermediate convergents to 2^(1/2) begin with 4/3, 10/7, 24/17, 58/41; essentially, numerators=A052542 and denominators here. - Clark Kimberling, Aug 26 2008
Equals right border of triangle A143966. Starting (1, 3, 7, ...) equals INVERT transform of (1, 2, 2, 2, ...) and row sums of triangle A143966. - Gary W. Adamson, Sep 06 2008
Inverse binomial transform of A006012; Hankel transform is := [1, 2, 0, 0, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Dec 04 2008
From Charlie Marion, Jan 07 2009: (Start)
In general, denominators, a(k,n) and numerators, b(k,n), of continued fraction convergents to sqrt((k+1)/k) may be found as follows:
let a(k,0) = 1, a(k,1) = 2k; for n>0, a(k,2n) = 2*a(k,2n-1) + a(k,2n-2) and a(k,2n+1) = (2k)*a(k,2n) + a(k,2n-1);
let b(k,0) = 1, b(k,1) = 2k+1; for n>0, b(k,2n) = 2*b(k,2n-1) + b(k,2n-2) and b(k,2n+1) = (2k)*b(k,2n) + b(k,2n-1).
For example, the convergents to sqrt(2/1) start 1/1, 3/2, 7/5, 17/12, 41/29.
In general, if a(k,n) and b(k,n) are the denominators and numerators, respectively, of continued fraction convergents to sqrt((k+1)/k) as defined above, then
k*a(k,2n)^2 - a(k,2n-1)*a(k,2n+1) = k = k*a(k,2n-2)*a(k,2n) - a(k,2n-1)^2 and
b(k,2n-1)*b(k,2n+1) - k*b(k,2n)^2 = k+1 = b(k,2n-1)^2 - k*b(k,2n-2)*b(k,2n);
for example, if k=1 and n=3, then b(1,n)=a(n+1) and
1*a(1,6)^2 - a(1,5)*a(1,7) = 1*169^2 - 70*408 = 1;
1*a(1,4)*a(1,6) - a(1,5)^2 = 1*29*169 - 70^2 = 1;
b(1,5)*b(1,7) - 1*b(1,6)^2 = 99*577 - 1*239^2 = 2;
b(1,5)^2 - 1*b(1,4)*b(1,6) = 99^2 - 1*41*239 = 2.
(End)
This sequence occurs in the lower bound of the order of the set of equivalent resistances of n equal resistors combined in series and in parallel (A048211). - Sameen Ahmed Khan, Jun 28 2010
Let M = a triangle with the Fibonacci series in each column, but the leftmost column is shifted upwards one row. A001333 = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 27 2010
a(n) is the number of compositions of n when there are 1 type of 1 and 2 types of other natural numbers. - Milan Janjic, Aug 13 2010
Equals the INVERTi transform of A055099. - Gary W. Adamson, Aug 14 2010
From L. Edson Jeffery, Apr 04 2011: (Start)
Let U be the unit-primitive matrix (see [Jeffery])
U = U_(8,2) = (0 0 1 0)
(0 1 0 1)
(1 0 2 0)
(0 2 0 1).
Then a(n) = (1/4)*Trace(U^n). (See also A084130, A006012.)
(End)
For n >= 1, row sums of triangle
m/k.|..0.....1.....2.....3.....4.....5.....6.....7
==================================================
.0..|..1
.1..|..1.....2
.2..|..1.....2.....4
.3..|..1.....4.....4.....8
.4..|..1.....4....12.....8....16
.5..|..1.....6....12....32....16....32
.6..|..1.....6....24....32....80....32....64
.7..|..1.....8....24....80....80...192....64...128
which is the triangle for numbers 2^k*C(m,k) with duplicated diagonals. - Vladimir Shevelev, Apr 12 2012
a(n) is also the number of ways to place k non-attacking wazirs on a 2 X n board, summed over all k >= 0 (a wazir is a leaper [0,1]). - Vaclav Kotesovec, May 08 2012
The sequences a(n) and b(n) := A000129(n) are entries of powers of the special case of the Brahmagupta Matrix - for details see Suryanarayan's paper. Further, as Suryanarayan remark, if we set A = 2*(a(n) + b(n))*b(n), B = a(n)*(a(n) + 2*b(n)), C = a(n)^2 + 2*a(n)*b(n) + 2*b(n)^2 we obtain integral solutions of the Pythagorean relation A^2 + B^2 = C^2, where A and B are consecutive integers. - Roman Witula, Jul 28 2012
Pisano period lengths: 1, 1, 8, 4, 12, 8, 6, 4, 24, 12, 24, 8, 28, 6, 24, 8, 16, 24, 40, 12, .... - R. J. Mathar, Aug 10 2012
This sequence and A000129 give the diagonal numbers described by Theon of Smyrna. - Sture Sjöstedt, Oct 20 2012
a(n) is the top left entry of the n-th power of any of the following six 3 X 3 binary matrices: [1, 1, 1; 1, 1, 1; 1, 0, 0] or [1, 1, 1; 1, 1, 0; 1, 1, 0] or [1, 1, 1; 1, 0, 1; 1, 1, 0] or [1, 1, 1; 1, 1, 0; 1, 0, 1] or [1, 1, 1; 1, 0, 1; 1, 0, 1] or [1, 1, 1; 1, 0, 0; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
If p is prime, a(p) == 1 (mod p) (compare with similar comment for A000032). - Creighton Dement, Oct 11 2005, modified by Davide Colazingari, Jun 26 2016
a(n) = A000129(n) + A000129(n-1), where A000129(n) is the n-th Pell Number; e.g., a(6) = 99 = A000129(6) + A000129(5) = 70 + 29. Hence the sequence of fractions has the form 1 + A000129(n-1)/A000129(n), and the ratio A000129(n-1)/A000129(n)converges to sqrt(2) - 1. - Gregory L. Simay, Nov 30 2018
For n > 0, a(n+1) is the length of tau^n(1) where tau is the morphism: 1 -> 101, 0 -> 1. See Song and Wu. - Michel Marcus, Jul 21 2020
For n > 0, a(n) is the number of nonisomorphic quasitrivial semigroups with n elements, see Devillet, Marichal, Teheux. A292932 is the number of labeled quasitrivial semigroups. - Peter Jipsen, Mar 28 2021
a(n) is the permanent of the n X n tridiagonal matrix defined in A332602. - Stefano Spezia, Apr 12 2022
From Greg Dresden, May 08 2023: (Start)
For n >= 2, 4*a(n) is the number of ways to tile this T-shaped figure of length n-1 with two colors of squares and one color of domino; shown here is the figure of length 5 (corresponding to n=6), and it has 4*a(6) = 396 different tilings.
_
|| _
|||_|||
|_|
(End)
12*a(n) = number of walks of length n in the cyclic Kautz digraph CK(3,4). - Miquel A. Fiol, Feb 15 2024

Examples

			Convergents are 1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, 8119/5741, 19601/13860, 47321/33461, 114243/80782, ... = A001333/A000129.
The 15 3 X 2 crossword grids, with white squares represented by an o:
  ooo ooo ooo ooo ooo ooo ooo oo. o.o .oo o.. .o. ..o oo. .oo
  ooo oo. o.o .oo o.. .o. ..o ooo ooo ooo ooo ooo ooo .oo oo.
G.f. = 1 + x + 3*x^2 + 7*x^3 + 17*x^4 + 41*x^5 + 99*x^6 + 239*x^7 + 577*x^8 + ...
		

References

  • M. R. Bacon and C. K. Cook, Some properties of Oresme numbers and convolutions ..., Fib. Q., 62:3 (2024), 233-240.
  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 122-125, 1964.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 204.
  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.
  • J. Devillet, J.-L. Marichal, and B. Teheux, Classifications of quasitrivial semigroups, Semigroup Forum, 100 (2020), 743-764.
  • Maribel Díaz Noguera [Maribel Del Carmen Díaz Noguera], Rigoberto Flores, Jose L. Ramirez, and Martha Romero Rojas, Catalan identities for generalized Fibonacci polynomials, Fib. Q., 62:2 (2024), 100-111.
  • Kenneth Edwards and Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • R. P. Grimaldi, Ternary strings with no consecutive 0's and no consecutive 1's, Congressus Numerantium, 205 (2011), 129-149.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.5 The Fibonacci and Related Sequences, p. 288.
  • A. F. Horadam, R. P. Loh, and A. G. Shannon, Divisibility properties of some Fibonacci-type sequences, pp. 55-64 of Combinatorial Mathematics VI (Armidale 1978), Lect. Notes Math. 748, 1979.
  • Thomas Koshy, Pell and Pell-Lucas Numbers with Applications, Springer, New York, 2014.
  • Kin Y. Li, Math Problem Book I, 2001, p. 24, Problem 159.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 102, Problem 10.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 224.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Volume 1 (1986), p. 203, Example 4.1.2.
  • A. Tarn, Approximations to certain square roots and the series of numbers connected therewith, Mathematical Questions and Solutions from the Educational Times, 1 (1916), 8-12.
  • R. C. Tilley et al., The cell growth problem for filaments, Proc. Louisiana Conf. Combinatorics, ed. R. C. Mullin et al., Baton Rouge, 1970, 310-339.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987, p. 34.

Crossrefs

For denominators see A000129.
See A040000 for the continued fraction expansion of sqrt(2).
See also A078057 which is the same sequence without the initial 1.
Cf. also A002203, A152113.
Row sums of unsigned Chebyshev T-triangle A053120. a(n)= A054458(n, 0) (first column of convolution triangle).
Row sums of A140750, A160756, A135837.
Equals A034182(n-1) + 2 and A084128(n)/2^n. First differences of A052937. Partial sums of A052542. Pairwise sums of A048624. Bisection of A002965.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A002605, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.
Second row of the array in A135597.
Cf. A055099.
Cf. A028859, A001906 / A088305, A033303, A000225, A095263, A003945, A006356, A002478, A214260, A001911 and A000217 for other restricted ternary words.
Cf. Triangle A106513 (alternating row sums).
Equals A293004 + 1.
Cf. A033539, A332602, A086395 (subseq. of primes).

Programs

  • Haskell
    a001333 n = a001333_list !! n
    a001333_list = 1 : 1 : zipWith (+)
                           a001333_list (map (* 2) $ tail a001333_list)
    -- Reinhard Zumkeller, Jul 08 2012
    
  • Magma
    [n le 2 select 1 else 2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Nov 10 2018
    
  • Maple
    A001333 := proc(n) option remember; if n=0 then 1 elif n=1 then 1 else 2*procname(n-1)+procname(n-2) fi end;
    Digits := 50; A001333 := n-> round((1/2)*(1+sqrt(2))^n);
    with(numtheory): cf := cfrac (sqrt(2),1000): [seq(nthnumer(cf,i), i=0..50)];
    a:= n-> (M-> M[2, 1]+M[2, 2])(<<2|1>, <1|0>>^n):
    seq(a(n), n=0..33);  # Alois P. Heinz, Aug 01 2008
    A001333List := proc(m) local A, P, n; A := [1,1]; P := [1,1];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([op(A), P[-2]]);
    A := [op(A), P[-1]] od; A end: A001333List(32); # Peter Luschny, Mar 26 2022
  • Mathematica
    Insert[Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[2], n]]], {n, 1, 40}], 1, 1] (* Stefan Steinerberger, Apr 08 2006 *)
    Table[((1 - Sqrt[2])^n + (1 + Sqrt[2])^n)/2, {n, 0, 29}] // Simplify (* Robert G. Wilson v, May 02 2006 *)
    a[0] = 1; a[1] = 1; a[n_] := a[n] = 2a[n - 1] + a[n - 2]; Table[a@n, {n, 0, 29}] (* Robert G. Wilson v, May 02 2006 *)
    Table[ MatrixPower[{{1, 2}, {1, 1}}, n][[1, 1]], {n, 0, 30}] (* Robert G. Wilson v, May 02 2006 *)
    a=c=0;t={b=1}; Do[c=a+b+c; AppendTo[t,c]; a=b;b=c,{n,40}]; t (* Vladimir Joseph Stephan Orlovsky, Mar 23 2009 *)
    LinearRecurrence[{2, 1}, {1, 1}, 40] (* Vladimir Joseph Stephan Orlovsky, Mar 23 2009 *)
    Join[{1}, Numerator[Convergents[Sqrt[2], 30]]] (* Harvey P. Dale, Aug 22 2011 *)
    Table[(-I)^n ChebyshevT[n, I], {n, 10}] (* Eric W. Weisstein, Apr 04 2017 *)
    CoefficientList[Series[(-1 + x)/(-1 + 2 x + x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
    Table[Sqrt[(ChebyshevT[n, 3] + (-1)^n)/2], {n, 0, 20}] (* Eric W. Weisstein, Apr 17 2018 *)
  • PARI
    {a(n) = if( n<0, (-1)^n, 1) * contfracpnqn( vector( abs(n), i, 1 + (i>1))) [1, 1]}; /* Michael Somos, Sep 02 2012 */
    
  • PARI
    {a(n) = polchebyshev(n, 1, I) / I^n}; /* Michael Somos, Sep 02 2012 */
    
  • PARI
    a(n) = real((1 + quadgen(8))^n); \\ Michel Marcus, Mar 16 2021
    
  • PARI
    { for (n=0, 4000, a=contfracpnqn(vector(n, i, 1+(i>1)))[1, 1]; if (a > 10^(10^3 - 6), break); write("b001333.txt", n, " ", a); ); } \\ Harry J. Smith, Jun 12 2009
    
  • Python
    from functools import cache
    @cache
    def a(n): return 1 if n < 2 else 2*a(n-1) + a(n-2)
    print([a(n) for n in range(32)]) # Michael S. Branicky, Nov 13 2022
  • Sage
    from sage.combinat.sloane_functions import recur_gen2
    it = recur_gen2(1,1,2,1)
    [next(it) for i in range(30)] ## Zerinvary Lajos, Jun 24 2008
    
  • Sage
    [lucas_number2(n,2,-1)/2 for n in range(0, 30)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = A055642(A125058(n)). - Reinhard Zumkeller, Feb 02 2007
a(n) = 2a(n-1) + a(n-2);
a(n) = ((1-sqrt(2))^n + (1+sqrt(2))^n)/2.
a(n)+a(n+1) = 2 A000129(n+1). 2*a(n) = A002203(n).
G.f.: (1 - x) / (1 - 2*x - x^2) = 1 / (1 - x / (1 - 2*x / (1 + x))). - Simon Plouffe in his 1992 dissertation.
A000129(2n) = 2*A000129(n)*a(n). - John McNamara, Oct 30 2002
a(n) = (-i)^n * T(n, i), with T(n, x) Chebyshev's polynomials of the first kind A053120 and i^2 = -1.
a(n) = a(n-1) + A052542(n-1), n>1. a(n)/A052542(n) converges to sqrt(1/2). - Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
E.g.f.: exp(x)cosh(x*sqrt(2)). - Paul Barry, May 08 2003
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k)2^k. - Paul Barry, May 13 2003
For n > 0, a(n)^2 - (1 + (-1)^(n))/2 = Sum_{k=0..n-1} ((2k+1)*A001653(n-1-k)); e.g., 17^2 - 1 = 288 = 1*169 + 3*29 + 5*5 + 7*1; 7^2 = 49 = 1*29 + 3*5 + 5*1. - Charlie Marion, Jul 18 2003
a(n+2) = A078343(n+1) + A048654(n). - Creighton Dement, Jan 19 2005
a(n) = A000129(n) + A000129(n-1) = A001109(n)/A000129(n) = sqrt(A001110(n)/A000129(n)^2) = ceiling(sqrt(A001108(n))). - Henry Bottomley, Apr 18 2000
Also the first differences of A000129 (the Pell numbers) because A052937(n) = A000129(n+1) + 1. - Graeme McRae, Aug 03 2006
a(n) = Sum_{k=0..n} A122542(n,k). - Philippe Deléham, Oct 08 2006
For another recurrence see A000129.
a(n) = Sum_{k=0..n} A098158(n,k)*2^(n-k). - Philippe Deléham, Dec 26 2007
a(n) = upper left and lower right terms of [1,1; 2,1]^n. - Gary W. Adamson, Mar 12 2008
If p[1]=1, and p[i]=2, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - Milan Janjic, Apr 29 2010
For n>=2, a(n)=F_n(2)+F_(n+1)(2), where F_n(x) is Fibonacci polynomial (cf. A049310): F_n(x) = Sum_{i=0..floor((n-1)/2)} binomial(n-i-1,i)x^(n-2*i-1). - Vladimir Shevelev, Apr 13 2012
a(-n) = (-1)^n * a(n). - Michael Somos, Sep 02 2012
Dirichlet g.f.: (PolyLog(s,1-sqrt(2)) + PolyLog(s,1+sqrt(2)))/2. - Ilya Gutkovskiy, Jun 26 2016
a(n) = A000129(n) - A000129(n-1), where A000129(n) is the n-th Pell Number. Hence the continued fraction is of the form 1-(A000129(n-1)/A000129(n)). - Gregory L. Simay, Nov 09 2018
a(n) = (A000129(n+3) + A000129(n-3))/10, n>=3. - Paul Curtz, Jun 16 2021
a(n) = (A000129(n+6) - A000129(n-6))/140, n>=6. - Paul Curtz, Jun 20 2021
a(n) = round((1/2)*sqrt(Product_{k=1..n} 4*(1 + sin(k*Pi/n)^2))), for n>=1. - Greg Dresden, Dec 28 2021
a(n)^2 + a(n+1)^2 = A075870(n+1) = 2*(b(n)^2 + b(n+1)^2) for all n in Z where b(n) := A000129(n). - Michael Somos, Apr 02 2022
a(n) = 2*A048739(n-2)+1. - R. J. Mathar, Feb 01 2024
Sum_{n>=1} 1/a(n) = 1.5766479516393275911191017828913332473... - R. J. Mathar, Feb 05 2024
From Peter Bala, Jul 06 2025: (Start)
G.f.: Sum_{n >= 1} (-1)^(n+1) * x^(n-1) * Product_{k = 1..n} (1 - k*x)/(1 - 3*x + k*x^2).
The following series telescope:
Sum_{n >= 1} (-1)^(n+1)/(a(2*n) + 1/a(2*n)) = 1/4, since 1/(a(2*n) + 1/a(2*n)) = 1/A077445(n) + 1/A077445(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(2*n+1) - 1/a(2*n+1)) = 1/8, since. 1/(a(2*n+1) - 1/a(2*n+1)) = 1/(4*Pell(2*n)) + 1/(4*Pell(2*n+2)), where Pell(n) = A000129(n).
Sum_{n >= 1} (-1)^(n+1)/(a(2*n+1) + 9/a(2*n+1)) = 1/10, since 1/(a(2*n+1) + 9/a(2*n+1)) = b(n) + b(n+1), where b(n) = A001109(n)/(2*Pell(2*n-1)*Pell(2*n+1)).
Sum_{n >= 1} (-1)^(n+1)/(a(n)*a(n+1)) = 1 - sqrt(2)/2 = A268682, since (-1)^(n+1)/(a(n)*a(n+1)) = Pell(n)/a(n) - Pell(n+1)/a(n+1). (End)

Extensions

Chebyshev comments from Wolfdieter Lang, Jan 10 2003

A007052 Number of order-consecutive partitions of n.

Original entry on oeis.org

1, 3, 10, 34, 116, 396, 1352, 4616, 15760, 53808, 183712, 627232, 2141504, 7311552, 24963200, 85229696, 290992384, 993510144, 3392055808, 11581202944, 39540700160, 135000394752, 460920178688, 1573679925248, 5372879343616, 18344157523968, 62630871408640, 213835170586624
Offset: 0

Views

Author

Colin Mallows, N. J. A. Sloane, and Simon Plouffe

Keywords

Comments

After initial terms, first differs from A291292 at a(6) = 1352, A291292(8) = 1353.
Joe Keane (jgk(AT)jgk.org) observes that this sequence (beginning at 3) is "size of raises in pot-limit poker, one blind, maximum raising".
It appears that this sequence is the BinomialMean transform of A001653 (see A075271). - John W. Layman, Oct 03 2002
Number of (s(0), s(1), ..., s(2n+1)) such that 0 < s(i) < 8 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n+1, s(0) = 3, s(2n+1) = 4. - Herbert Kociemba, Jun 12 2004
Equals the INVERT transform of (1, 2, 5, 13, 34, 89, ...). - Gary W. Adamson, May 01 2009
a(n) is the number of compositions of n when there are 3 types of ones. - Milan Janjic, Aug 13 2010
a(n)/a(n-1) tends to (4 + sqrt(8))/2 = 3.414213.... Gary W. Adamson, Jul 30 2013
a(n) is the first subdiagonal of array A228405. - Richard R. Forberg, Sep 02 2013
Number of words of length n over {0,1,2,3,4} in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
From Gus Wiseman, Mar 05 2020: (Start)
Also the number of unimodal sequences of length n + 1 covering an initial interval of positive integers, where a sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. For example, the a(0) = 1 through a(2) = 10 sequences are:
(1) (1,1) (1,1,1)
(1,2) (1,1,2)
(2,1) (1,2,1)
(1,2,2)
(1,2,3)
(1,3,2)
(2,1,1)
(2,2,1)
(2,3,1)
(3,2,1)
Missing are: (2,1,2), (2,1,3), (3,1,2).
Conjecture: Also the number of ordered set partitions of {1..n + 1} where no element of any block is greater than any element of a non-adjacent consecutive block. For example, the a(0) = 1 through a(2) = 10 ordered set partitions are:
{{1}} {{1,2}} {{1,2,3}}
{{1},{2}} {{1},{2,3}}
{{2},{1}} {{1,2},{3}}
{{1,3},{2}}
{{2},{1,3}}
{{2,3},{1}}
{{3},{1,2}}
{{1},{2},{3}}
{{1},{3},{2}}
{{2},{1},{3}}
a(n-1) is the number of hexagonal directed-column convex polyominoes having area n (see Baril et al. at page 4). - Stefano Spezia, Oct 14 2023

Examples

			G.f. = 1 + 3*x + 10*x^2 + 34*x^3 + 116*x^4 + 396*x^5 + 1352*x^6 + 4616*x^7 + ...
		

References

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

Crossrefs

Programs

  • Magma
    [Floor((2+Sqrt(2))^n*(1/2+Sqrt(2)/4)+(2-Sqrt(2))^n*(1/2-Sqrt(2)/4)): n in [0..30] ] ; // Vincenzo Librandi, Aug 20 2011
  • Mathematica
    a[n_]:=(MatrixPower[{{3,1},{1,1}},n].{{2},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    a[ n_] := ((2 + Sqrt[2])^(n + 1) + (2 - Sqrt[2])^(n + 1)) / 4 // Simplify; (* Michael Somos, Jan 25 2017 *)
    LinearRecurrence[{4, -2}, {1, 3}, 24] (* Jean-François Alcover, Jan 07 2019 *)
    unimodQ[q_]:=Or[Length[q]<=1,If[q[[1]]<=q[[2]],unimodQ[Rest[q]],OrderedQ[Reverse[q]]]];
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Union@@Permutations/@allnorm[n],unimodQ]],{n,6}] (* Gus Wiseman, Mar 06 2020 *)
  • PARI
    {a(n) = real((2 + quadgen(8))^(n+1)) / 2}; /* Michael Somos, Mar 06 2003 */
    

Formula

a(n+1) = 4*a(n) - 2*a(n-1).
G.f.: (1-x)/(1-4*x+2*x^2).
Binomial transform of Pell numbers 1, 2, 5, 12, ... (A000129).
a(n) = A006012(n+1)/2 = A056236(n+1)/4. - Michael Somos, Mar 06 2003
a(n) = (A035344(n)+1)/2; a(n) = (2+sqrt(2))^n(1/2+sqrt(2)/4)+(2-sqrt(2))^n(1/2-sqrt(2)/4). - Paul Barry, Jul 16 2003
Second binomial transform of (1, 1, 2, 2, 4, 4, ...). a(n) = Sum_{k=1..floor(n/2)}, C(n, 2k)*2^(n-k-1). - Paul Barry, Nov 22 2003
a(n) = ( (2-sqrt(2))^(n+1) + (2+sqrt(2))^(n+1) )/4. - Herbert Kociemba, Jun 12 2004
a(n) = both left and right terms 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] = [a(n) A007070(n) a(n)]. E.g., a(3) = 34. M^3 * [1 1 1] = [34 48 34] (center term is A007070(3)). - Gary W. Adamson, Dec 18 2004
The i-th term of the sequence is the entry (2, 2) in the i-th power of the 2 X 2 matrix M = ((1, 1), (1, 3)). - Simone Severini, Oct 15 2005
E.g.f.: exp(2*x)*(cosh(sqrt(2)*x)+sinh(sqrt(2)*x)/sqrt(2)). - Paul Barry, Nov 20 2003
a(n) = A007068(2*n), n>0. - R. J. Mathar, Aug 17 2009
If p[i]=Fibonacci(2i-1) and if A is the Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)= det A. - Milan Janjic, May 08 2010
a(n-1) = Sum_{k=-floor(n/4)..floor(n/4)} (-1)^k*binomial(2*n,n+4*k)/2. - Mircea Merca, Jan 28 2012
G.f.: G(0)*(1-x)/(2*x) + 1 - 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) = 3*a(n-1) + a(n-2) + a(n-3) + a(n-4) + ... + a(0). - Gary W. Adamson, Aug 12 2013
a(n) = a(-2-n) * 2^(n+1) for all n in Z. - Michael Somos, Jan 25 2017

A098158 Triangle T(n,k) with diagonals T(n,n-k) = binomial(n, 2*k).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 1, 6, 1, 0, 0, 0, 5, 10, 1, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 0, 7, 35, 21, 1, 0, 0, 0, 0, 1, 28, 70, 28, 1, 0, 0, 0, 0, 0, 9, 84, 126, 36, 1, 0, 0, 0, 0, 0, 1, 45, 210, 210, 45, 1, 0, 0, 0, 0, 0, 0, 11, 165, 462, 330, 55, 1, 0, 0, 0, 0, 0, 0, 1, 66, 495, 924
Offset: 0

Views

Author

Paul Barry, Aug 29 2004

Keywords

Comments

Row sums are A011782. Inverse is A065547.
Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 1, -1, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 1, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Jul 29 2006
Sum of entries in column k is A001519(k+1) (the odd-indexed Fibonacci numbers). - Philippe Deléham, Dec 02 2008
Number of permutations of length n avoiding simultaneously the patterns 123 and 132 with k left-to-right minima. A left-to-right minimum in a permutation a(1)a(2)...a(n) is position i such that a(j) > a(i) for all j < i. - Tian Han, Nov 16 2023

Examples

			Rows begin
  1;
  0, 1;
  0, 1, 1;
  0, 0, 3, 1;
  0, 0, 1, 6, 1;
		

Crossrefs

Cf. A119900. - Philippe Deléham, Dec 02 2008

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> Binomial(n, 2*(n-k)) ))); # G. C. Greubel, Aug 01 2019
  • Magma
    [Binomial(n, 2*(n-k)): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 01 2019
    
  • Mathematica
    Table[Binomial[n, 2*(n-k)], {n,0,12}, {k,0,n}]//Flatten (* Michael De Vlieger, Oct 12 2016 *)
  • PARI
    {T(n,k)=polcoeff(polcoeff((1-x*y)/((1-x*y)^2-x^2*y)+x*O(x^n), n, x) + y*O(y^k),k,y)} (Hanna)
    
  • PARI
    T(n,k) = binomial(n, 2*(n-k));
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Aug 01 2019
    
  • Sage
    [[binomial(n, 2*(n-k)) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Aug 01 2019
    

Formula

T(n,k) = binomial(n,2*(n-k)).
From Tom Copeland, Oct 10 2016: (Start)
E.g.f.: exp(t*x) * cosh(t*sqrt(x)).
O.g.f.: (1/2) * ( 1 / (1 - (1 + sqrt(1/x))*x*t) + 1 / (1 - (1 - sqrt(1/x))*x*t) ).
Row polynomial: x^n * ((1 + sqrt(1/x))^n + (1 - sqrt(1/x))^n) / 2. (End)
Column k is generated by the polynomial Sum_{j=0..floor(k/2)} C(k, 2j) * x^(k-j). - Paul Barry, Jan 22 2005
G.f.: (1-x*y)/((1-x*y)^2 - x^2*y). - Paul D. Hanna, Feb 25 2005
Sum_{k=0..n} x^k*T(n,k)= A009116(n), A000007(n), A011782(n), A006012(n), A083881(n), A081335(n), A090139(n), A145301(n), A145302(n), A145303(n), A143079(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. - Philippe Deléham, Dec 04 2006, Oct 15 2008, Oct 19 2008
T(n,k) = T(n-1,k-1) + Sum_{i=0..k-1} T(n-2-i,k-1-i); T(0,0)=1; T(n,k)=0 if n < 0 or k < 0 or n < k. E.g.: T(8,5) = T(7,4) + T(6,4) + T(5,3) + T(4,2) + T(3,1) + T(2,0) = 7+15+5+1+0+0 = 28. - Philippe Deléham, Dec 04 2006
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A011782(n), A001333(n), A026150(n), A046717(n), A084057(n), A002533(n), A083098(n), A084058(n), A003665(n), A002535(n), A133294(n), A090042(n), A125816(n), A133343(n), A133345(n), A120612(n), A133356(n), A125818(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 respectively. - Philippe Deléham, Dec 24 2007
Sum_{k=0..n} T(n,k)*(-x)^(n-k) = A000012(n), A146559(n), A087455(n), A138230(n), A006495(n), A138229(n) for x = 0,1,2,3,4,5 respectively. - Philippe Deléham, Nov 14 2008
T(n,k) = A085478(k,n-k). - Philippe Deléham, Dec 02 2008
T(n,k) = 2*T(n-1,k-1) + T(n-2,k-1) - T(n-2,k-2), T(0,0) = T(1,1) = 1, T(1,0) = 0 and T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Mar 15 2012

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

A003480 a(0) = 1, a(1) = 2, for n > 1, a(n) = 4*a(n-1) - 2*a(n-2).

Original entry on oeis.org

1, 2, 7, 24, 82, 280, 956, 3264, 11144, 38048, 129904, 443520, 1514272, 5170048, 17651648, 60266496, 205762688, 702517760, 2398545664, 8189147136, 27959497216, 95459694592, 325919783936, 1112759746560, 3799199418368, 12971278180352, 44286713884672, 151204299177984
Offset: 0

Views

Author

Keywords

Comments

Gives the number of L-convex polyominoes with n cells, that is convex polyominoes where any two cells can be connected by a path internal to the polyomino and which has at most 1 change of direction (i.e., one of the four orientation of the L). - Simone Rinaldi (rinaldi(AT)unisi.it), Feb 19 2007
Joe Keane (jgk(AT)jgk.org) observes that this sequence (beginning at 2) is "size of raises in pot-limit poker, one blind, maximum raising".
Dimensions of the graded components of the Hopf algebra of noncommutative multi-symmetric functions of level 2. For level r, the sequence would be the INVERT transform of binomial(n+r-1,n). - Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Jun 26 2008
The sum of the numbers in the n-th row of the summatory Pascal triangle (A059576). - Ron R. King, Jan 22 2009
(1 + 2x + 7x^2 + 24x^3 + ...) = 1 / (1 - 2x - 3x^2 - 4x^3 - ...). - Gary W. Adamson, Jul 27 2009
Let M be a triangle with the odd-indexed Fibonacci numbers (1, 2, 5, 13, ...) in every column, with the leftmost column shifted upwards one row. A003480 = lim_{n->oo} M^n, the left-shifted vector considered as a sequence. The analogous operation using the even-indexed Fibonacci numbers generates A001835 starting with offset 1. - Gary W. Adamson, Jul 27 2010
a(n) is the number of generalized compositions of n when there are i+1 different types of the part i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Let h(t) = (1-t)^2/(2*(1-t)^2-1) = 1/(1-(2*t + 3*t^2 + 4*t^3 + ...)),
an o.g.f. for A003480, then
A001003(n) = (1/n!)*((h(t)*d/dt)^n) t, evaluated at t=0, with initial n=1. - Tom Copeland, Sep 06 2011
Excluding the initial 1, a(n) is the 2nd subdiagonal of A228405. - Richard R. Forberg, Sep 02 2013

References

  • G. Castiglione and A. Restivo, L-convex polyominoes: a survey, Chapter 2 of K. G. Subranian et al., eds., Formal Models, Languages and Applications, World Scientific, 2015.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A059576 and of A181289. Second differences of A007070.
Column k=2 of A261780.

Programs

  • Haskell
    a003480 n = a003480_list !! n
    a003480_list = 1 : 2 : 7 : (tail $ zipWith (-)
       (tail $ map (* 4) a003480_list) (map (* 2) a003480_list))
    -- Reinhard Zumkeller, Jan 16 2012, Oct 03 2011
  • Maple
    INVERT([seq(n+1,n=1..20)]); # Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Jun 26 2008
  • Mathematica
    a[0]=1; a[1]=2; a[2]=7; a[n_]:=a[n]=4*a[n-1] - 2*a[n-2]; Table[a[n],{n,0,24}] (* Jean-François Alcover, Mar 22 2011 *)
    Join[{1},LinearRecurrence[{4,-2},{2,7},40]] (* Harvey P. Dale, Oct 23 2011 *)
  • PARI
    a(n)=polcoeff((1-x)^2/(1-4*x+2*x^2)+x*O(x^n),n)
    
  • PARI
    a(n)=local(x); if(n<1,n==0,x=(2+quadgen(8))^n; imag(x)+real(x)/2)
    

Formula

a(n) = (n+1)*a(0) + n*a(1) + ... + 3*a(n-2) + 2*a(n-1). - Amarnath Murthy, Aug 17 2002
G.f.: (1-x)^2/(1-4*x+2*x^2). - Simon Plouffe in his 1992 dissertation
a(n) = A007070(n)/2, n > 0.
G.f.: 1/( 1 - Sum_{k>=1} (k+1)*x^k ).
a(n+1)*a(n+1) - a(n+2)*a(n) = 2^n, n > 0. - D. G. Rogers, Jul 12 2004
For n > 0, a(n) = ((2+sqrt(2))^(n+1) - (2-sqrt(2))^(n+1))/(4*sqrt(2)). - Rolf Pleisch, Aug 03 2009
If the leading 1 is removed, 2, 7, 24, ... is the binomial transform of 2, 5, 12, 29, ..., which is A000129 without its first 2 terms, and the second binomial transform of 2, 3, 4, 6, ..., which is A029744, again without its leading 1. - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
a(n) = Sum((1+p_1)*(1+p_2)*...*(1+p_m)), summation being over all compositions (p_1, p_2, ..., p_m) of n. Example: a(3)=24; indeed, the compositions of 3 are (1,1,1), (1,2), (2,1), (3) and we have 2*2*2 + 2*3 + 3*2 + 4 = 24. - Emeric Deutsch, Oct 17 2010
a(n) = Sum_{k>=0} binomial(n+2*k-1,n) / 2^(k+1). - Vaclav Kotesovec, Dec 31 2013
E.g.f.: (1 + exp(2*x)*(cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x)))/2. - Stefano Spezia, May 20 2024

A147703 Triangle [1,1,1,0,0,0,...] DELTA [1,0,0,0,...] with Deléham DELTA defined in A084938.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 5, 9, 5, 1, 13, 27, 20, 7, 1, 34, 80, 73, 35, 9, 1, 89, 234, 252, 151, 54, 11, 1, 233, 677, 837, 597, 269, 77, 13, 1, 610, 1941, 2702, 2225, 1199, 435, 104, 15, 1, 1597, 5523, 8533, 7943, 4956, 2158, 657, 135, 17, 1
Offset: 0

Views

Author

Paul Barry, Nov 10 2008

Keywords

Comments

Equal to A062110*A007318 when A062110 is regarded as a triangle read by rows.

Examples

			Triangle begins
   1;
   1,   1;
   2,   3,   1;
   5,   9,   5,   1;
  13,  27,  20,   7,  1;
  34,  80,  73,  35,  9,  1;
  89, 234, 252, 151, 54, 11, 1;
		

Crossrefs

Row sums are A006012. Diagonal sums are A147704.

Programs

  • Maple
    # The function RiordanSquare is defined in A321620:
    RiordanSquare(1 / (1 - x / (1 - x / (1 - x))), 10); # Peter Luschny, Jan 26 2020
  • Mathematica
    nmax=9; Flatten[CoefficientList[Series[CoefficientList[Series[(1 - 2*x)/(1 - (3 + y)*x + (1 + y)*x^2), {x, 0, nmax}], x], {y, 0, nmax}], y]] (* Indranil Ghosh, Mar 11 2017 *)

Formula

Riordan array ((1-2x)/(1-3x+x^2), x(1-x)/(1-3x+x^2)).
Sum_{k=0..n} T(n,k)*x^k = A152239(n), A152223(n), A152185(n), A152174(n), A152167(n), A152166(n), A152163(n), A000007(n), A001519(n), A006012(n), A081704(n), A082761(n), A147837(n), A147838(n), A147839(n), A147840(n), A147841(n), for x = -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8 respectively. - Philippe Deléham, Dec 01 2008
G.f.: (1-2*x)/(1-(3+y)*x+(1+y)*x^2). - Philippe Deléham, Nov 26 2011
T(n,k) = 3*T(n-1,k) + T(n-1,k-1) - T(n-2,k) - T(n-2,k-1), for n > 1. - Philippe Deléham, Feb 12 2012
The Riordan square of the odd indexed Fibonacci numbers A001519. - Peter Luschny, Jan 26 2020

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

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

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

Examples

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

Crossrefs

Programs

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

Formula

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

Extensions

Comment and link added and typo in cross-reference corrected by Joseph Myers, Dec 24 2008, May 30 2010
Showing 1-10 of 52 results. Next