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

A001906 F(2n) = bisection of Fibonacci sequence: a(n) = 3*a(n-1) - a(n-2).

Original entry on oeis.org

0, 1, 3, 8, 21, 55, 144, 377, 987, 2584, 6765, 17711, 46368, 121393, 317811, 832040, 2178309, 5702887, 14930352, 39088169, 102334155, 267914296, 701408733, 1836311903, 4807526976, 12586269025, 32951280099, 86267571272, 225851433717, 591286729879, 1548008755920
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term, same as A088305.
Second column of array A102310 and of A028412.
Numbers k such that 5*k^2 + 4 is a square. - Gregory V. Richardson, Oct 13 2002
Apart from initial terms, also Pisot sequences E(3,8), P(3,8), T(3,8). See A008776 for definitions of Pisot sequences.
Binomial transform of A000045. - Paul Barry, Apr 11 2003
Number of walks of length 2n+1 in the path graph P_4 from one end to the other one. Example: a(2)=3 because in the path ABCD we have ABABCD, ABCBCD and ABCDCD. - Emeric Deutsch, Apr 02 2004
Simplest example of a second-order recurrence with the sixth term a square.
Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 5 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = 1, s(2n) = 3. - Lekraj Beedassy, Jun 11 2004
a(n) (for n > 0) is the smallest positive integer that cannot be created by summing at most n values chosen among the previous terms (with repeats allowed). - Andrew Weimholt, Jul 20 2004
All nonnegative integer solutions of Pell equation b(n)^2 - 5*a(n)^2 = +4 together with b(n) = A005248(n), n >= 0. - Wolfdieter Lang, Aug 31 2004
a(n+1) is a Chebyshev transform of 3^n (A000244), where the sequence with g.f. G(x) is sent to the sequence with g.f. (1/(1+x^2))G(x/(1+x^2)). - Paul Barry, Oct 25 2004
a(n) is the number of distinct products of matrices A, B, C, in (A+B+C)^n where commutator [A,B] = 0 but C does not commute with A or B. - Paul D. Hanna and Max Alekseyev, Feb 01 2006
Number of binary words with exactly k-1 strictly increasing runs. Example: a(3)=F(6)=8 because we have 0|0,1|0,1|1,0|01,01|0,1|01,01|1 and 01|01. Column sums of A119900. - Emeric Deutsch, Jul 23 2006
See Table 1 on page 411 of Lukovits and Janezic paper. - Parthasarathy Nambi, Aug 22 2006
Inverse: With phi = (sqrt(5) + 1)/2, log_phi((sqrt(5) a(n) + sqrt(5 a(n)^2 + 4))/2) = n. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007
[1,3,8,21,55,144,...] is the Hankel transform of [1,1,4,17,75,339,1558,...](see A026378). - Philippe Deléham, Apr 13 2007
The Diophantine equation a(n) = m has a solution (for m >= 1) if and only if floor(arcsinh(sqrt(5)*m/2)/log(phi)) <> floor(arccosh(sqrt(5)*m/2)/log(phi)) where phi is the golden ratio. An equivalent condition is A130259(m) = A130260(m). - Hieronymus Fischer, May 25 2007
a(n+1) = AB^(n)(1), n >= 0, with compositions of Wythoff's complementary A(n):=A000201(n) and B(n)=A001950(n) sequences. See the W. Lang link under A135817 for the Wythoff representation of numbers (with A as 1 and B as 0 and the argument 1 omitted). E.g., 1=`1`, 3=`10`, 8=`100`, 21=`1000`, ..., in Wythoff code.
Equals row sums of triangles A140069, A140736 and A140737. - Gary W. Adamson, May 25 2008
a(n) is also the number of idempotent order-preserving partial transformations (of an n-element chain) of width n (width(alpha) = max(Im(alpha))). Equivalently, it is the number of idempotent order-preserving full transformations (of an n-element chain). - Abdullahi Umar, Sep 08 2008
a(n) is the number of ways that a string of 0,1 and 2 of size (n-1) can be arranged with no 12-pairs. - Udita Katugampola, Sep 24 2008
Starting with offset 1 = row sums of triangle A175011. - Gary W. Adamson, Apr 03 2010
As a fraction: 1/71 = 0.01408450... or 1/9701 = 0.0001030821.... - Mark Dols, May 18 2010
Sum of the products of the elements in the compositions of n (example for n=3: the compositions are 1+1+1, 1+2, 2+1, and 3; a(3) = 1*1*1 + 1*2 + 2*1 + 3 = 8). - Dylon Hamilton, Jun 20 2010, Geoffrey Critzer, Joerg Arndt, Dec 06 2010
a(n) relates to regular polygons with even numbers of edges such that Product_{k=1..(n-2)/2} (1 + 4*cos^2 k*Pi/n) = even-indexed Fibonacci numbers with a(n) relating to the 2*n-gons. The constants as products = roots to even-indexed rows of triangle A152063. For example: a(5) = 55 satisfies the product formula relating to the 10-gon. - Gary W. Adamson, Aug 15 2010
Alternatively, product of roots to x^4 - 12x^3 + 51x^2 - 90x + 55, (10th row of triangle A152063) = (4.618...)*(3.618...)*(2.381...)*(1.381...) = 55. - Gary W. Adamson, Aug 15 2010
a(n) is the number of generalized compositions of n when there are i different types of i, (i=1,2,...). - Milan Janjic, Aug 26 2010
Starting with "1" = row sums of triangle A180339, and eigensequence of triangle A137710. - Gary W. Adamson, Aug 28 2010
a(2) = 3 is the only prime.
Number of nonisomorphic graded posets with 0 and uniform hasse graph of rank n > 0, with exactly 2 elements of each rank level above 0. (Uniform used in the sense of Retakh, Serconek, and Wilson. Graded used in Stanley's sense that every maximal chain has the same length n.) - David Nacin, Feb 13 2012
Pisano period lengths: 1, 3, 4, 3, 10, 12, 8, 6, 12, 30, 5, 12, 14, 24, 20, 12, 18, 12, 9, 30, ... - R. J. Mathar, Aug 10 2012
Solutions (x, y) = (a(n), a(n+1)) satisfying x^2 + y^2 = 3xy + 1. - Michel Lagneau, Feb 01 2014
For n >= 1, a(n) equals the number of 01-avoiding words of length n-1 on alphabet {0,1,2}. - Milan Janjic, Jan 25 2015
With a(0) = 0, for n > 1, a(n) is the smallest number not already in the sequence such that a(n)^2 - a(n-1)^2 is a Fibonacci number. - Derek Orr, Jun 08 2015
Let T be the tree generated by these rules: 0 is in T, and if p is in T, then p + 1 is in T and x*p is in T and y*p is in T. The n-th generation of T consists of A001906(n) polynomials, for n >= 0. - Clark Kimberling, Nov 24 2015
For n > 0, a(n) = exactly the maximum area of a quadrilateral with sides in order of lengths F(n), F(n), L(n), and L(n) with L(n)=A000032(n). - J. M. Bergot, Jan 20 2016
a(n) = twice the area of a triangle with vertices at (L(n+1), L(n+2)), (F(n+1), F(n+1)), and (L(n+2), L(n+1)), with L(n)=A000032(n). - J. M. Bergot, Apr 20 2016
Except for the initial 0, this is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S - S^2; see A291000. - Clark Kimberling, Aug 24 2017
a(n+1) is the number of spanning trees of the graph T_n, where T_n is a sequence of n triangles, where adjacent triangles share an edge. - Kevin Long, May 07 2018
a(n) is the number of ways to partition [n] such that each block is a run of consecutive numbers, and each block has a fixed point, e.g., for n=3, 12|3 with 1 and 3 as fixed points is valid, but 13|2 is not valid as 1 and 3 do not form a run. Consequently, a(n) also counts the spanning trees of the graph given by taking a path with n vertices and adding another vertex adjacent to all of them. - Kevin Long, May 11 2018
From Wolfdieter Lang, May 31 2018: (Start)
The preceding comment can be paraphrased as follows. a(n) is the row sum of the array A305309 for n >= 1. The array A305309(n, k) gives the sum of the products of the block lengths of the set partition of [n] := {1, 2, ..., n} with A048996(n, k) blocks of consecutive numbers, corresponding to the compositions obtained from the k-th partition of n in Abramowitz-Stegun order. See the comments and examples at A305309.
{a(n)} also gives the infinite sequence of nonnegative numbers k for which k * ||k*phi|| < 1/sqrt(5), where the irrational number phi = A001622 (golden section), and ||x|| is the absolute value of the difference between x and the nearest integer. See, e.g., the Havil reference, pp. 171-172. (End)
a(n) is the number of tilings of two n X 1 rectangles joined orthogonally at a common end-square (so to have 2n-1 squares in a right-angle V shape) with only 1 X 1 and 2 X 1 tiles. This is a consequence of F(2n) = F(n+1)*F(n) + F(n)*F(n-1). - Nathaniel Gregg, Oct 10 2021
These are the denominators of the upper convergents to the golden ratio, tau; they are also the numerators of the lower convergents (viz. 1/1 < 3/2 < 8/5 < 21/13 < ... < tau < ... 13/8 < 5/3 < 2/1). - Clark Kimberling, Jan 02 2022
For n > 1, a(n) is the smallest Fibonacci number of unit equilateral triangle tiles needed to make an isosceles trapezoid of height F(n) triangles. - Kiran Ananthpur Bacche, Sep 01 2024

Examples

			G.f. = x + 3*x^2 + 8*x^3 + 21*x^4 + 55*x^5 + 144*x^6 + 377*x^7 + 987*x^8 + ...
a(3) = 8 because there are exactly 8 idempotent order-preserving full transformations on a 3-element chain, namely: (1,2,3)->(1,1,1),(1,2,3)->(2,2,2),(1,2,3)->(3,3,3),(1,2,3)->(1,1,3),(1,2,3)->(2,2,3),(1,2,3)->(1,2,2),(1,2,3)->(1,3,3),(1,2,3)->(1,2,3)-mappings are coordinate-wise. - _Abdullahi Umar_, Sep 08 2008
		

References

  • Mohammad K. Azarian, The Generating Function for the Fibonacci Sequence, Missouri Journal of Mathematical Sciences, Vol. 2, No. 2, Spring 1990, pp. 78-79. Zentralblatt MATH, Zbl 1097.11516.
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 2,5,6,14,33,55.
  • R. J. Douglas, Tournaments that admit exactly one Hamiltonian cycle, Proc. London Math. Soc., 21 (1970), 716-730.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • A. Gerardin, Reply to Query 4389, L'Intermédiaire des Mathématiciens, 22 (1915), 23.
  • Julian Havil, The Irrationals, Princeton University Press, Princeton and Oxford, 2012, pp. 171-172.
  • Howie, J. M. Combinatorial and probabilistic results in transformation semigroups. Words, languages and combinatorics, II (Kyoto, 1992), 200--206, World Sci. Publ., River Edge, NJ, (1994).
  • Laradji, A. and Umar, A. Combinatorial results for semigroups of order-preserving full transformations. Semigroup Forum 72 (2006), 51-62.
  • I. Lukovits, A. Graovac, E. Kalman, G. Kaptay, P. Nagy, S. Nikolic, J. Sytchev and N. Trinajstich, "Nanotubes: Number of Kekulé Structures and Aromaticity", J. Chem. Inf. Comput. Sci, vol. 43 (2003), pp. 609-614. See Equation 6 on page 611.
  • T. Mansour, M. Shattuck, A statistic on n-color compositions and related sequences, Proc. Indian Acad. Sci. (Math. Sci.) Vol. 124, No. 2, May 2014, pp. 127-140.
  • H. Mathieu, Query 3932, L'Intermédiaire des Mathématiciens, 18 (1911), 222. - N. J. A. Sloane, Mar 08 2022
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 101.
  • Paulo Ribenboim, Primes in Lucas sequences (Chap 4), in 'My Numbers, My Friends', Springer-Verlag 2000 NY, page 27.
  • 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. Stanley, Enumerative combinatorics, Vol. 1, Cambridge University Press, Cambridge, 1997, pp. 96-100.

Crossrefs

Fibonacci A000045 = union of this sequence and A001519.
Inverse sequences A130259 and A130260.

Programs

  • Haskell
    a001906 n = a001906_list !! n
    a001906_list =
       0 : 1 : zipWith (-) (map (* 3) $ tail a001906_list) a001906_list
    -- Reinhard Zumkeller, Oct 03 2011
    
  • Magma
    [Fibonacci(2*n): n in [0..30]]; // Vincenzo Librandi, Sep 10 2014
  • Maple
    with(combstruct): SeqSeqSeqL := [T, {T=Sequence(S, card > 0), S=Sequence(U, card > 1), U=Sequence(Z, card >0)}, unlabeled]: seq(count(SeqSeqSeqL, size=n+1), n=0..28); # Zerinvary Lajos, Apr 04 2009
    H := (n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -4):
    a := n -> `if`(n = 0, 0, H(2*n, 1, 1/2)):
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 03 2019
    A001906 := proc(n)
        combinat[fibonacci](2*n) ;
    end proc:
    seq(A001906(n),n=0..20) ; # R. J. Mathar, Jan 11 2024
  • Mathematica
    f[n_] := Fibonacci[2n]; Array[f, 28, 0] (* or *)
    LinearRecurrence[{3, -1}, {0, 1}, 28] (* Robert G. Wilson v, Jul 13 2011 *)
    Take[Fibonacci[Range[0,60]],{1,-1,2}] (* Harvey P. Dale, May 23 2012 *)
    Table[ ChebyshevU[n-1, 3/2], {n, 0, 30}] (* Jean-François Alcover, Jan 25 2013, after Michael Somos *)
    CoefficientList[Series[(x)/(1 - 3x + x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Sep 10 2014 *)
  • Maxima
    makelist(fib(2*n),n,0,30); /* Martin Ettl, Oct 21 2012 */
    
  • MuPAD
    numlib::fibonacci(2*n) $ n = 0..35; // Zerinvary Lajos, May 09 2008
    
  • PARI
    {a(n) = fibonacci(2*n)}; /* Michael Somos, Dec 06 2002 */
    
  • PARI
    {a(n) = subst( poltchebi(n+1)*4 - poltchebi(n)*6, x, 3/2)/5}; /* Michael Somos, Dec 06 2002 */
    
  • PARI
    {a(n) = polchebyshev( n-1, 2, 3/2)}; /* Michael Somos Jun 18 2011 */
    
  • PARI
    Vec(x/(1-3*x+x^2)+O(x^99)) \\ Charles R Greathouse IV, Oct 24 2012
    
  • Python
    def a(n, adict={0:0, 1:1}):
        if n in adict:
            return adict[n]
        adict[n]=3*a(n-1) - a(n-2)
        return adict[n] # David Nacin, Mar 04 2012
    
  • Sage
    [lucas_number1(n,3,1) for n in range(27)] # Zerinvary Lajos, Jun 25 2008
    
  • Sage
    [fibonacci(2*n) for n in range(0, 28)] # Zerinvary Lajos, May 15 2009
    

Formula

G.f.: x / (1 - 3*x + x^2). - Simon Plouffe in his 1992 dissertation
a(n) = 3*a(n-1) - a(n-2) = A000045(2*n).
a(n) = -a(-n).
a(n) = A060921(n-1, 0), n >= 1.
a(n) = sqrt((A005248(n)^2 - 4)/5).
a(n) = A007598(n) - A007598(n-2), n > 1.
a(n) = (ap^n - am^n)/(ap-am), with ap := (3+sqrt(5))/2, am := (3-sqrt(5))/2.
Invert transform of natural numbers: a(n) = Sum_{k=1..n} k*a(n-k), a(0) = 1. - Vladeta Jovovic, Apr 27 2001
a(n) = S(n-1, 3) with S(n, x) = U(n, x/2) Chebyshev's polynomials of the 2nd kind, see A049310.
a(n) = Sum_{k=0..n} binomial(n, k)*F(k). - Benoit Cloitre, Sep 03 2002
Limit_{n->infinity} a(n)/a(n-1) = 1 + phi = (3 + sqrt(5))/2. This sequence includes all of the elements of A033888 combined with A033890.
a(0)=0, a(1)=1, a(2)=3, a(n)*a(n-2) + 1 = a(n-1)^2. - Benoit Cloitre, Dec 06 2002
a(n) = n + Sum_{k=0..n-1} Sum_{i=0..k} a(i) = n + A054452(n). - Benoit Cloitre, Jan 26 2003
a(n) = Sum_{k=1..n} binomial(n+k-1, n-k). - Vladeta Jovovic, Mar 23 2003
E.g.f.: (2/sqrt(5))*exp(3*x/2)*sinh(sqrt(5)*x/2). - Paul Barry, Apr 11 2003
Second diagonal of array defined by T(i, 1) = T(1, j) = 1, T(i, j) = Max(T(i-1, j) + T(i-1, j-1); T(i-1, j-1) + T(i, j-1)). - Benoit Cloitre, Aug 05 2003
a(n) = F(n)*L(n) = A000045(n)*A000032(n). - Lekraj Beedassy, Nov 17 2003
F(2n+2) = 1, 3, 8, ... is the binomial transform of F(n+2). - Paul Barry, Apr 24 2004
Partial sums of A001519(n). - Lekraj Beedassy, Jun 11 2004
a(n) = Sum_{i=0..n-1} binomial(2*n-1-i, i)*5^(n-i-1)*(-1)^i. - Mario Catalani (mario.catalani(AT)unito.it), Jul 23 2004
a(n) = Sum_{k=0..n} binomial(n+k, n-k-1) = Sum_{k=0..n} binomial(n+k, 2k+1).
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(-1)^k*3^(n-2*k). - Paul Barry, Oct 25 2004
a(n) = (n*L(n) - F(n))/5 = Sum_{k=0..n-1} (-1)^n*L(2*n-2*k-1).
The i-th term of the sequence is the entry (1, 2) in the i-th power of the 2 X 2 matrix M = ((1, 1), (1, 2)). - Simone Severini, Oct 15 2005
Computation suggests that this sequence is the Hankel transform of A005807. The Hankel transform of {a(n)} is Det[{{a(1), ..., a(n)}, {a(2), ..., a(n+1)}, ..., {a(n), ..., a(2n-1)}}]. - John W. Layman, Jul 21 2000
a(n+1) = (A005248(n+1) - A001519(n))/2. - Creighton Dement, Aug 15 2004
a(n+1) = Sum_{i=0..n} Sum_{j=0..n} binomial(n-i, j)*binomial(n-j, i). - N. J. A. Sloane, Feb 20 2005
a(n) = (2/sqrt(5))*sinh(2*n*psi), where psi:=log(phi) and phi=(1+sqrt(5))/2. - Hieronymus Fischer, Apr 24 2007
a(n) = ((phi+1)^n - A001519(n))/phi with phi=(1+sqrt(5))/2. - Reinhard Zumkeller, Nov 22 2007
Row sums of triangle A135871. - Gary W. Adamson, Dec 02 2007
a(n)^2 = Sum_{k=1..n} a(2*k-1). This is a property of any sequence S(n) such that S(n) = B*S(n-1) - S(n-2) with S(0) = 0 and S(1) = 1 including {0,1,2,3,...} where B = 2. - Kenneth J Ramsey, Mar 23 2008
a(n) = 1/sqrt(5)*(phi^(2*n+2) - phi^(-2*n-2)), where phi = (1+sqrt(5))/2, the golden ratio. - Udita Katugampola (SIU), Sep 24 2008
If p[i] = i 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, May 02 2010
If p[i] = Stirling2(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
a(n) = F(2*n+10) mod F(2*n+5).
a(n) = 1 + a(n-1) + Sum_{i=1..n-1} a(i), with a(0)=0. - Gary W. Adamson, Feb 19 2011
a(n) is equal to the permanent of the (n-1) X (n-1) Hessenberg matrix with 3's along the main diagonal, i's along the superdiagonal and the subdiagonal (i is the imaginary unit), and 0's everywhere else. - John M. Campbell, Jun 09 2011
a(n), n > 1 is equal to the determinant of an (n-x) X (n-1) tridiagonal matrix with 3's in the main diagonal, 1's in the super and subdiagonals, and the rest 0's. - Gary W. Adamson, Jun 27 2011
a(n) = b such that Integral_{x=0..Pi/2} sin(n*x)/(3/2-cos(x)) dx = c + b*log(3). - Francesco Daddi, Aug 01 2011
a(n+1) = Sum_{k=0..n} A101950(n,k)*2^k. - Philippe Deléham, Feb 10 2012
G.f.: A(x) = x/(1-3*x+x^2) = G(0)/sqrt(5); where G(k)= 1 -(a^k)/(1 - b*x/(b*x - 2*(a^k)/G(k+1))), a = (7-3*sqrt(5))/2, b = 3+sqrt(5), if |x|<(3-sqrt(5))/2 = 0.3819660...; (continued fraction 3 kind, 3-step ). - Sergei N. Gladkovskii, Jun 25 2012
a(n) = 2^n*b(n;1/2) = -b(n;-1), where b(n;d), n=0,1,...,d, denote the delta-Fibonacci numbers defined in comments to A000045 (see also Witula's et al. papers). - Roman Witula, Jul 12 2012
Product_{n>=1} (1 + 1/a(n)) = 1 + sqrt(5). - Peter Bala, Dec 23 2012
Product_{n>=2} (1 - 1/a(n)) = (1/6)*(1 + sqrt(5)). - Peter Bala, Dec 23 2012
G.f.: x/(1-2*x) + x^2/(1-2*x)/(Q(0)-x) where Q(k) = 1 - x/(x*k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Feb 23 2013
G.f.: G(0)/2 - 1, where G(k) = 1 + 1/( 1 - x/(x + (1-x)^2/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 16 2013
G.f.: x*G(0)/(2-3*x), where G(k) = 1 + 1/( 1 - x*(5*k-9)/(x*(5*k-4) - 6/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 17 2013
Sum_{n>=1} 1/(a(n) + 1/a(n)) = 1. Compare with A001519, A049660 and A049670. - Peter Bala, Nov 29 2013
a(n) = U(n-1,3/2) where U(n-1,x) is Chebyshev polynomial of the second kind. - Milan Janjic, Jan 25 2015
The o.g.f. A(x) satisfies A(x) + A(-x) + 6*A(x)*A(-x) = 0. The o.g.f. for A004187 equals -A(sqrt(x))*A(-sqrt(x)). - Peter Bala, Apr 02 2015
For n > 1, a(n) = (3*F(n+1)^2 + 2*F(n-2)*F(n+1) - F(n-2)^2)/4. - J. M. Bergot, Feb 16 2016
For n > 3, a(n) = floor(MA) - 4 for n even and floor(MA) + 5 for n odd. MA is the maximum area of a quadrilateral with lengths of sides in order L(n), L(n), F(n-3), F(n+3), with L(n)=A000032(n). The ratio of the longer diagonal to the shorter approaches 5/3. - J. M. Bergot, Feb 16 2016
a(n+1) = Sum_{j=0..n} Sum_{k=0..j} binomial(n-j,k)*binomial(j,k)*2^(j-k). - Tony Foster III, Sep 18 2017
a(n) = Sum_{k=0..n-1} Sum_{i=0..n-1} C(k+i,k-i). - Wesley Ivan Hurt, Sep 21 2017
a(n) = Sum_{k=1..A000041(n)} A305309(n, k), n >= 1. Also row sums of triangle A078812.- Wolfdieter Lang, May 31 2018
a(n) = H(2*n, 1, 1/2) for n > 0 where H(n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -4). - Peter Luschny, Sep 03 2019
Sum_{n>=1} 1/a(n) = A153386. - Amiram Eldar, Oct 04 2020
a(n) = A249450(n) + 2. - Leo Tavares, Oct 10 2021
a(n) = -2/(sqrt(5)*tan(2*arctan(phi^(2*n)))), where phi = A001622 is the golden ratio. - Diego Rattaggi, Nov 21 2021
a(n) = sinh(2*n*arcsinh(1/2))/sqrt(5/4). - Peter Luschny, May 21 2022
From Amiram Eldar, Dec 02 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 1 + 1/sqrt(5) (A344212).
Product_{n>=2} (1 + (-1)^n/a(n)) = (5/6) * (1 + 1/sqrt(5)). (End)
a(n) = Sum_{k>=0} Fibonacci(2*n*k)/(Lucas(2*n)^(k+1)). - Diego Rattaggi, Jan 12 2025
Sum_{n>=0} a(n)/3^n = 3. - Diego Rattaggi, Jan 20 2025

A045623 Number of 1's in all compositions of n+1.

Original entry on oeis.org

1, 2, 5, 12, 28, 64, 144, 320, 704, 1536, 3328, 7168, 15360, 32768, 69632, 147456, 311296, 655360, 1376256, 2883584, 6029312, 12582912, 26214400, 54525952, 113246208, 234881024, 486539264, 1006632960, 2080374784, 4294967296, 8858370048, 18253611008, 37580963840
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the n X n matrix m_(i,j) = 2 + abs(i-j) then det(M_n) = (-1)^(n-1)*a(n-1). - Benoit Cloitre, May 28 2002
a(n) is the number of triangulations of a regular (n+3)-gon in which every triangle shares at least one side with the polygon itself. - David Callan, Mar 25 2004
Number of compositions of j+n, j>n and j the maximum part. E.g. a(4) is derived from the number of compositions of, for example: 54(2), 531(6), 522(3), 5211(12) and 51111(5) giving 2+6+3+12+5=28. - Jon Perry, Sep 13 2005
If X_1,X_2,...,X_n are 2-blocks of a (2n+2)-set X then, for n>=1, a(n+1) is the number of (n+1)-subsets of X intersecting each X_i, (i=1,2,...,n). - Milan Janjic, Nov 18 2007
Generated from iterates of M * [1,1,1,...], where M = an infinite triadiagonal matrix with (1,1,1,...) in the main and superdiagonals and (1,0,0,0,...) in the subdiagonal. - Gary W. Adamson, Jan 04 2009
a(n) is the number of weak compositions of n with exactly 1 part equal to 0. - Milan Janjic, Jun 27 2010
An elephant sequence, see A175654. For the corner squares 16 A[5] vectors, with decimal values between 19 and 400, lead to this sequence. For the central square these vectors lead to the companion sequence A045891 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010
Equals first finite difference row of A001792: (1, 3, 8, 20, 48, 112, ...). - Gary W. Adamson, Oct 26 2010
With alternating signs the g.f. is: (1 + x)^2/(1 + 2*x)^2.
Number of 132-avoiding permutations of [n+2] containing exactly one 213 pattern. - David Scambler, Nov 07 2011
a(n) is the number of 1's in all compositions of n+1 = the number of 2's in all compositions of n+2 = the number of 3's in all compositions of n+3 = ... So the partial sums = A001792. - Geoffrey Critzer, Feb 12 2012
Also number of compositions of n into 2 sorts of parts where all parts of the first sort precede all parts of the second sort; see example. - Joerg Arndt, Apr 28 2013
a(n) is also the difference of the total number of parts between all compositions of n+1 and all compositions of n. The equivalent sequence for partitions is A138137. - Omar E. Pol, Aug 28 2013
Except for an initial 1, this is the p-INVERT of (1,1,1,1,1,...) for p(S) = (1 - S)^2; see A291000. - Clark Kimberling, Aug 24 2017
For a composition of n, the total number of runs of parts of size k is a(n-k) - a(n-2k). - Gregory L. Simay, Feb 17 2018
a(n) is the number of binary trees on n+1 nodes that are isomorphic to a path graph. The ratio of a(n)/A000108(n+1) gives the probability that a random Catalan tree on n+1 nodes is isomorphic to a path graph. - Marcel K. Goh, May 09 2020
a(n) is the number of words of length n over the alphabet {0,1,2} such that the first letter is not 2 and the last 1 occurs before the first 0. - Henri Mühle, Mar 08 2021
Also the number of "special permutations" in the Weng and Zagier reference. - F. Chapoton, Sep 30 2022
a(n-k) is the total number of runs of 1s of length k over all binary n-strings. - Félix Balado, Dec 11 2022

Examples

			E.g. a(2)=5 because in the compositions of 3, namely 3,2+1,1+2,1+1+1, we have five 1's altogether.
There are a(3)=12 compositions of 3 into 2 sorts of parts where all parts of the first sort precede all parts of the second sort. Here p:s stands for "part p of sort s":
01:  [ 1:0  1:0  1:0  ]
02:  [ 1:0  1:0  1:1  ]
03:  [ 1:0  1:1  1:1  ]
04:  [ 1:0  2:0  ]
05:  [ 1:0  2:1  ]
06:  [ 1:1  1:1  1:1  ]
07:  [ 1:1  2:1  ]
08:  [ 2:0  1:0  ]
09:  [ 2:0  1:1  ]
10:  [ 2:1  1:1  ]
11:  [ 3:0  ]
12:  [ 3:1  ]
- _Joerg Arndt_, Apr 28 2013
For the compositions of 6, the total number of runs of parts of size 2 is a(6-2) - a(6-2*2) = 28 - 5 = 23, enumerated as follows (with the runs of 2 enclosed in []): 4,[2]; [2],4; [2],3,1; [2],1,3; 3,[2],1; 1,[2],3; 3,1,[2]; 1,3,[2]; [2,2,2]; [2,2],1,1; 1,[2,2],1; 1,1,[2,2]; [2],1,[2],1; 1,[2],1,[2]; [2],1,1,[2]; [2],1,1,1,1; 1,[2],1,1,1; 1,1,[2],1,1; 1,1,1,[2],1; and 1,1,1,1[2]. - _Gregory L. Simay_, Feb 17 2018
There are a(3)=12 triwords of length 3: (0,0,0), (0,0,2), (0,2,0), (0,2,2), (1,0,0), (1,0,2), (1,1,0), (1,1,1), (1,1,2), (1,2,0), (1,2,1), (1,2,2). - _Henri Mühle_, Mar 08 2021
		

References

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

Crossrefs

Convolution of A011782.
Row sums of A103450, A152195, A177992, A198069.
Cf. A001792.

Programs

  • GAP
    a:=[2,5];; for n in [3..40] do a[n]:=4*a[n-1]-4*a[n-2]; od; Concatenation([1],a); # Muniru A Asiru, Oct 16 2018
    
  • Haskell
    a045623 n = a045623_list !! n
    a045623_list = tail $ f a011782_list [] where
       f (u:us) vs = sum (zipWith (*) vs $ reverse ws) : f us ws
         where ws = u : vs
    -- Reinhard Zumkeller, Jul 21 2013
    
  • Maple
    seq(ceil(1/4*2^n*(n+3)),n=0..50);
  • Mathematica
    Table[If[n==0, 1, 2^(n-2)(n+3)], {n, 0, 29}] (* Robert G. Wilson v, Jun 27 2005 *)
    CoefficientList[Series[(1 -2x +x^2)/(1-2x)^2, {x, 0, 30}], x] (* or *)
    LinearRecurrence[{4, -4}, {1, 2, 5}, 31] (* Robert G. Wilson v, Feb 18 2018 *)
  • Maxima
    a(n):=sum(((2*m+2)*n-2*m^2+1)*binomial(2*n+2,2*m+1),m,0,n)/((4*n+2)*2^n); /* Vladimir Kruchinin, Nov 01 2020 */
  • PARI
    a(n)=if(n<1,n==0,(n+3)*2^(n-2))
    

Formula

Sum_{k = 0..n} (k+2)*binomial(n,k) gives the sequence but with a different offset: 2, 5, 12, 28, 64, 144, 320, 704, 1536, ... - N. J. A. Sloane, Jan 30 2008 - formula corrected by Robert G. Wilson v, Feb 26 2018
Binomial transform of 1,1,2,2,3,3,... . - Paul Barry, Mar 06 2003
a(0)=1, a(n) = (n+3)*2^(n-2), n >= 1.
a(n+1) = 2*a(n) + 2^(n-1), n>0.
G.f.: (1-x)^2/(1-2*x)^2. - Detlef Pauly (dettodet(AT)yahoo.de), Mar 03 2003
G.f.: 1/(1-x-x^2-x^3-...)^2. - Jon Perry, Jul 04 2004
a(n) = Sum_{0 <= j <= k <= n} binomial(n, j+k). - Benoit Cloitre, Oct 14 2004
a(n) = Sum_{k=0..n} C(n, k)*floor((k+2)/2). - Paul Barry, Mar 06 2003
a(n+1) - 2*a(n) = A131577(n). - Paul Curtz, May 18 2008
G.f.: 1/(1-x) + Q(0)*x/(1-x)^3, where Q(k)= 1 + (k+1)*x/(1 - x - x*(1-x)/(x + (k+1)*(1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 25 2013
a(n) = Sum_{k=0..n} (k+1)*C(n-1,n-k). - Peter Luschny, Apr 20 2015
a(n) = Sum_{k=0..n-1} a(k) + 2^(n-1) = A001787(n-1) + 2^n, a(0)=1. - Yuchun Ji, May 22 2020
a(n) = Sum_{m=0..n}((2*m+2)*n-2*m^2+1)*C(2*n+2,2*m+1)/((4*n+2)*2^n). - Vladimir Kruchinin, Nov 01 2020
E.g.f.: (1 + exp(2*x)*(3 + 2*x))/4. - Stefano Spezia, Dec 19 2021
From Amiram Eldar, Jan 05 2022: (Start)
Sum_{n>=0} 1/a(n) = 32*log(2) - 61/3.
Sum_{n>=0} (-1)^n/a(n) = 32*log(3/2) - 37/3. (End)

A024495 a(n) = C(n,2) + C(n,5) + ... + C(n, 3*floor(n/3)+2).

Original entry on oeis.org

0, 0, 1, 3, 6, 11, 21, 42, 85, 171, 342, 683, 1365, 2730, 5461, 10923, 21846, 43691, 87381, 174762, 349525, 699051, 1398102, 2796203, 5592405, 11184810, 22369621, 44739243, 89478486, 178956971, 357913941, 715827882, 1431655765, 2863311531, 5726623062
Offset: 0

Views

Author

Keywords

Comments

Trisections give A082365, A132804, A132805. - Paul Curtz, Nov 18 2007
If the offset is changed to 1, this is the maximal number of closed regions bounded by straight lines after n straight line cuts in a plane: a(n) = a(n-1) + n - 3, a(1)=0; a(2)=0; a(3)=1; and so on. - Srikanth K S, Jan 23 2008
M^n * [1,0,0] = [A024493(n), a(n), A024494(n)]; where M = a 3x3 matrix [1,1,0; 0,1,1; 1,0,1]. Sum of terms = 2^n. Example: M^5 * [1,0,0] = [11, 11, 10], sum = 2^5 = 32. - Gary W. Adamson, Mar 13 2009
For n>=1, a(n-1) is the number of generalized compositions of n when there are i^2/2 - 3*i/2 + 1 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1+M)^n = A024493(n) + A024494(n)*M + a(n)*M^2. - Stanislav Sykora, Jun 10 2012
{A024493, A131708, A024495} is the difference analog of the hyperbolic functions {h_1(x), h_2(x), h_3(x)} of order 3. For the definitions of {h_i(x)} and the difference analog {H_i(n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Aug 01 2017
This is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S^3; see A291000. - Clark Kimberling, Aug 24 2017

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, 2nd. ed., Problem 38, p. 70.

Crossrefs

Sequences of the form 1/((1-x)^m - x^m): A000079 (m=1,2), this sequence (m=3), A000749 (m=4), A049016 (m=5), A192080 (m=6), A049017 (m=7), A290995 (m=8), A306939 (m=9).

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 30); [0,0] cat Coefficients(R!( x^2/((1-x)^3-x^3) )); // G. C. Greubel, Apr 11 2023
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, 2*a(n-1)+
          [-1, 0, 1, 1, 0, -1, -1][1+(n mod 6)])
        end:
    seq(a(n), n=0..33); # Paul Weisenhorn, May 17 2020
  • Mathematica
    LinearRecurrence[{3,-3,2},{0,0,1},40] (* Harvey P. Dale, Sep 20 2016 *)
  • PARI
    a(n) = sum(k=0,n\3,binomial(n,3*k+2)) /* Michael Somos, Feb 14 2006 */
    
  • PARI
    a(n)=if(n<0, 0, ([1,0,1;1,1,0;0,1,1]^n)[3,1]) /* Michael Somos, Feb 14 2006 */
    
  • SageMath
    def A024495(n): return (2^n - chebyshev_U(n, 1/2) - chebyshev_U(n-1, 1/2))/3
    [A024495(n) for n in range(41)] # G. C. Greubel, Apr 11 2023

Formula

a(n) = ( 2^n + 2*cos((n-4)*Pi/3) )/3 = (2^n - A057079(n))/3.
a(n) = 2*a(n-1) + A010892(n-2) = a(n-1) + A024494(n-1). With initial zero, binomial transform of A011655 which is effectively A010892 unsigned. - Henry Bottomley, Jun 04 2001
a(2) = 1, a(3) = 3, a(n+2) = a(n+1) - a(n) + 2^n. - Benoit Cloitre, Sep 04 2002
a(n) = Sum_{k=0..n} 2^k*2*sin(Pi*(n-k)/3 + Pi/3)/sqrt(3) (offset 0). - Paul Barry, May 18 2004
G.f.: x^2/((1-x)^3 - x^3) = x^2 / ( (1-2*x)*(1-x+x^2) ).
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3). - Paul Curtz, Nov 18 2007
a(n) + A024493(n-1) = A131577(n). - Paul Curtz, Jan 24 2008
From Paul Curtz, May 29 2011: (Start)
a(n) + a(n+3) = 3*2^n = A007283(n).
a(n+6) - a(n) = 21*2^n = A175805(n).
a(n) + a(n+9) = 171*2^n.
a(n+12) - a(n) = 1365*2^n. (End)
a(n) = A113405(n) + A113405(n+1). - Paul Curtz, Jun 05 2011
Start with x(0)=1, y(0)=0, z(0)=0 and set x(n+1) = x(n) + z(n), y(n+1) = y(n) + x(n), z(n+1) = z(n) + y(n). Then a(n) = z(n). - Stanislav Sykora, Jun 10 2012
G.f.: -x^2/( x^3 - 1 + 3*x/Q(0) ) where Q(k) = 1 + k*(x+1) + 3*x - x*(k+1)*(k+4)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Mar 15 2013
a(n) = 1/18*(-4*(-1)^floor((n - 1)/3) - 6*(-1)^floor(n/3) - 3*(-1)^floor((n + 1)/3) + (-1)^(1 + floor((n + 2)/3)) + 3*2^(n + 1)). - John M. Campbell, Dec 23 2016
a(n) = (1/63)*(-40 + 21*2^n - 42*floor(n/6) + 32*floor((n+3)/6) + 16*floor((n+ 4)/6) - 24*floor((n+5)/6) - 22*floor((n+7)/6) + 21*floor((n+8)/6) + 10*floor((n+9)/6) + 5*floor((n+10)/6) + 3*floor((n+11)/6) + floor((n+ 13)/6)). - John M. Campbell, Dec 24 2016
a(n+m) = a(n)*A024493(m) + A131708(n)*A131708(m) + A024493(n)*a(m). - Vladimir Shevelev, Aug 01 2017
From Kevin Ryde, Sep 24 2020: (Start)
a(n) = (1/3)*2^n - (1/3)*cos((1/3)*Pi*n) - (1/sqrt(3))*sin((1/3)*Pi*n). [Cournot]
a(n) + A111927(n) + A131708(n) = 2^n - 1. [Cournot, page 96 last formula, but misprint should be 2^x - 1 rather than 2^p - 1] (End)
E.g.f.: (exp(2*x) - exp(x/2)*(cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Feb 06 2025

A291219 p-INVERT of (0,1,0,1,0,1,...), where p(S) = 1 - S - S^3.

Original entry on oeis.org

1, 1, 3, 5, 11, 21, 42, 83, 163, 323, 635, 1255, 2473, 4880, 9625, 18985, 37451, 73869, 145715, 287421, 566954, 1118331, 2205947, 4351307, 8583091, 16930447, 33395857, 65874464, 129939569, 256310161, 505580371, 997274197, 1967156763, 3880282533, 7653987242
Offset: 0

Views

Author

Clark Kimberling, Aug 24 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,0,1,0,1,...) = A000035, in some cases t(1,0,1,0,1,...) is a shifted version of the indicated sequence.
p(S) t(1,0,1,0,1,...)
1 - S A000045 (Fibonacci numbers)
1 - S^2 A147600
1 - S^3 A291217
1 - S^5 A291218
1 - S - S^2 A289846
1 - S - S^3 A291219
1 - S - S^4 A291220
1 - S^3- S^6 A291221
1 - S^2- S^3 A291222
1 - S^3- S^4 A291223
1 - 2S A052542
1 - 3S A006190
(1 - S)^2 A239342
(1 - S)^3 A276129
(1 - S)^4 A291224
(1 - S)^5 A291225
(1 - S)^6 A291226
1 - S - 2 S^2 A291227
1 - 2 S - 2 S^2 A291228
1 - 3 S - 2 S^2 A060801
(1 - S)(1 - 2 S) A291229
(1 - S)(1 - 2 S)(1 - 3 S) A291230
(1 - S)(1 - 2 S)(1 - 3 S)( 1 - 4 S) A291231
(1 - 2 S)^2 A291264
(1 - 3 S)^2 A291232
1 - S - S^2 - S^3 A291233
1 - S - S^2 - S^3 - S^4 A291234
1 - S - S^2 - S^3 - S^4 - S^5 A291235
(1 - S)(1 - 3 S) A291236
(1 - S)(1 - 2S)( 1 - 4S) A291237
(1 - S)^2 (1 - 2S) A291238
(1 - S^2) (1 - 2S) A291239
(1 - S^3)^2 A291240
1 - S - S^2 + S^3 A291241
1 - 2 S - S^2 + S^3 A291242
1 - 3 S + S^2 A291243
1 - 4 S + S^2 A291244
1 - 5 S + S^2 A291245
1 - 6 S + S^2 A291246
1 - S - S^2 - S^3 + S^4 A291247
1 - S - S^2 - S^3 - S^4 + S^5 A291248
1 - S - S^2 - S^3 + S^4 + S^5 A291249
1 - S - 2 S^2 + 2 S^3 A291250
1 - 3 S^2 + 2 S^3 A291251 (includes negative terms)
(1 - S^3)^3 A291252
(1 - S - S^2)^2 A291253
(1 - 2 S - S^2)^2 A291254
(1 - S - 2 S^2)^2 A291255

Crossrefs

Programs

  • Magma
    I:=[1,1,3,5,11,21]; [n le 6 select I[n] else Self(n-1)+3*Self(n-2)-Self(n-3)-3*Self(n-4)+Self(n-5)+Self(n-6): n in [1..45]]; // Vincenzo Librandi, Aug 25 2017
  • Mathematica
    z = 60; s = x/(1 - x^2); p = 1 - s - s^3;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000035 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291219 *)
    LinearRecurrence[{1, 3, -1, -3, 1, 1}, {1, 1, 3, 5, 11, 21}, 50] (* Vincenzo Librandi, Aug 25 2017 *)

Formula

G.f.: -(1 - x^2 + x^4)/(-1 + x + 3*x^2 - x^3 - 3*x^4 + x^5 + x^6).
a(n) = a(n-1) + 3*a(n-2) - a(n-3) - 3*a(n-4) + a(n-5) + a(n-6) for n >= 7.

A000749 a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), n > 3, with a(0)=a(1)=a(2)=0, a(3)=1.

Original entry on oeis.org

0, 0, 0, 1, 4, 10, 20, 36, 64, 120, 240, 496, 1024, 2080, 4160, 8256, 16384, 32640, 65280, 130816, 262144, 524800, 1049600, 2098176, 4194304, 8386560, 16773120, 33550336, 67108864, 134225920, 268451840, 536887296, 1073741824, 2147450880
Offset: 0

Views

Author

Keywords

Comments

Number of strings over Z_2 of length n with trace 1 and subtrace 1.
Same as number of strings over GF(2) of length n with trace 1 and subtrace 1.
Also expansion of bracket function.
a(n) is also the number of induced subgraphs with odd number of edges in the complete graph K(n-1). - Alessandro Cosentino (cosenal(AT)gmail.com), Feb 02 2009
From Gary W. Adamson, Mar 13 2009: (Start)
M^n * [1,0,0,0] = [A038503(n), a(n), A038505(n), A038504(n)];
where M = the 4 X 4 matrix [1,1,0,0; 0,1,1,0; 0,0,1,1; 1,0,0,1].
Sum of the 4 terms = 2^n.
Example; M^6 * [1,0,0,0] = [16, 20, 16, 12] sum = 64 = 2^6. (End)
Binomial transform of the period 4 repeat: [0,0,0,1], which is the same as A011765 with offset 0. - Wesley Ivan Hurt, Dec 30 2015
{A038503, A038504, A038505, A000749} is the difference analog of the hyperbolic functions of order 4, {h_1(x), h_2(x), h_3(x), h_4(x)}. For a definition see the reference "Higher Transcendental Functions" and the Shevelev link. - Vladimir Shevelev, Jun 14 2017
This is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S^4; see A291000. - Clark Kimberling, Aug 24 2017

Examples

			a(4;1,1)=4 since the four binary strings of trace 1, subtrace 1 and length 4 are { 0111, 1011, 1101, 1110 }.
		

References

  • Higher Transcendental Functions, Bateman Manuscript Project, Vol. 3, ed. A. Erdelyi, 1983 (chapter XVIII).
  • 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).

Crossrefs

Sequences of the form 1/((1-x)^m - x^m): A000079 (m=1,2), A024495 (m=3), this sequence (m=4), A049016 (m=5), A192080 (m=6), A049017 (m=7), A290995 (m=8), A306939 (m=9).

Programs

  • Haskell
    a000749 n = a000749_list !! n
    a000749_list = 0 : 0 : 0 : 1 : zipWith3 (\u v w -> 4 * u - 6 * v + 4 * w)
       (drop 3 a000749_list) (drop 2 a000749_list) (drop 1 a000749_list)
    -- Reinhard Zumkeller, Jul 15 2013
    
  • Magma
    I:=[0,0,0,1]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Dec 31 2015
    
  • Maple
    A000749 := proc(n) local k; add(binomial(n,4*k+3),k=0..floor(n/4)); end;
    A000749:=-1/((2*z-1)*(2*z**2-2*z+1)); # Simon Plouffe in his 1992 dissertation
    a:= n-> if n=0 then 0 else (Matrix(3, (i,j)-> if (i=j-1) then 1 elif j=1 then [4,-6,4][i] else 0 fi)^(n-1))[1,3] fi: seq(a(n), n=0..33); # Alois P. Heinz, Aug 26 2008
    # Alternatively:
    s := sqrt(2): h := n -> [0,-s,-2,-s,0,s,2,s][1+(n mod 8)]:
    a := n -> `if`(n=0,0,(2^n+2^(n/2)*h(n))/4):
    seq(a(n),n=0..33); # Peter Luschny, Jun 14 2017
  • Mathematica
    Join[{0},LinearRecurrence[{4,-6,4},{0,0,1},40]] (* Harvey P. Dale, Mar 31 2012 *)
    CoefficientList[Series[x^3/(1 -4x +6x^2 -4x^3), {x,0,80}], x] (* Vincenzo Librandi, Dec 31 2015 *)
  • PARI
    a(n)=sum(k=0,n\4,binomial(n,4*k+3))
    
  • SageMath
    @CachedFunction
    def a(n): # a = A000749
        if (n<4): return (n//3)
        else: return 4*a(n-1) -6*a(n-2) +4*a(n-3)
    [a(n) for n in range(41)] # G. C. Greubel, Apr 11 2023

Formula

G.f.: x^3/((1-x)^4 - x^4).
a(n) = Sum_{k=0..n} binomial(n, 4*k+3).
a(n) = a(n-1) + A038505(n-2) = 2*a(n-1) + A009545(n-2) for n>=2.
Without the two initial zeros, binomial transform of A007877. - Henry Bottomley, Jun 04 2001
From Paul Barry, Aug 30 2004: (Start)
a(n) = (2^n - 2^(n/2+1)*sin(Pi*n/4) - 0^n)/4.
a(n+1) is the binomial transform of A021913. (End)
a(n; t, s) = a(n-1; t, s) + a(n-1; t+1, s+t+1) where t is the trace and s is the subtrace.
Without the initial three zeros, = binomial transform of [1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, 3, ...]. - Gary W. Adamson, Jun 19 2008
From Vladimir Shevelev, Jun 14 2017: (Start)
1) For n>=1, a(n) = (1/4)*(2^n + i*(1+i)^n - i*(1-i)^n), where i=sqrt(-1);
2) a(n+m) = a(n)*H_1(m) + H_3(n)*H_2(m) + H_2(n)*H_3(m) + H_1(n)*a(m),
where H_1 = A038503, H_2 = A038504, H_3 = A038505. (End)
a(n) = (2^n - 2*A009545(n) - [n=0])/4. - G. C. Greubel, Apr 11 2023

Extensions

Additional comments from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 22 2002
New definition from Paul Curtz, Oct 29 2007
Edited by N. J. A. Sloane, Jun 13 2008

A291382 p-INVERT of (1,1,0,0,0,0,...), where p(S) = 1 - 2 S - S^2.

Original entry on oeis.org

2, 7, 22, 70, 222, 705, 2238, 7105, 22556, 71608, 227332, 721705, 2291178, 7273743, 23091762, 73308814, 232731578, 738846865, 2345597854, 7446508273, 23640235416, 75050038224, 238259397096, 756395887969, 2401310279090, 7623377054503, 24201736119310
Offset: 0

Views

Author

Clark Kimberling, Sep 04 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,1,0,0,0,...) = A019590, in some cases t(1,1,0,0,0,...) is a shifted version of the cited sequence:
p(S) t(1,1,0,0,0,...)
1 - S A000045 (Fibonacci numbers)
1 - S^2 A094686
1 - S^3 A115055
1 - S^4 A291379
1 - S^5 A281380
1 - S^6 A281381
1 - 2 S A002605
1 - 3 S A125145
(1 - S)^2 A001629
(1 - S)^3 A001628
(1 - S)^4 A001629
(1 - S)^5 A001873
(1 - S)^6 A001874
1 - S - S^2 A123392
1 - 2 S - S^2 A291382
1 - S - 2 S^2 A124861
1 - 2 S - S^2 A291383
(1 - 2 S)^2 A073388
(1 - 3 S)^2 A291387
(1 - 5 S)^2 A291389
(1 - 6 S)^2 A291391
(1 - S)(1 - 2 S) A291393
(1 - S)(1 - 3 S) A291394
(1 - 2 S)(1 - 3 S) A291395
(1 - S)(1 - 2 S) A291393
(1 - S)(1 - 2 S)(1 - 3 S) A291396
1 - S - S^3 A291397
1 - S^2 - S^3 A291398
1 - S - S^2 - S^3 A186812
1 - S - S^2 - S^3 - S^4 A291399
1 - S^2 - S^4 A291400
1 - S - S^4 A291401
1 - S^3 - S^4 A291402
1 - 2 S^2 - S^4 A291403
1 - S^2 - 2 S^4 A291404
1 - 2 S^2 - 2 S^4 A291405
1 - S^3 - S^6 A291407
(1 - S)(1 - S^2) A291408
(1 - S^2)(1 - S)^2 A291409
1 - S - S^2 - 2 S^3 A291410
1 - 2 S - S^2 + S^3 A291411
1 - S - 2 S^2 + S^3 A291412
1 - 3 S + S^2 + S^3 A291413
1 - 2 S + S^3 A291414
1 - 3 S + S^2 A291415
1 - 4 S + S^2 A291416
1 - 4 S + 2 S^2 A291417

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + x^2; p = 1 - 2 s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A019590 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291382 *)

Formula

G.f.: (-2 - 3 x - 2 x^2 - x^3)/(-1 + 2 x + 3 x^2 + 2 x^3 + x^4).
a(n) = 2*a(n-1) + 3*a(n-2) + 2*a(n-3) + a(n-4) for n >= 5.

A052530 a(n) = 4*a(n-1) - a(n-2), with a(0) = 0, a(1) = 2.

Original entry on oeis.org

0, 2, 8, 30, 112, 418, 1560, 5822, 21728, 81090, 302632, 1129438, 4215120, 15731042, 58709048, 219105150, 817711552, 3051741058, 11389252680, 42505269662, 158631825968, 592022034210, 2209456310872, 8245803209278, 30773756526240
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(n-1) and a(n+1) are the solutions for c if b = a(n) in (b^2 + c^2)/(b*c + 1) = 4 and there are no other pairs of solutions apart from consecutive pairs of terms in this sequence. Cf. A061167. - Henry Bottomley, Apr 18 2001
a(n)^2 for n >= 1 gives solutions to A007913(3*x+4) = A007913(x). - Benoit Cloitre, Apr 07 2002
For all terms k of the sequence, 3*k^2 + 4 is a perfect square. Limit_{n->oo} a(n)/a(n-1) = 2 + sqrt(3). - Gregory V. Richardson, Oct 06 2002
a(n) = the number of compositions of the integer 2*n into even parts, where each part 2*i comes in 2*i colors. (Dedrickson, Theorem 3.2.6) An example is given below. Cf. A052529, A095263. - Peter Bala, Sep 17 2013
Except for an initial 1, this is the p-INVERT of (1, 1, 1, 1, 1, ...) for p(S) = 1 - 2*S - 2*S^2; see A291000. - Clark Kimberling, Aug 24 2017
a(n+1) is the number of spanning trees of the graph P_n, where P_n is a 2 X n grid with two additional vertices, u and v, where u is adjacent to (1,1) and (2,1), and v is adjacent to (1,n) and (2,n). - Kevin Long, May 04 2018
a(n) is also the output of Tesler's formula for the number of perfect matchings of an m X n Mobius band where m is even and n is odd, specialized to m=2. (The twist is on the length-n side.) - Sarah-Marie Belcastro, Feb 15 2022
In general, values of x and y which satisfy (x^2 + y^2)/(x*y + 1) = k^2 are any two adjacent terms of a second-order recurrence with initial terms 0 and k and signature (k^2,-1). This can also be expressed as a first-order recurrence a(n+1) = (k^2*a(n) + sqrt((k^4-4)*a(n)^2 + 4*k^2))/2, n > 1. - Gary Detlefs, Feb 27 2024

Examples

			Colored compositions. a(2) = 8: There are two compositions of 4 into even parts, namely 4 and 2 + 2. Using primes to indicate the coloring of parts, the 8 colored compositions are 4, 4', 4'', 4''', 2 + 2, 2 + 2', 2' + 2 and 2' + 2'. - _Peter Bala_, Sep 17 2013
		

Crossrefs

Programs

  • Haskell
    a052530 n = a052530_list !! n
    a052530_list =
       0 : 2 : zipWith (-) (map (* 4) $ tail a052530_list) a052530_list
    -- Reinhard Zumkeller, Sep 29 2011
    
  • Magma
    I:=[0,2]; [n le 2 select I[n] else 4*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Feb 25 2019
    
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Z,Z),Sequence(Z),Sequence(Z)))},unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
    s := sqrt(3): a := n -> ((2-s)^n-(s+2)^n)/(s*(s-2)*(s+2)):
    seq(simplify(a(n)), n=0..24); # Peter Luschny, Apr 28 2020
  • Mathematica
    p=1; c=2; a[0]=0; a[1]=c; a[n_]:=a[n]=p*c^2*a[n-1]-a[n-2]; Table[a[n], {n, 0, 20}]
    NestList[2 # + Sqrt[4 + 3 #^2]&, 0, 200] (* Zak Seidov, Mar 31 2011 *)
    LinearRecurrence[{4, -1}, {0, 2}, 25] (* T. D. Noe, Jan 09 2012 *)
    CoefficientList[Series[2x/(1-4x+x^2),{x,0,30}],x] (* Harvey P. Dale, May 31 2023 *)
  • PARI
    { polya002(p,c,m) = local(v,w,j,a); w=0; print1(w,", "); v=c; print1(v,", "); j=1; while(j<=m,a=p*c^2*v-w; print1(a,", "); w=v; v=a; j++) };
    polya002(1,2,25)
    
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(2*x/(1-4*x+x^2))) \\ G. C. Greubel, Feb 25 2019
    
  • PARI
    first(n) = n = max(n, 2); my(res = vector(n)); res[1] = 0; res[2] = 2; for(i = 3, n, res[i] = 4 * res[i-1] - res[i-2]); res \\ David A. Corneth, Apr 28 2020
    
  • Sage
    (2*x/(1-4*x+x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 25 2019

Formula

G.f.: 2*x/(1 - 4*x + x^2).
Invert transform of even numbers: a(n) = 2*Sum_{k=1..n} k*a(n-k). - Vladeta Jovovic, Apr 27 2001
From Gregory V. Richardson, Oct 06 2002: (Start)
a(n) = Sum_{alpha} -(1/3)*(-1 + 2*alpha)*alpha^(-1 - n), alpha = root of (1 - 4*Z + Z^2).
a(n) = (((2+sqrt(3))^(n+1) - (2-sqrt(3))^(n+1)) - ((2+sqrt(3))^n - (2-sqrt(3))^n) + ((2+sqrt(3))^(n-1) - (2-sqrt(3))^(n-1)))/(3*sqrt(3)). (End)
a(n) = A071954(n) - 2. - N. J. A. Sloane, Feb 20 2005
a(n) = (2*sinh(2n*arcsinh(1/sqrt(2))))/sqrt(3). - Herbert Kociemba, Apr 24 2008
a(n) = 2*A001353(n). - R. J. Mathar, Oct 26 2009
a(n) = ((3 - 2*sqrt(3))/3)*(2 - sqrt(3))^(n - 1) + ((3 + 2*sqrt(3))/3)*(2 + sqrt(3))^(n - 1). - Vincenzo Librandi, Nov 20 2010
a(n) = floor((2 + sqrt(3))^n/sqrt(3)). - Zak Seidov, Mar 31 2011
a(n) = ((2 + sqrt(3))^n - (2 - sqrt(3))^n)/sqrt(3). (See Horadam for construction.) - Johannes Boot, Jan 08 2012
a(n) = A217233(n) + A217233(n-1) with A217233(-1) = -1. - Bruno Berselli, Oct 01 2012
a(n) = A001835(n+1) - A001835(n). - Kevin Long, May 04 2018
E.g.f.: (exp((2 + sqrt(3))*x) - exp((2 - sqrt(3))*x))/sqrt(3). - Franck Maminirina Ramaharo, Nov 12 2018
a(n+1) = 2*a(n) + sqrt(3*a(n)^2 + 4), n > 1. - Gary Detlefs, Feb 27 2024

Extensions

More terms from James Sellers, Jun 06 2000
Edited by N. J. A. Sloane, Nov 11 2006
a(0) changed to 0 and entry revised accordingly by Max Alekseyev, Nov 15 2007
Signs in definition corrected by John W. Layman, Nov 20 2007

A045891 First differences of A045623.

Original entry on oeis.org

1, 1, 3, 7, 16, 36, 80, 176, 384, 832, 1792, 3840, 8192, 17408, 36864, 77824, 163840, 344064, 720896, 1507328, 3145728, 6553600, 13631488, 28311552, 58720256, 121634816, 251658240, 520093696, 1073741824, 2214592512, 4563402752
Offset: 0

Views

Author

Keywords

Comments

Let M_n be the n X n matrix m_(i,j) = 3 + abs(i-j), then det(M_n) =(-1)^(n+1)*a(n+1). - Benoit Cloitre, May 28 2002
If X_1, X_2, ..., X_n are 2-blocks of a (2n+3)-set X then, for n>=1, a(n+2) is the number of (n+1)-subsets of X intersecting each X_i, (i=1..n). - Milan Janjic, Nov 18 2007
Equals row sums of triangle A152194. - Gary W. Adamson, Nov 28 2008
An elephant sequence, see A175655. For the central square 16 A[5] vectors, with decimal values between 19 and 400, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A045623. - Johannes W. Meijer, Aug 15 2010
a(n) is the total number of runs of 1 in the compositions of n+1. For example, a(3) = A045623(3) - A045623(2) = 12 - 5 = 7 runs of only 1 in the compositions of 4, enumerated "()" as follows: 3,(1); (1),3; 2,(1,1);(1),2,(1); (1,1),2; (1,1,1,1). More generally, the total number of runs of only part k in the compositions of n+k is A045623(n) - A045623(n-k). - Gregory L. Simay, May 02 2017
This is essentially the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S - S^2 + S^3; see A291000. - Clark Kimberling, Aug 24 2017

Examples

			G.f. = 1 + x + 3*x^2 + 7*x^3 + 16*x^4 + 36*x^5 + 80*x^6 + ... - _Michael Somos_, Mar 26 2022
		

Crossrefs

Programs

Formula

a(n) = Sum_{k=0..n-2} (k+3)*binomial(n-2,k) for n >= 2. - N. J. A. Sloane, Jan 30 2008
a(n) = (n+4)*2^(n-3), n >= 2, with a(0) = a(1) = 1.
G.f.: (1-x)^3/(1-2*x)^2.
Equals binomial transform of A027656.
Starting 1, 3, 7, 16, ... this is ((n+5)*2^n - 0^n)/4, the binomial transform of (1, 2, 2, 3, 3, ...). - Paul Barry, May 20 2003
From Paul Barry, Nov 29 2004: (Start)
a(n) = ((n+4)*2^(n-1) + 3*C(0, n) - C(1, n))/4;
a(n) = Sum_{k=0..floor(n/2)} C(n, 2*k)*(k+1). (End)
a(n) = A045623(n-1) + 2^(n-2) = A034007(n+1) - 2^(n-2) for n>=2. - Philippe Deléham, Apr 20 2009
G.f.: 1 + Q(0)*x/(1-x)^2, where Q(k)= 1 + (k+1)*x/(1 - x - x*(1-x)/(x + (k+1)*(1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 25 2013
a(n) = Sum_{k=0..n} (k+1)*C(n-2,n-k). Peter Luschny, Apr 20 2015
From Amiram Eldar, Jan 13 2021: (Start)
Sum_{n>=0} 1/a(n) = 128*log(2) - 1292/15.
Sum_{n>=0} (-1)^n/a(n) = 782/15 - 128*log(3/2). (End)
E.g.f.: (2 - x + exp(2*x)*(2 + x))/4. - Stefano Spezia, Mar 26 2022

A291728 p-INVERT of (1,0,1,0,0,0,0,...), where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 2, 4, 9, 17, 35, 70, 142, 285, 576, 1160, 2340, 4716, 9510, 19171, 38653, 77926, 157110, 316747, 638599, 1287479, 2595698, 5233196, 10550681, 21271280, 42885152, 86460984, 174314476, 351436368, 708532813, 1428476905, 2879960190, 5806303628, 11706120825
Offset: 0

Views

Author

Clark Kimberling, Sep 08 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,0,1,0,0,0,0,...) = A154272, in some cases t(1,0,1,0,0,0,0,...) is a shifted (or differently indexed) version of the indicated sequence:
***
p(S) t(1,0,1,0,0,0,0,...)
1 - S A000930 (Narayana's cows sequence)
1 - S^2 A002478 (except for 0's)
1 - S^3 A291723
1 - S^5 A291724
(1 - S)^2 A291725
(1 - S)^3 A291726
(1 - S)^4 A291727
1 - S - S^2 A291728
1 - 2S - S^2 A291729
1 - 2S - 2S^2 A291730
(1 - 2S)^2 A291732
(1 - S)(1 - 2S) A291734
1 - S - S^3 A291735
1 - S^2 - S^3 A291736
1 - S - S^2 - S^3 A291737
1 - S - S^4 A291738
1 - S^3 - S^6 A291739
(1 - S)(1 - S^2) A291740
(1 - S)(1 + S^2) A291741

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + x^3; p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A154272 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291728 *)

Formula

G.f.: (-1 - x - x^2 - 2 x^3 - x^5)/(-1 + x + x^2 + x^3 + 2 x^4 + x^6).
a(n) = a(n-1) + a(n-2) + a(n-3) + 2*a(n-4) + a(n-6) for n >= 7.

A095263 a(n+3) = 3*a(n+2) - 2*a(n+1) + a(n).

Original entry on oeis.org

1, 3, 7, 16, 37, 86, 200, 465, 1081, 2513, 5842, 13581, 31572, 73396, 170625, 396655, 922111, 2143648, 4983377, 11584946, 26931732, 62608681, 145547525, 338356945, 786584466, 1828587033, 4250949112, 9882257736, 22973462017, 53406819691
Offset: 1

Views

Author

Gary W. Adamson, May 31 2004

Keywords

Comments

a(n+1) = number of n-tuples over {0,1,2} without consecutive digits. For the general case see A096261.
Diagonal sums of Riordan array (1/(1-x)^3, x/(1-x^3)), A127893. - Paul Barry, Jan 07 2008
The signed variant (-1)^(n+1)*a(n+1) is the bottom right entry of the n-th power of the matrix [[0,1,0],[0,0,1],[-1,-2,-3]]. - Roger L. Bagula, Jul 01 2007
a(n) is the number of generalized compositions of n+1 when there are i^2/2-i/2 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Dedrickson (Section 4.1) gives a bijection between colored compositions of n, where each part k has one of binomial(k,2) colors, and 0,1,2 strings of length n-2 without sequential digits (i.e., avoiding 01 and 12). Cf. A052529. - Peter Bala, Sep 17 2013
Except for the initial 0, this is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S^2 - S^3; see A291000. - Clark Kimberling, Aug 24 2017
For n>1, a(n-1) is the number of ways to split [n] into an unspecified number of intervals and then choose 2 blocks (i.e., subintervals) from each interval. For example, for n=6, a(5)=37 since the number of ways to split [6] into intervals and then select 2 blocks from each interval is C(6,2) + C(4,2)*C(2,2) + C(3,2)*C(3,2) + C(2,2)*C(4,2) + C(2,2)*C(2,2)*C(2,2). - Enrique Navarrete, May 20 2022

Examples

			a(9) = 1081 = 3*465 - 2*200 + 86.
M^9 * [1 0 0] = [a(7) a(8) a(9)] = [200 465 1081].
G.f. = x + 3*x^2 + 7*x^3 + 16*x^4 + 37*x^5 + 86*x^6 + 200*x^7 + ...
		

Crossrefs

Cf. A052921 (first differences), A137229 (partial sums).
Column k=3 of A277666.

Programs

  • Magma
    I:=[1,3,7]; [n le 3 select I[n] else 3*Self(n-1) -2*Self(n-2) +Self(n-3): n in [1..30]]; // G. C. Greubel, Apr 12 2021
    
  • Maple
    A:= gfun:-rectoproc({a(n+3)=3*a(n+2)-2*a(n+1)+a(n),a(1)=1,a(2)=3,a(3)=7},a(n),remember):
    seq(A(n),n=1..100); # Robert Israel, Sep 15 2014
  • Mathematica
    a[1]=1; a[2]=3; a[3]=7; a[n_]:= a[n]= 3a[n-1] -2a[n-2] +a[n-3]; Table[a[n], {n, 22}] (* Or *)
    a[n_]:= (MatrixPower[{{0,1,2,3}, {1,2,3,0}, {2,3,0,1}, {3,0,1,2}}, n].{{1}, {0}, {0}, {0}})[[2, 1]]; Table[ a[n], {n, 22}] (* Robert G. Wilson v, Jun 16 2004 *)
    RecurrenceTable[{a[1]==1,a[2]==3,a[3]==7,a[n+3]==3a[n+2]-2a[n+1]+a[n]},a,{n,30}] (* Harvey P. Dale, Sep 17 2022 *)
  • Sage
    [sum( binomial(n+k+1,3*k+2) for k in (0..(n-1)//2)) for n in (1..30)] # G. C. Greubel, Apr 12 2021

Formula

Let M = the 3 X 3 matrix [0 1 0 / 0 0 1 / 1 -2 3]; then M^n *[1 0 0] = [a(n-2) a(n-1) a(n)].
a(n)/a(n-1) tends to 2.3247179572..., an eigenvalue of M and a root of the characteristic polynomial. [Is that constant equal to 1 + A060006? - Michel Marcus, Oct 11 2014] [Yes, the limit is the root of the equation -1 + 2*x - 3*x^2 + x^3 = 0, after substitution x = y + 1 we have the equation for y: -1 - y + y^3 = 0, y = A060006. - Vaclav Kotesovec, Jan 27 2015]
Related to the Padovan sequence A000931 as follows : a(n)=A000931(3n+4). Also the binomial transform of A000931(n+4).
From Paul Barry, Jul 06 2004: (Start)
a(n) = Sum_{k=0..floor((n+1)/2)} binomial(n+k, n-2*k+1).
a(n) = Sum_{k=0..floor((n+1)/2)} binomial(n+k, 3*k-1). (End)
From Paul Barry, Jan 07 2008: (Start)
G.f.: x/(1 -3*x +2*x^2 -x^3).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+k+2,3*k+2).
a(n) = Sum_{k=0..n} binomial(n,k) * Sum_{j=0..floor((k+4)/2)} binomial(j,k-2j+4). (End)
If p[i]=i(i-1)/2 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>=2, a(n-1)=det A. - Milan Janjic, May 02 2010
a(n) = A000931(3*n + 4). - Michael Somos, Sep 18 2012

Extensions

Edited by Paul Barry, Jul 06 2004
Corrected and extended by Robert G. Wilson v, Jun 05 2004
Showing 1-10 of 56 results. Next