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

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

Original entry on oeis.org

1, 4, 14, 50, 178, 634, 2258, 8042, 28642, 102010, 363314, 1293962, 4608514, 16413466, 58457426, 208199210, 741512482, 2640935866, 9405832562, 33499369418, 119309773378, 424928058970, 1513403723666, 5390067288938, 19197009314146, 68371162520314, 243507506189234
Offset: 0

Views

Author

Wolfdieter Lang, Apr 26 2000

Keywords

Comments

Row sums of triangle A054458.
a(n) = term (1,1) in M^n, M = the 3 X 3 matrix [1,1,1; 1,1,1; 2,2,1]. - Gary W. Adamson, Mar 12 2009
Equals the INVERT transform of A001333: (1, 3, 7, 17, 41, 99, ...). - Gary W. Adamson, Aug 14 2010
a(n) is the number of one sided n-step walks taking steps from {(0,1), (-1,0), (1,0), (1,1)}. - Shanzhen Gao, May 13 2011
Number of quaternary words of length n on {0,1,2,3} containing no subwords 03 or 30. - Philippe Deléham, Apr 27 2012
Pisano period lengths: 1, 1, 4, 1, 24, 4, 48, 1, 12, 24, 30, 4, 12, 48, 24, 2, 272, 12, 18, 24, ... - R. J. Mathar, Aug 10 2012
a(n) = A007481(2*n+1) - A007481(2*n) = A007481(2*(n+1)) - A007481(2*n+1). - Reinhard Zumkeller, Oct 25 2015
Number of length-n words on a,b,c,d avoiding aa and ab. For n >= 1, the number of such words ending with a or the number of those ending with b is A007482(n-1), and the number of those ending with c or the number of those ending with d is a(n-1). - Jianing Song, Jun 01 2022

Examples

			a(3) = 50 because among the 4^3 = 64 quaternary words of length 3 only 14 namely 003, 030, 031, 032, 033, 103, 130, 203, 230, 300, 301, 302, 303, 330 contain the subwords 03 or 30. - _Philippe Deléham_, Apr 27 2012
		

References

  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (Problem 2.4.6).

Crossrefs

Programs

  • Haskell
    a055099 n = a007481 (2 * n + 1) - a007481 (2 * n)
    -- Reinhard Zumkeller, Oct 25 2015
    
  • Magma
    I:=[1,4]; [n le 2 select I[n] else 3*Self(n-1) + 2*Self(n-2): n in [1..41]]; // G. C. Greubel, Jun 27 2021
    
  • Maple
    a := proc(n) option remember; `if`(n < 2, [1, 4][n+1], (3*a(n-1) + 2*a(n-2))) end:
    seq(a(n), n=0..23); # Peter Luschny, Jan 06 2019
  • Mathematica
    max = 24; cv = ContinuedFraction[ Sqrt[2], max] // Convergents // Numerator; Series[ 1/(1 - cv.x^Range[max]), {x, 0, max}] // CoefficientList[#, x]& // Rest (* Jean-François Alcover, Jun 21 2013, after Gary W. Adamson *)
    LinearRecurrence[{3, 2}, {1, 4}, 24] (* Jean-François Alcover, Sep 23 2017 *)
  • Sage
    [(i*sqrt(2))^(n-1)*( i*sqrt(2)*chebyshev_U(n, -3*i/(2*sqrt(2))) + chebyshev_U(n-1, -3*i/(2*sqrt(2))) ) for n in (0..40)] # G. C. Greubel, Jun 27 2021

Formula

a(n) = a*c^n - b*d^n, a := (5 + sqrt(17))/(2*sqrt(17)), b := (5 - sqrt(17))/(2*sqrt(17)), c := (3 + sqrt(17))/2, d := (3 - sqrt(17))/2.
a(n) = Sum_{m=0..n} A054458(n, m).
a(n) = F32(n) + F32(n-1) with F32(n) = A007482(n), n >= 1, a(0) = 1.
a(n) = A007482(n) + A007482(n-1) = 2*A007482(n) - A104934(n). - R. J. Mathar, Jul 23 2010
a(n) = 3*a(n-1) + 2*a(n-2) with a(0) = 1, a(1) = 4. - Vincenzo Librandi, Dec 08 2010
a(n) = (Sum_{k = 0..n} A202396(n,k)*3^k)/2^n. - Philippe Deléham, Feb 05 2012
a(n) = (i*sqrt(2))^(n-1)*( i*sqrt(2)*ChebyshevU(n, -3*i/(2*sqrt(2))) + ChebyshevU(n-1, -3*i/(2*sqrt(2))) ). - G. C. Greubel, Jun 27 2021
a(n) = 2*a(n-1) + 2*A007482(n-1), n >= 1. - Jianing Song, Jun 01 2022
E.g.f.: exp(3*x/2)*(17*cosh(sqrt(17)*x/2) + 5*sqrt(17)*sinh(sqrt(17)*x/2))/17. - Stefano Spezia, May 24 2024

Extensions

Edited by N. J. A. Sloane, Jun 08 2010

A046717 a(n) = 2*a(n-1) + 3*a(n-2), a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 5, 13, 41, 121, 365, 1093, 3281, 9841, 29525, 88573, 265721, 797161, 2391485, 7174453, 21523361, 64570081, 193710245, 581130733, 1743392201, 5230176601, 15690529805, 47071589413, 141214768241, 423644304721, 1270932914165, 3812798742493, 11438396227481
Offset: 0

Views

Author

Gervais Deroo and M. Deroo

Keywords

Comments

Form the digraph with matrix A = [0,1,1,1; 1,0,1,1; 1,1,0,1; 1,0,1,1]. Then the sequence 0,1,1,5,... or (3^(n-1)-(-1)^n)/2+0^n/3 with g.f. x(1-x)/(1-2x-3x^2) corresponds to the (1,2) term of A^n. - Paul Barry, Oct 02 2004
3*a(n+1) + a(n) = 4*A060925(n); a(n+1) = A015518(n) + A060925(n); a(n+1) - 6*A015518(n) = (-1)^n. - Creighton Dement, Nov 15 2004
The sequence corresponds to the (1,1) term of the matrix [1,2;2,1]^n. - Simone Severini, Dec 04 2004
The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 4 times the bottom to get the new top. The limit of the sequence of fractions is 2. - Cino Hilliard, Sep 25 2005
a(n)^2 + (2*A015518(n))^2 = a(2n). E.g., a(3) = 13, 2*A015518(3) = 14, A046717(6) = 365. 13^2 + 14^2 = 365. - Gary W. Adamson, Jun 17 2006
Equals INVERTi transform of A104934: (1, 2, 8, 28, 100, 356, 1268, ...). - Gary W. Adamson, Jul 21 2010
a(n) is the number of compositions of n when there are 1 type of 1 and 4 types of other natural numbers. - Milan Janjic, Aug 13 2010
An elephant sequence, see A175655. For the central square just one A[5] vector, with decimal value 341, leads to this sequence (without the first leading 1). For the corner squares this vector leads to the companion sequence A015518 (without the leading 0). - Johannes W. Meijer, Aug 15 2010
Pisano period lengths: 1, 1, 2, 1, 4, 2, 6, 4, 2, 4, 10, 2, 6, 6, 4, 8, 16, 2, 18, 4, ... - R. J. Mathar, Aug 10 2012
a(n) is the number of words of length n over a ternary alphabet whose position in the lexicographic order is a multiple of two. - Alois P. Heinz, Apr 13 2022
a(n) is the sum, for k=0..3, of the number of walks of length n between two vertices at distance k of the cube graph. - Miquel A. Fiol, Mar 09 2024

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.

Crossrefs

The first difference sequence of A015518.
Row sums of triangle A080928.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A002605, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.
Cf. A015518.
Cf. A104934. - Gary W. Adamson, Jul 21 2010

Programs

  • Magma
    [n le 2 select 1 else 2*Self(n-1)+3*Self(n-2): n in [1..35]]; // Vincenzo Librandi, Jul 21 2013
    
  • Magma
    [(3^n + (-1)^n)/2: n in [0..30]]; // G. C. Greubel, Jan 07 2018
  • Maple
    a[0]:=1:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+3*a[n-2] od: seq(a[n], n=0..33); # Zerinvary Lajos, Dec 14 2008
    seq(denom(((-2)^(2*n)+6^(2*n))/((-2)^n+6^n)),n=0..26)
  • Mathematica
    Table[(3^n + (-1)^n)/2, {n, 0, 30}] (* Artur Jasinski, Dec 10 2006 *)
    CoefficientList[ Series[(1 - x)/(1 - 2x - 3x^2), {x, 0, 30}], x]  (* Robert G. Wilson v, Apr 04 2011 *)
    Table[ MatrixPower[{{1, 2}, {1, 1}}, n][[1, 1]], {n, 0, 30}] (* Robert G. Wilson v, Apr 04 2011 *)
  • PARI
    {a(n) = (3^n+(-1)^n)/2};
    for(n=0,30, print1(a(n), ", ")) /* modified by G. C. Greubel, Jan 07 2018 */
    
  • PARI
    x='x+O('x^30); Vec((1-x)/((1+x)*(1-3*x))) \\ G. C. Greubel, Jan 07 2018
    
  • Sage
    [lucas_number2(n,2,-3)/2 for n in range(0, 27)] # Zerinvary Lajos, Apr 30 2009
    

Formula

G.f.: (1-x)/((1+x)*(1-3*x)).
a(n) = (3^n + (-1)^n)/2.
a(n) = Sum_{k=0..n} binomial(n, 2k)2^(2k). - Paul Barry, Feb 26 2003
Binomial transform of A000302 (powers of 4) with interpolated zeros. Inverse binomial transform of A081294. - Paul Barry, Mar 17 2003
E.g.f.: exp(x)cosh(2x). - Paul Barry, Mar 17 2003
a(n) = ceiling(3^n/4) + floor(3^n/4) = ceiling(3^n/4)^2 - floor(3^n/4)^2. - Paul Barry, Jan 17 2005
a(n) = Sum_{k=0..n} Sum_{j=0..n} C(n,j)C(n-j,k)*(1+(-1)^(j-k))/2. - Paul Barry, May 21 2006
a(n) = Sum_{k=0..n} A098158(n,k)*4^(n-k). - Philippe Deléham, Dec 26 2007
a(n) = (3^n + (-1)^n)/2. - M. F. Hasler, Mar 20 2008
a(n) = 2 A015518(n) + (-1)^n; for n > 0, a(n) = A080925(n). - M. F. Hasler, Mar 20 2008
((1 + sqrt4)^n + (1 - sqrt4)^n)/2. The offset is 0. a(3)=13. - Al Hakanson (hawkuu(AT)gmail.com), Nov 22 2008
If p[1]=1 and p[i]=4 (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
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(4*k-1)/(x*(4*k+3) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 26 2013
G.f.: G(0)/2, where G(k) = 1 + (-1)^k/(3^k - 3*9^k*x/(3*3^k*x + (-1)^k/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Oct 17 2013

Extensions

Description corrected by and more terms from Michael Somos

A033887 a(n) = Fibonacci(3*n + 1).

Original entry on oeis.org

1, 3, 13, 55, 233, 987, 4181, 17711, 75025, 317811, 1346269, 5702887, 24157817, 102334155, 433494437, 1836311903, 7778742049, 32951280099, 139583862445, 591286729879, 2504730781961, 10610209857723, 44945570212853, 190392490709135, 806515533049393, 3416454622906707
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of A063727, and second binomial transform of (1,1,5,5,25,25,...), which is A074872 with offset 0. - Paul Barry, Jul 16 2003
Equals INVERT transform of A104934: (1, 2, 8, 28, 100, 356, ...) and INVERTi transform of A005054: (1, 4, 20, 100, 500, ...). - Gary W. Adamson, Jul 22 2010
a(n) is the number of compositions of n when there are 3 types of 1 and 4 types of other natural numbers. - Milan Janjic, Aug 13 2010
F(3*n+1) = 3^n*a(n;2/3), where a(n;d), n = 0, 1, ..., d, denote the delta-Fibonacci numbers defined in comments to A000045 (see also the papers by Witula et al.). - Roman Witula, Jul 12 2012
We note that the remark above by Paul Barry can be easily obtained from the following scaling identity for delta-Fibonacci numbers y^n a(n;x/y) = Sum_{k=0..n} binomial(n,k) (y-1)^(n-k) a(k;x) and the fact that a(n;2)=5^floor(n/2). Indeed, for x=y=2 we get 2^n a(n;1) = Sum_{k=0..n} binomial(n,k) a(k;2) and, by A000045: Sum_{k=0..n} binomial(n,k) 2^k a(k;1) = Sum_{k=0..n} binomial(n,k) F(k+1) 2^k = 3^n a(n;2/3) = F(3n+1). - Roman Witula, Jul 12 2012
Except for the first term, this sequence can be generated by Corollary 1 (iv) of Azarian's paper in the references for this sequence. - Mohammad K. Azarian, Jul 02 2015
Number of 1’s in the substitution system {0 -> 110, 1 -> 11100} at step n from initial string "1" (1 -> 11100 -> 111001110011100110110 -> ...). - Ilya Gutkovskiy, Apr 10 2017
The o.g.f. of {F(m*n + 1)}A000045%20and%20L%20=%20A000032.%20-%20_Wolfdieter%20Lang">{n>=0}, for m = 1, 2, ..., is G(m,x) = (1 - F(m-1)*x) / (1 - L(m)*x + (-1)^m*x^2), with F = A000045 and L = A000032. - _Wolfdieter Lang, Feb 06 2023

Examples

			a(5) = Fibonacci(3*5 + 1) = Fibonacci(16) = 987. - _Indranil Ghosh_, Feb 04 2017
		

Crossrefs

Cf. A000032, A000045, A104934, A005054, A063727 (inverse binomial transform), A082761 (binomial transform), A001076, A001077.

Programs

Formula

a(n) = A001076(n) + A001077(n) = A001076(n+1) - A001076(n).
a(n) = 2*A049651(n) + 1.
a(n) = 4*a(n-1) + a(n-2) for n>1, a(0)=1, a(1)=3;
G.f.: (1 - x)/(1 - 4*x - x^2).
a(n) = ((1 + sqrt(5))*(2 + sqrt(5))^n - (1 - sqrt(5))*(2 - sqrt(5))^n)/(2*sqrt(5)).
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(n,j)*C(n-j,k)*F(n-j+1). - Paul Barry, May 19 2006
First differences of A001076. - Al Hakanson (hawkuu(AT)gmail.com), May 02 2009
a(n) = A167808(3*n+1). - Reinhard Zumkeller, Nov 12 2009
a(n) = Sum_{k=0..n} C(n,k)*F(n+k+1). - Paul Barry, Apr 19 2010
Let p[1]=3, p[i]=4, (i>1), and A be a 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
a(n) = Sum_{i=0..n} C(n,n-i)*A063727(i). - Seiichi Kirikami, Mar 06 2012
a(n) = Sum_{k=0..n} A122070(n,k) = Sum_{k=0..n} A185384(n,k). - Philippe Deléham, Mar 13 2012
a(n) = A000045(A016777(n)). - Michel Marcus, Dec 10 2015
a(n) = F(2*n)*L(n+1) + F(n-1)*(-1)^n for n > 0. - J. M. Bergot, Feb 09 2016
a(n) = Sum_{k=0..n} binomial(n,k)*5^floor(k/2)*2^(n-k). - Tony Foster III, Sep 03 2017
2*a(n) = Fibonacci(3*n) + Lucas(3*n). - Bruno Berselli, Oct 13 2017
a(n)^2 is the denominator of continued fraction [4,...,4, 2, 4,...,4], which has n 4's before, and n 4's after, the middle 2. - Greg Dresden and Hexuan Wang, Aug 30 2021
a(n) = i^n*(S(n, -4*i) + i*S(n-1, -4*i)), with i = sqrt(-1), and the Chebyshev S-polynomials (see A049310) with S(n, -1) = 0. From the simplified trisection formula. See the first entry above with A001076. - Gary Detlefs and Wolfdieter Lang, Mar 06 2023
E.g.f.: exp(2*x)*(5*cosh(sqrt(5)*x) + sqrt(5)*sinh(sqrt(5)*x))/5. - Stefano Spezia, May 24 2024

A122542 Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 2, -1, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 2, 4, 1, 0, 2, 8, 6, 1, 0, 2, 12, 18, 8, 1, 0, 2, 16, 38, 32, 10, 1, 0, 2, 20, 66, 88, 50, 12, 1, 0, 2, 24, 102, 192, 170, 72, 14, 1, 0, 2, 28, 146, 360, 450, 292, 98, 16, 1, 0, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Sep 19 2006, May 28 2007

Keywords

Comments

Riordan array (1, x*(1+x)/(1-x)). Rising and falling diagonals are the tribonacci numbers A000213, A001590.

Examples

			Triangle begins:
  1;
  0, 1;
  0, 2,  1;
  0, 2,  4,   1;
  0, 2,  8,   6,   1;
  0, 2, 12,  18,   8,    1;
  0, 2, 16,  38,  32,   10,   1;
  0, 2, 20,  66,  88,   50,  12,   1;
  0, 2, 24, 102, 192,  170,  72,  14,   1;
  0, 2, 28, 146, 360,  450, 292,  98,  16,  1;
  0, 2, 32, 198, 608, 1002, 912, 462, 128, 18, 1;
		

Crossrefs

Other versions: A035607, A113413, A119800, A266213.
Sums include: A000007, A001333 (row), A001590 (diagonal), A007483, A057077 (signed row), A078016 (signed diagonal), A086901, A091928, A104934, A122558, A122690.

Programs

  • Haskell
    a122542 n k = a122542_tabl !! n !! k
    a122542_row n = a122542_tabl !! n
    a122542_tabl = map fst $ iterate
       (\(us, vs) -> (vs, zipWith (+) ([0] ++ us ++ [0]) $
                          zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [0, 1])
    -- Reinhard Zumkeller, Jul 20 2013, Apr 17 2013
    
  • Magma
    function T(n, k) // T = A122542
      if k eq 0 then return 0^n;
      elif k eq n then return 1;
      else return T(n-1,k) + T(n-1,k-1) + T(n-2,k-1);
      end if;
    end function;
    [T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 27 2024
  • Mathematica
    CoefficientList[#, y]& /@ CoefficientList[(1-x)/(1 - (1+y)x - y x^2) + O[x]^11, x] // Flatten (* Jean-François Alcover, Sep 09 2018 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, 0, T[n-1,k-1] +T[n-1,k] +T[n-2,k- 1] ]]; (* T = A122542 *)
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 27 2024 *)
  • Sage
    def A122542_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return prec(n-1,k-1)+2*sum(prec(n-i,k-1) for i in (2..n-k+1))
        return [prec(n, k) for k in (0..n)]
    for n in (0..10): print(A122542_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

Sum_{k=0..n} x^k*T(n,k) = A000007(n), A001333(n), A104934(n), A122558(n), A122690(n), A091928(n) for x = 0, 1, 2, 3, 4, 5. - Philippe Deléham, Jan 25 2012
Sum_{k=0..n} 3^(n-k)*T(n,k) = A086901(n).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A007483(n-1), n >= 1. - Philippe Deléham, Oct 08 2006
T(2*n, n) = A123164(n).
T(n, k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-1), n > 1. - Philippe Deléham, Jan 25 2012
G.f.: (1-x)/(1-(1+y)*x-y*x^2). - Philippe Deléham, Mar 02 2012
From G. C. Greubel, Oct 27 2024: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A057077(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A001590(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A078016(n). (End)

A208709 T(n,k)=Number of nXk 0..1 arrays with new values 0..1 introduced in row major order and no element equal to more than two of its immediate leftward or upward or right-upward antidiagonal neighbors.

Original entry on oeis.org

1, 2, 2, 4, 8, 4, 8, 28, 32, 8, 16, 100, 196, 128, 16, 32, 356, 1268, 1372, 512, 32, 64, 1268, 8128, 16084, 9604, 2048, 64, 128, 4516, 52184, 185344, 204020, 67228, 8192, 128, 256, 16084, 334948, 2142580, 4226368, 2587924, 470596, 32768, 256, 512, 57284, 2149988
Offset: 1

Views

Author

R. H. Hardin Mar 01 2012

Keywords

Comments

Table starts
...1.....2.......4.........8..........16............32..............64
...2.....8......28.......100.........356..........1268............4516
...4....32.....196......1268........8128.........52184..........334948
...8...128....1372.....16084......185344.......2142580........24754628
..16...512....9604....204020.....4226368......87985748......1830045552
..32..2048...67228...2587924....96373248....3613193828....135288700496
..64..8192..470596..32826932..2197585152..148378294612..10001404535216
.128.32768.3294172.416398420.50111214592.6093257064980.739367693888784

Examples

			Some solutions for n=4 k=3
..0..1..1....0..1..0....0..0..0....0..0..1....0..0..1....0..1..0....0..1..0
..1..0..0....0..0..0....0..1..1....0..0..0....0..1..1....0..0..0....1..0..0
..1..0..1....0..1..1....1..0..1....1..1..1....0..0..0....1..1..1....1..0..1
..1..1..1....0..1..1....0..1..0....0..0..0....0..1..0....1..0..0....1..1..0
		

Crossrefs

Column 2 is A004171(n-1)
Row 2 is A104934

A007484 a(n) = 3*a(n-1) + 2*a(n-2), with a(0)=2, a(1)=7.

Original entry on oeis.org

2, 7, 25, 89, 317, 1129, 4021, 14321, 51005, 181657, 646981, 2304257, 8206733, 29228713, 104099605, 370756241, 1320467933, 4702916281, 16749684709, 59654886689, 212464029485, 756701861833, 2695033644469, 9598504657073, 34185581260157, 121753753094617, 433632421804165
Offset: 0

Views

Author

Keywords

Comments

Number of subsequences of [1,...,2n+1] in which each even number has an odd neighbor.
Same as Pisot sequence E(2,7) (see A008776).
8*a(n) = A007482(n+2) + A007483(n+1) (conjectured, see A104934 for related formula). - Creighton Dement, Apr 15 2005
Conjecture verified using generating functions. - Robert Israel, Jul 12 2018
a(n) = sum of the elements of the matrix M^n, where M = {{1, 2}, {2, 2}}. - Griffin N. Macris, Mar 25 2016
a(3) = 25 is the only composite among the first 8 terms, but then the density of primes decreases, dropping below 50% at the 27th term. - M. F. Hasler, Jul 12 2018
a(n) is also the number of dominating sets in the (2n+1)-triangular snake graph for n > 0. - Eric W. Weisstein, Jun 09 2019

Examples

			G.f. = 2 + 7*x + 25*x^2 + 89*x^3 + 317*x^4 + 1129*x^5 + ... - _Michael Somos_, Jul 19 2021
		

References

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

Crossrefs

See A008776 for definitions of Pisot sequences.

Programs

  • Haskell
    a007484 n = a007484_list !! n
    a007484_list = 2 : 7 : zipWith (+)
                   (map (* 3) $ tail a007484_list) (map (* 2) a007484_list)
    -- Reinhard Zumkeller, Nov 02 2015
    
  • Magma
    A007484:=[2, 7]; [n le 2 select A007484[n] else 3*Self(n-1)+2*Self(n-2): n in [1..40]]; // Wesley Ivan Hurt, Jan 24 2017
    
  • Maple
    A007484 := proc(n) option remember; if n=0 then 2; elif n=1 then 7; else 3*A007484(n-1)+2*A007484(n-2); fi; end;
  • Mathematica
    LinearRecurrence[{3, 2}, {2, 7}, 40] (* Harvey P. Dale, Apr 24 2012 *)
    Table[(2^-n ((3 - Sqrt[17])^n (-4 + Sqrt[17]) + (3 + Sqrt[17])^n (4 + Sqrt[17])))/Sqrt[17], {n, 0, 20}] // Expand (* Eric W. Weisstein, Jun 09 2019 *)
    CoefficientList[Series[(2+x)/(1 -3x -2x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Jun 09 2019 *)
    a[ n_] := MatrixPower[{{1, 2}, {2, 2}}, n]//Flatten//Total; (* Michael Somos, Jul 19 2021 *)
  • PARI
    a(n)=([0,1; 2,3]^n*[2;7])[1,1] \\ Charles R Greathouse IV, Mar 25 2016
    
  • PARI
    A007484_vec(N)=Vec((2+x)/(1-3*x-2*x^2)+O(x^n)) \\ M. F. Hasler, Jul 12 2018
    
  • Sage
    [(i*sqrt(2))^(n-1)*( i*2*sqrt(2)*chebyshev_U(n, -3*i/(2*sqrt(2))) + chebyshev_U(n-1, -3*i/(2*sqrt(2))) ) for n in (0..30)] # G. C. Greubel, Jul 18 2021

Formula

a(n) = nearest integer to (and converges rapidly to) (1+4/sqrt(17))*((3+sqrt(17))/2)^n. - N. J. A. Sloane, Jul 30 2016
If p[i] = Fibonacci(i+2) 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
G.f.: (2 + x)/(1 - 3*x - 2*x^2). - M. F. Hasler, Jul 12 2018
From G. C. Greubel, Jul 18 2021: (Start)
a(n) = (i*sqrt(2))^(n-1)*( i*2*sqrt(2)*ChebyshevU(n, -3*i/(2*sqrt(2))) + ChebyshevU(n-1, -3*i/(2*sqrt(2))) ).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*((7*n-8*k)/(n-k))*2^k*3^(n-2*k-1) with a(0) = 2. (End)
If we extend the definition of A007483(m) to negative m by using the recurrence, then a(n) = A007483(-3-n)*(-2)^n holds for all n in Z. - Michael Somos, Jul 19 2021
E.g.f.: 2*exp(3*x/2)*(17*cosh(sqrt(17)*x/2) + 4*sqrt(17)*sinh(sqrt(17)*x/2))/17. - Stefano Spezia, May 24 2024

Extensions

Definition edited by N. J. A. Sloane, Jul 30 2016

A184761 T(n,k)=Half the number of nXk binary arrays with no 1 having an adjacent 1 both above and to its left.

Original entry on oeis.org

1, 2, 2, 4, 7, 4, 8, 25, 25, 8, 16, 89, 163, 89, 16, 32, 317, 1056, 1056, 317, 32, 64, 1129, 6847, 12397, 6847, 1129, 64, 128, 4021, 44391, 145778, 145778, 44391, 4021, 128, 256, 14321, 287802, 1713803, 3110914, 1713803, 287802, 14321, 256, 512, 51005, 1865917
Offset: 1

Views

Author

R. H. Hardin Jan 21 2011

Keywords

Comments

Table starts
...1......2........4...........8.............16...............32
...2......7.......25..........89............317.............1129
...4.....25......163........1056...........6847............44391
...8.....89.....1056.......12397.........145778..........1713803
..16....317.....6847......145778........3110914.........66363023
..32...1129....44391.....1713803.......66363023.......2568513843
..64...4021...287802....20148584.....1415755252......99419347147
.128..14321..1865917...236878817....30202770902....3848174315295
.256..51005.12097367..2784890782...644326291402..148949599913987
.512.181657.78431296.32740859687.13745636657969.5765325542821919

Examples

			Some solutions for 4X3
..1..1..0....1..0..0....0..1..1....0..0..0....0..0..1....1..0..0....0..0..0
..0..0..0....0..0..1....0..0..1....0..0..1....1..0..0....0..1..0....1..0..1
..1..1..0....1..0..1....1..1..0....0..0..1....1..1..0....0..0..1....1..0..1
..0..0..0....0..0..0....0..0..1....1..1..0....0..1..0....1..0..0....0..1..0
		

Crossrefs

Column 2 is A007484(n-1) and 1/2 A055099 and 1/4 A104934(n+1)

A202206 a(n) = 3*a(n-1)+3*a(n-2) with a(0)=1 and a(1)=2.

Original entry on oeis.org

1, 2, 9, 33, 126, 477, 1809, 6858, 26001, 98577, 373734, 1416933, 5372001, 20366802, 77216409, 292749633, 1109898126, 4207943277, 15953524209, 60484402458, 229313780001, 869394547377, 3296124982134
Offset: 0

Views

Author

Philippe Deléham, Dec 14 2011

Keywords

Crossrefs

Programs

Formula

G.f.: (1-x)/(1-3*x-3*x^2).

A322940 a(n) = [x^n] (4*x^2 + x - 1)/(2*x^2 + 3*x - 1).

Original entry on oeis.org

1, 2, 4, 16, 56, 200, 712, 2536, 9032, 32168, 114568, 408040, 1453256, 5175848, 18434056, 65653864, 233829704, 832796840, 2966049928, 10563743464, 37623330248, 133997477672, 477239093512, 1699712235880, 6053614894664, 21560269155752, 76788037256584
Offset: 0

Views

Author

Peter Luschny, Jan 06 2019

Keywords

Crossrefs

Row sums of A322941.

Programs

  • Maple
    a := proc(n) option remember; `if`(n < 3, [1, 2, 4][n+1], 3*a(n-1) + 2*a(n-2)) end:
    seq(a(n), n=0..26);
  • Mathematica
    Join[{1}, LinearRecurrence[{3, 2}, {2, 4}, 26]] (* Jean-François Alcover, Jul 13 2019 *)

Formula

a(n) = 3*a(n-1) + 2*a(n-2) for n >= 3.
a(n) = 2*A104934(n-1) for n >= 1.
a(n) = 4*A055099(n-2) for n >= 2.
INVERT(a) = A102865.
INVERTi(a) = A322939. (See the link 'Transforms' at the bottom of the page.)

A202209 Triangle T(n,k), read by rows, given by (2, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 2, 0, 5, 1, 0, 13, 5, 0, 0, 34, 19, 1, 0, 0, 89, 65, 8, 0, 0, 0, 233, 210, 42, 1, 0, 0, 0, 610, 654, 183, 11, 0, 0, 0, 0, 1597, 1985, 717, 74, 1, 0, 0, 0, 0, 4181, 5911, 2622, 394, 14, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 14 2011

Keywords

Comments

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

Examples

			Triangle begins :
1
2, 0
5, 1, 0
13, 5, 0, 0
34, 19, 1, 0, 0
89, 65, 8, 0, 0, 0
233, 210, 42, 1, 0, 0, 0
		

Crossrefs

Cf. A000045, A000079, A001519, A001870, A001906, A126124, A202207 (antidiagonal sums)

Formula

T(n,k) = 3*T(n-1,k) - T(n-2,k) + T(n-2,k-1).
G.f.: (1-x)/(1-3x+(1-y)*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A057682(n+1), A000079(n), A122367(n), A025192(n), A052924(n), A104934(n), A202206(n), A122117(n), A197189(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6 respectively.
T(n,0) = A122367(n) = A000045(2n+1).
Showing 1-10 of 12 results. Next