login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A001045 Jacobsthal sequence (or Jacobsthal numbers): a(n) = a(n-1) + 2*a(n-2), with a(0) = 0, a(1) = 1; also a(n) = nearest integer to 2^n/3.
(Formerly M2482 N0983)
700

%I M2482 N0983 #1186 Apr 11 2024 03:33:55

%S 0,1,1,3,5,11,21,43,85,171,341,683,1365,2731,5461,10923,21845,43691,

%T 87381,174763,349525,699051,1398101,2796203,5592405,11184811,22369621,

%U 44739243,89478485,178956971,357913941,715827883,1431655765,2863311531,5726623061,11453246123

%N Jacobsthal sequence (or Jacobsthal numbers): a(n) = a(n-1) + 2*a(n-2), with a(0) = 0, a(1) = 1; also a(n) = nearest integer to 2^n/3.

%C _Don Knuth_ points out (personal communication) that Jacobsthal may never have seen the actual values of this sequence. However, Horadam uses the name "Jacobsthal sequence", such an important sequence needs a name, and there is a law that says the name for something should never be that of its discoverer. - _N. J. A. Sloane_, Dec 26 2020

%C Number of ways to tile a 3 X (n-1) rectangle with 1 X 1 and 2 X 2 square tiles.

%C Also, number of ways to tile a 2 X (n-1) rectangle with 1 X 2 dominoes and 2 X 2 squares. - _Toby Gottfried_, Nov 02 2008

%C Also a(n) counts each of the following four things: n-ary quasigroups of order 3 with automorphism group of order 3, n-ary quasigroups of order 3 with automorphism group of order 6, (n-1)-ary quasigroups of order 3 with automorphism group of order 2 and (n-2)-ary quasigroups of order 3. See the McKay-Wanless (2008) paper. - _Ian Wanless_, Apr 28 2008

%C Also the number of ways to tie a necktie using n + 2 turns. So three turns make an "oriental", four make a "four in hand" and for 5 turns there are 3 methods: "Kelvin", "Nicky" and "Pratt". The formula also arises from a special random walk on a triangular grid with side conditions (see Fink and Mao, 1999). - arne.ring(AT)epost.de, Mar 18 2001

%C Also the number of compositions of n + 1 ending with an odd part (a(2) = 3 because 3, 21, 111 are the only compositions of 3 ending with an odd part). Also the number of compositions of n + 2 ending with an even part (a(2) = 3 because 4, 22, 112 are the only compositions of 4 ending with an even part). - _Emeric Deutsch_, May 08 2001

%C Arises in study of sorting by merge insertions and in analysis of a method for computing GCDs - see Knuth reference.

%C Number of perfect matchings of a 2 X n grid upon replacing unit squares with tetrahedra (C_4 to K_4):

%C o----o----o----o...

%C | \/ | \/ | \/ |

%C | /\ | /\ | /\ |

%C o----o----o----o... - _Roberto E. Martinez II_, Jan 07 2002

%C Also the numerators of the reduced fractions in the alternating sum 1/2 - 1/4 + 1/8 - 1/16 + 1/32 - 1/64 + ... - _Joshua Zucker_, Feb 07 2002

%C Also, if A(n), B(n), C(n) are the angles of the n-orthic triangle of ABC then A(1) = Pi - 2*A, A(n) = s(n)*Pi + (-2)^n*A where s(n) = (-1)^(n-1) * a(n) [1-orthic triangle = the orthic triangle of ABC, n-orthic triangle = the orthic triangle of the (n-1)-orthic triangle]. - Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), Jun 05 2002

%C Also the number of words of length n+1 in the two letters s and t that reduce to the identity 1 by using the relations sss = 1, tt = 1 and stst = 1. The generators s and t and the three stated relations generate the group S3. - _John W. Layman_, Jun 14 2002

%C Sums of pairs of consecutive terms give all powers of 2 in increasing order. - _Amarnath Murthy_, Aug 15 2002

%C Excess clockwise moves (over counterclockwise) needed to move a tower of size n to the clockwise peg is -(-1)^n*(2^n - (-1)^n)/3; a(n) is its unsigned version. - _Wouter Meeussen_, Sep 01 2002

%C Also the absolute value of the number represented in base -2 by the string of n 1's, the negabinary repunit. The Mersenne numbers (A000225 and its subsequences) are the binary repunits. - _Rick L. Shepherd_, Sep 16 2002

%C Note that 3*a(n) + (-1)^n = 2^n is significant for Pascal's triangle A007318. It arises from a Jacobsthal decomposition of Pascal's triangle illustrated by 1 + 7 + 21 + 35 + 35 + 21 + 7 + 1 = (7 + 35 + 1) + (1 + 35 + 7) + (21 + 21) = 43 + 43 + 42 = 3a(7) - 1; 1 + 8 + 28 + 56 + 70 + 56 + 28 + 8 + 1 = (1 + 56 + 28) + (28 + 56 + 1) + (8 + 70 + 8) = 85 + 85 + 86 = 3a(8)+1. - _Paul Barry_, Feb 20 2003

%C Number of positive integers requiring exactly n signed bits in the nonadjacent form representation.

%C Equivalently, number of length-(n-1) words with letters {0, 1, 2} where no two consecutive letters are nonzero, see example and fxtbook link. - _Joerg Arndt_, Nov 10 2012

%C Counts walks between adjacent vertices of a triangle. - _Paul Barry_, Nov 17 2003

%C Every amphichiral rational knot written in Conway notation is a palindromic sequence of numbers, not beginning or ending with 1. For example, for 4 <= n <= 12, the amphichiral rational knots are: 2 2, 2 1 1 2, 4 4, 3 1 1 3, 2 2 2 2, 4 1 1 4, 3 1 1 1 1 3, 2 3 3 2, 2 1 2 2 1 2, 2 1 1 1 1 1 1 2, 6 6, 5 1 1 5, 4 2 2 4, 3 3 3 3, 2 4 4 2, 3 2 1 1 2 3, 3 1 2 2 1 3, 2 2 2 2 2 2, 2 2 1 1 1 1 2 2, 2 1 2 1 1 2 1 2, 2 1 1 1 1 1 1 1 1 2. For the number of amphichiral rational knots for n=2*k (k=1, 2, 3, ...), we obtain the sequence 0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, ... - Slavik Jablan, Dec 26 2003

%C a(n+2) counts the binary sequences of total length n made up of codewords from C = {0, 10, 11}. - _Paul Barry_, Jan 23 2004

%C Number of permutations with no fixed points avoiding 231 and 132.

%C The n-th entry (n > 1) of the sequence is equal to the 2,2-entry of the n-th power of the unnormalized 4 X 4 Haar matrix: [1 1 1 0 / 1 1 -1 0 / 1 1 0 1 / 1 1 0 -1]. - _Simone Severini_, Oct 27 2004

%C a(n) is the number of Motzkin (n+1)-sequences whose flatsteps all occur at level 1 and whose height is less than or equal to 2. For example, a(4) = 5 counts UDUFD, UFDUD, UFFFD, UFUDD, UUDFD. - _David Callan_, Dec 09 2004

%C a(n+1) gives row sums of A059260. - _Paul Barry_, Jan 26 2005

%C If (m + n) is odd, then 3*(a(m) + a(n)) is always of the form a^2 + 2*b^2, where a and b both equal powers of 2; consequently every factor of (a(m) + a(n)) is always of the form a^2 + 2*b^2. - _Matthew Vandermast_, Jul 12 2003

%C Number of "0,0" in f_{n+1}, where f_0 = "1" and f_{n+1} = a sequence formed by changing all "1"s in f_n to "1,0" and all "0"s in f_n to "0,1". - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006

%C All prime Jacobsthal numbers A049883[n] = {3, 5, 11, 43, 683, 2731, 43691, ...} have prime indices except for a(4) = 5. All prime Jacobsthal numbers with prime indices (all but a(4) = 5) are of the form (2^p + 1)/3 - the Wagstaff primes A000979[n]. Indices of prime Jacobsthal numbers are listed in A107036[n] = {3, 4, 5, 7, 11, 13, 17, 19, 23, 31, 43, 61, ...}. For n>1 A107036[n] = A000978[n] Numbers n such that (2^n + 1)/3 is prime. - _Alexander Adamchuk_, Oct 03 2006

%C Correspondence: a(n) = b(n)*2^(n-1), where b(n) is the sequence of the arithmetic means of previous two terms defined by b(n) = 1/2*(b(n-1) + b(n-2)) with initial values b(0) = 0, b(1) = 1; the g.f. for b(n) is B(x) := x/(1-(x^1+x^2)/2), so the g.f. A(x) for a(n) satisfies A(x) = B(2*x)/2. Because b(n) converges to the limit lim (1-x)*B(x) = 1/3*(b(0) + 2*b(1)) = 2/3 (for x --> 1), it follows that a(n)/2^(n-1) also converges to 2/3 (see also A103770). - _Hieronymus Fischer_, Feb 04 2006

%C Inverse: floor(log_2(a(n))) = n - 2 for n >= 2. Also: log_2(a(n) + a(n-1)) = n - 1 for n >= 1 (see also A130249). Characterization: x is a Jacobsthal number if and only if there is a power of 4 (= c) such that x is a root of p(x) = 9*x*(x-c) + (c-1)*(2*c+1) (see also the indicator sequence A105348). - _Hieronymus Fischer_, May 17 2007

%C This sequence counts the odd coefficients in the expansion of (1 + x + x^2)^(2^n - 1), n >= 0. - Tewodros Amdeberhan (tewodros(AT)math.mit.edu), Oct 18 2007, Jan 08 2008

%C 2^(n+1) = 2*A005578(n) + 2*a(n) + 2*A000975(n-1). Let A005578(n), a(n), A000975(n-1) = triangle (a, b, c). Then ((S-c), (S-b), (S-a)) = (A005578(n-1), a(n-1), A000975(n-2)). Example: (a, b, c) = (11, 11, 10) = (A005578(5), a(5), A000975(4)). Then ((S-c), (S-b), (S-a)) = (6, 5, 5) = (A005578(4), a(4), A000975(3)). - _Gary W. Adamson_, Dec 24 2007

%C Sequence is identical to the absolute values of its inverse binomial transform. A similar result holds for [0,A001045*2^n]. - _Paul Curtz_, Jan 17 2008

%C From a(2) on (i.e., 1, 3, 5, 11, 21, ...) also: least odd number such that the subsets of {a(2), ..., a(n)} sum to 2^(n-1) different values, cf. A138000 and A064934. It is interesting to note the pattern of numbers occurring (or not occurring) as such a sum (A003158). - _M. F. Hasler_, Apr 09 2008

%C a(n) is the term (5, 1) of n-th power of the 5 X 5 matrix shown in A121231. - _Gary W. Adamson_, Oct 03 2008

%C A147612(a(n)) = 1. - _Reinhard Zumkeller_, Nov 08 2008

%C a(n+1) = Sum(A153778(i): 2^n <= i < 2^(n+1)). - _Reinhard Zumkeller_, Jan 01 2009

%C It appears that a(n) is also the number of integers between 2^n and 2^(n+1) that are divisible by 3 with no remainder. - John Fossaceca (john(AT)fossaceca.net), Jan 31 2009

%C Number of pairs of consecutive odious (or evil) numbers between 2^(n+1) and 2^(n+2), inclusive. - _T. D. Noe_, Feb 05 2009

%C Equals eigensequence of triangle A156319. - _Gary W. Adamson_, Feb 07 2009

%C A three-dimensional interpretation of a(n+1) is that it gives the number of ways of filling a 2 X 2 X n hole with 1 X 2 X 2 bricks. - _Martin Griffiths_, Mar 28 2009

%C Starting with offset 1 = INVERTi transform of A002605: (1, 2, 6, 16, 44, ...). - _Gary W. Adamson_, May 12 2009

%C Convolved with (1, 2, 2, 2, ...) = A000225: (1, 3, 7, 15, 31, ...). - _Gary W. Adamson_, May 23 2009

%C The product of a pair of successive terms is always a triangular number. - _Giuseppe Ottonello_, Jun 14 2009

%C Let A be the Hessenberg matrix of order n, defined by: A[1, j] = 1, A[i, i] := -2, A[i, i - 1] = -1, and A[i, j] = 0 otherwise. Then, for n >= 1, a(n) = (-1)^(n-1)*det(A). - _Milan Janjic_, Jan 26 2010

%C Let R denote the irreducible representation of the symmetric group S_3 of dimension 2, and let s and t denote respectively the sign and trivial irreducible representations of dimension 1. The decomposition of R^n into irreducible representations consists of a(n) copies of R and a(n-1) copies of each of s and t. - _Andrew Rupinski_, Mar 12 2010

%C As a fraction: 1/88 = 0.0113636363... or 1/9898 = 0.00010103051121... - _Mark Dols_, May 18 2010

%C Starting with "1" = the INVERT transform of (1, 0, 2, 0, 4, 0, 8, ...); e.g., a(7) = 43 = (1, 1, 1, 3, 5, 11, 21) dot (8, 0, 4, 0, 2, 0, 1) = (8 + 4 + 10 + 21) = 43. - _Gary W. Adamson_, Oct 28 2010

%C Rule 28 elementary cellular automaton (A266508) generates this sequence. - _Paul Muljadi_, Jan 27 2011

%C This is a divisibility sequence. - _Michael Somos_, Feb 06 2011

%C From _L. Edson Jeffery_, Apr 04 2011: (Start)

%C Let U be the unit-primitive matrix (see [Jeffery])

%C U = U_(6,2) =

%C (0 0 1)

%C (0 2 0)

%C (2 0 1).

%C Then a(n+1) = (Trace(U^n))/3, a(n+1) = ((U^n)_{3, 3})/3, a(n) = ((U^n)_{1, 3})/3 and a(n) = ((U^(n+1))_{1, 1})/2. (End)

%C The sequence emerges in using iterated deletion of strictly dominated strategies to establish the best-response solution to the Cournot duopoly problem as a strictly dominant strategy. The best response of firm 1 to firm 2's chosen quantity is given by q*_1 = 1/2*(a - c - q_2), where a is reservation price, c is marginal cost, and q_2 is firm two's chosen quantity. Given that q_2 is in [o, a - c], q*_1 must be in [o, 1/2*(a - c)]. Since costs are symmetric, we know q_2 is in [0, 1/2*(a - c)]. Then we know q*_1 is in [1/4*(a - c), 1/2*(a - c)]. Continuing in this way, the sequence of bounds we get (factoring out a - c) is {1/2, 1/4, 3/8, 5/16, ...}; the numerators are the Jacobsthal numbers. - _Michael Chirico_, Sep 10 2011

%C The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 2, 3*a(n-1) equals the number of 3-colored compositions of n with all parts greater than or equal to 2, such that no adjacent parts have the same color. - _Milan Janjic_, Nov 26 2011

%C This sequence is connected with the Collatz problem. We consider the array T(i, j) where the i-th row gives the parity trajectory of i, for example for i = 6, the infinite trajectory is 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 -> 4 -> 2 -> 1 -> 4 -> 2 -> 1... and T(6, j) = [0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, ..., 1, 0, 0, 1, ...]. Now, we consider the sum of the digits "1" of each column. We obtain the sequence a(n) = Sum_{k = 1..2^n} T(k, n) = Sum _{k = 1..2^n} digits "1" of the n-th column. Because a(n) + a(n+1) = 2^n, then a(n+1) = Number of digits "0" among the 2^n elements of the n-th column. - _Michel Lagneau_, Jan 11 2012

%C 3!*a(n-1) is apparently the trace of the n-th power of the adjacency matrix of the complete 3-graph, a 3 X 3 matrix with diagonal elements all zero and off-diagonal all ones. The off-diagonal elements for the n-th power are all equal to a(n) while each diagonal element seems to be a(n) + 1 for an even power and a(n) - 1 for an odd. These are related to the lengths of closed paths on the graph (see Delfino and Viti's paper). - _Tom Copeland_, Nov 06 2012

%C From _Paul Curtz_, Dec 11 2012: (Start)

%C 2^n * a(-n) = (-1)^(n-1) * a(n), which extends the sequence to negative indices: ..., -5/16, 3/8, -1/4, 1/2, 0, 1, 1, 3, 5, ...

%C The "autosequence" property with respect to the binomial transform mentioned in my comment of Jan 17 2008 is still valid if the term a(-1) is added to the array of the sequence and its iterated higher-order differences in subsequent rows:

%C 0 1/2 1/2 3/2 5/2 11/2 ...

%C 1/2 0 1 1 3 5 ...

%C -1/2 1 0 2 2 6 ...

%C 3/2 -1 2 0 4 4 ...

%C -5/2 3 -2 4 0 8 ...

%C 11/2 -5 6 -4 8 0 ...

%C The main diagonal in this array contains 0's. (End)

%C Assign to a triangle T(n, 0) = 1 and T(n+1, 1) = n; T(r, c) = T(r-1, c-1) + T(r-1, c-2) + T(r-2, c-2). Then T(n+1, n) - T(n, n) = a(n). - _J. M. Bergot_, May 02 2013

%C a(n+1) counts clockwise walks on n points on a circle that take steps of length 1 and 2, return to the starting point after two full circuits, and do not duplicate any steps (USAMO 2013, problem 5). - _Kiran S. Kedlaya_, May 11 2013

%C Define an infinite square array m by m(n, 0) = m(0, n) = a(n) in top row and left column and m(i, j) = m(i, j-1) + m(i-1, j-1) otherwise, then m(n+1, n+1) = 3^(n-1). - _J. M. Bergot_, May 10 2013

%C a(n) is the number of compositions (ordered partitions) of n - 1 into one sort of 1's and two sorts of 2's. Example: the a(4) = 5 compositions of 3 are 1 + 1 + 1, 1 + 2, 1 + 2', 2 + 1 and 2' + 1. - _Bob Selcoe_, Jun 24 2013

%C Without 0, a(n)/2^n equals the probability that n will occur as a partial sum in a randomly-generated infinite sequence of 1's and 2's. The limiting ratio is 2/3. - _Bob Selcoe_, Jul 04 2013

%C Number of conjugacy classes of Z/2Z X Z/2Z in GL(2,2^(n+1)). - _Jared Warner_, Aug 18 2013

%C a(n) is the top left entry of the (n-1)-st power of the 3 X 3 matrix [1, 1, 1, 1, 0, 0, 1, 0, 0]. a(n) is the top left entry of the (n+1)-st power of any of the six 3 X 3 matrices [0, 1, 0; 1, 1, 1; 0, 1, 0], [0, 1, 1; 0, 1, 1; 1, 1, 0], [0, 0, 1; 1, 1, 1; 1, 1, 0], [0, 1, 1; 1, 0, 1; 0, 1, 1], [0, 0, 1; 0, 0, 1; 1, 1, 1] or [0, 1, 0; 1, 0, 1; 1, 1, 1]. - _R. J. Mathar_, Feb 03 2014

%C This is the only integer sequence from the family of homogeneous linear recurrence of order 2 given by a(n) = k*a(n-1) + t*a(n-2) with positive integer coefficients k and t and initial values a(0) = 0 and a(1) = 1 whose ratio a(n+1)/a(n) converges to 2 as n approaches infinity. - _Felix P. Muga II_, Mar 14 2014

%C This is the Lucas sequence U(1, -2). - _Felix P. Muga II_, Mar 21 2014

%C sqrt(a(n+1) * a(n-1)) -> a(n) + 3/4 if n is even, and -> a(n) - 3/4 if n is odd, for n >= 2. - _Richard R. Forberg_, Jun 24 2014

%C a(n+1) counts closed walks on the end vertices of P_3 containing one loop at the middle vertex. a(n-1) counts closed walks on the middle vertex of P_3 containing one loop at that vertex. - _David Neil McGrath_, Nov 07 2014

%C From _César Eliud Lozada_, Jan 21 2015: (Start)

%C Let P be a point in the plane of a triangle ABC (with sides a, b, c) and barycentric coordinates P = [x:y:z]. The Complement of P with respect to ABC is defined to be Complement(P) = [b*y + c*z : c*z + a*x : a*x + b*y].

%C Then, for n >= 1, Complement(Complement(...(Complement(P))..)) = (n times) =

%C [2*a(n-1)*a*x + (2*a(n-1) - (-1)^n)*(b*y + c*z):

%C 2*a(n-1)*b*y + (2*a(n-1) - (-1)^n)*(c*z + a*x):

%C 2*a(n-1)*c*z + (2*a(n-1) - (-1)^n)*(a*x + b*y)]. (End)

%C a(n) (n >= 2) is the number of induced hypercubes of the Fibonacci cube Gamma(n-2). See p. 513 of the Klavzar reference. Example: a(5) = 11. Indeed, the Fibonacci cube Gamma(3) is <>- (cycle C(4) with a pendant edge) and the hypercubes are: 5 vertices, 5 edges, and 1 square. - _Emeric Deutsch_, Apr 07 2016

%C If the sequence of points {P_i(x_i, y_i)} on the cubic y = a*x^3 + b*x^2 + c*x + d has the property that the segment P_i(x_i, y_i) P_i+1(x_i+1, y_i+1) is always tangent to the cubic at P_i+1(x_i+1, y_i+1) then a(n) = -2^n*a/b*(x_(n+1)-(-1/2)^n*x_1). - _Michael Brozinsky_, Aug 01 2016

%C With the quantum integers defined by [n+1]_q = (q^(n+1) - q^(-n-1)) / (q - q^(-1)), the Jacobsthal numbers are a(n+1) = (-1)^n*q^n [n+1]_q with q = i * sqrt(2) for i^2 = -1, whereas the signed Mersenne numbers A000225 are given by q = sqrt(2). Cf. A239473. - _Tom Copeland_, Sep 05 2016

%C Every positive integer has a unique expression as a sum of Jacobsthal numbers in which the index of the smallest summand is odd, with a(1) and a(2) both allowed. See the L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr. reference. - _Ira M. Gessel_, Dec 31 2016. See A280049 for these expansions. - _N. J. A. Sloane_, Dec 31 2016

%C For n > 0, a(n) equals the number of ternary words of length n-1 in which 0 and 1 avoid runs of odd lengths. - _Milan Janjic_, Jan 08 2017

%C For n > 0, a(n) equals the number of orbits of the finite group PSL(2,2^n) acting on subsets of size 4 for the 2^n+1 points of the projective line. - _Paul M. Bradley_, Jan 31 2017

%C For n > 1, number of words of length n-2 over alphabet {1,2,3} such that no odd letter is followed by an odd letter. - _Armend Shabani_, Feb 17 2017

%C Also, the decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 678", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. See A283641. - _Robert Price_, Mar 12 2017

%C Also the number of independent vertex sets and vertex covers in the 2 X (n-2) king graph. - _Eric W. Weisstein_, Sep 21 2017

%C From _César Eliud Lozada_, Dec 14 2017: (Start)

%C Let T(0) be a triangle and let T(1) be the medial triangle of T(0), T(2) the medial triangle of T(1) and, in general, T(n) the medial triangle of T(n-1). The barycentric coordinates of the first vertex of T(n) are [2*a(n-1)/a(n), 1, 1], for n > 0.

%C Let S(0) be a triangle and let S(1) be the antimedial triangle of S(0), S(2) the antimedial triangle of S(1) and, in general, S(n) the antimedial triangle of S(n-1). The barycentric coordinates of the first vertex of S(n) are [-a(n+1)/a(n), 1, 1], for n > 0. (End)

%C a(n) is also the number of derangements in S_{n+1} with empty peak set. - _Isabella Huang_, Apr 01 2018

%C For n > 0, gcd(a(n), a(n+1)) = 1. - _Kengbo Lu_, Jul 27 2020

%C Number of 2-compositions of n+1 with 1 not allowed as a part; see Hopkins & Ouvry reference. - _Brian Hopkins_, Aug 17 2020

%C The number of Hamiltonian paths of the flower snark graph of even order 2n > 2 is 12*a(n-1). - _Don Knuth_, Dec 25 2020

%C When set S = {1, 2, ..., 2^n}, n>=0, then the largest subset T of S with the property that if x is in T, then 2*x is not in T, has a(n+1) elements. For example, for n = 4, #S = 16, a(5) = 11 with T = {1, 3, 4, 5, 7, 9, 11, 12, 13, 15, 16} (see Hassan Tarfaoui link, Concours Général 1991). - _Bernard Schott_, Feb 14 2022

%C a(n) is the number of words of length n over a binary alphabet whose position in the lexicographic order is one more than a multiple of three. a(3) = 3: aaa, abb, bba. - _Alois P. Heinz_, Apr 13 2022

%C Named by Horadam (1988) after the German mathematician Ernst Jacobsthal (1882-1965). - _Amiram Eldar_, Oct 02 2023

%C Define the sequence u(n) = (u(n-1) + u(n-2))/u(n-3) with u(0) = 0, u(1) = 1, u(2) = u(3) = -1. Then u(4*n) = -1 + (-1)^n/a(n+1), u(4*n+1) = 2 - (-1)^n/a(n+1), u(4*n+2) = u(4*n+3) = -1. For example, a(3) = 3 and u(8) = -2/3, u(9) = 5/3, u(10) = u(11) = -1. - _Michael Somos_, Oct 24 2023

%D Jathan Austin and Lisa Schneider, Generalized Fibonacci sequences in Pythagorean triple preserving sequences, Fib. Q., 58:1 (2020), 340-350.

%D Thomas Fink and Yong Mao, The 85 ways to tie a tie, Fourth Estate, London, 1999; Die 85 Methoden eine Krawatte zu binden. Hoffmann und Kampe, Hamburg, 1999.

%D International Mathematical Olympiad 2001, Hong Kong Preliminary Selection Contest Problem #16.

%D Jablan S. and Sazdanovic R., LinKnot: Knot Theory by Computer, World Scientific Press, 2007. See p. 80.

%D Ernst Erich Jacobsthal, Fibonaccische Polynome und Kreisteilungsgleichungen, Sitzungsber. Berliner Math. Gesell. 17 (1919-1920), 43-57.

%D Tanya Khovanova, "Coins and Logic", Chapter 6, The Mathematics of Various Entertaining Subjects: Volume 3 (2019), Jennifer Beineke & Jason Rosenhouse, eds. Princeton University Press, Princeton and Oxford, p. 73. ISBN: 0691182582, 978-0691182582.

%D Donald E. Knuth, Art of Computer Programming, Vol. 3, Sect. 5.3.1, Eq. 13.

%D Thomas Koshy, Fibonacci and Lucas numbers with applications, Wiley, 2001, p. 98.

%D Steven Roman, Introduction to Coding and Information Theory, Springer Verlag, 1996, 41-42.

%D P. D. Seymour and D. J. A. Welsh, Combinatorial applications of an inequality form statistical mechanics, Math. Proc. Camb. Phil. Soc. 77 (1975), 485-495. [Although Daykin et al. (1979) claim that the present sequence is studied in this article, it does not seem to be explicitly mentioned. Note that definition of log-convex in (3.1) is wrong. - _N. J. A. Sloane_, Dec 26 2020]

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

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

%D Robert M. Young, Excursions in Calculus, MAA, 1992, p. 239

%H Indranil Ghosh, <a href="/A001045/b001045.txt">Table of n, a(n) for n = 0..3316</a> (terms 0..500 from T. D. Noe)

%H M. H. Albert, M. D. Atkinson, and V. Vatter, <a href="https://arxiv.org/abs/1209.0425">Inflations of geometric grid classes: three case studies</a>.

%H Jean-Paul Allouche, Jeffrey Shallit, Zhixiong Wen, Wen Wu, and Jiemeng Zhang, <a href="https://arxiv.org/abs/1911.01687">Sum-free sets generated by the period-k-folding sequences and some Sturmian sequences</a>, arXiv:1911.01687 [math.CO], 2019.

%H Joerg Arndt, <a href="http://www.jjj.de/fxt/#fxtbook">Matters Computational (The Fxtbook)</a>, pp.315-318.

%H Mohammad K. Azarian, <a href="http://www.fq.math.ca/Scanned/28-2/elementary28-2.pdf">Limit of Nested Square Roots, Problem B-664</a>, Fibonacci Quarterly, Vol. 28, No. 2, May 1990, p. 182.

%H Mohammad K. Azarian, <a href="http://www.fq.math.ca/Scanned/29-2/elementary29-2.pdf">Solution to Problem B-664, Limit of Nested Square Roots</a>, Fibonacci Quarterly, Vol. 29, No. 2, May 1991, p. 182.

%H Roland Bacher, <a href="https://arxiv.org/abs/1509.09054">Chebyshev polynomials, quadratic surds and a variation of Pascal's triangle</a>, arXiv:1509.09054 [math.CO], 2015.

%H Paul Barry, <a href="https://arxiv.org/abs/1205.2565">On sequences with {-1, 0, 1} Hankel transforms</a>, arXiv preprint arXiv:1205.2565 [math.CO], 2012. - From _N. J. A. Sloane_, Oct 18 2012

%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Barry/barry84.html">A Catalan Transform and Related Transformations on Integer Sequences</a>, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.

%H Paul Barry, <a href="https://www.cs.uwaterloo.ca/journals/JIS/VOL9/Barry/barry91.html">On Integer-Sequence-Based Constructions of Generalized Pascal Triangles</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.4.

%H Paul Barry, <a href="https://doi.org/10.1016/j.laa.2015.10.032">Riordan arrays, generalized Narayana triangles, and series reversion</a>, Linear Algebra and its Applications, 491 (2016) 343-385.

%H Paul Barry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Barry/barry321.html">Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices</a>, Journal of Integer Sequences, 19 (2016), Article 16.3.5.

%H Katerina Böhmová, Cristina Dalfó, and Clemens Huemer, <a href="https://arxiv.org/abs/1512.05917">On cyclic Kautz digraphs</a>, arXiv:1512.05917 [math.CO], 2015; <a href="http://upcommons.upc.edu/bitstream/handle/2117/80848/Kautz-subdigraphs.pdf">alternative link</a>.

%H Wieb Bosma, <a href="https://doi.org/10.5802/jtnb.301">Signed bits and fast exponentiation</a>, J. Th. Nombres de Bordeaux, 13 no. 1 (2001), p. 27-41.

%H Garry Bowlin and Matthew G. Brin, <a href="https://arxiv.org/abs/1301.3984">Coloring Planar Graphs via Colored Paths in the Associahedra</a>, arXiv preprint arXiv:1301.3984 [math.CO], 2013. - From _N. J. A. Sloane_, Feb 12 2013

%H Rachael Boyd and Richard Hepworth, <a href="https://arxiv.org/abs/2006.04261">Combinatorics of injective words for Temperley-Lieb algebras</a>, arXiv:2006.04261 [math.AT], 2020.

%H Paul Bradley and Peter Rowley, <a href="http://eprints.ma.man.ac.uk/2167/01/covered/MIMS_ep2014_42.pdf">Orbits on k-subsets of 2-transitive Simple Lie-type Groups</a>, 2014.

%H Henri Brocard, <a href="https://archive.org/details/nouvellecorresp00mansgoog/page/145/mode/1up?view=theater">Propriété d'une série de triangles</a>, Nouvelle Correspondance Mathématique, Vol. 6 (1880), 145-151.

%H H. Bruhn, L. Gellert, and J. Günther, <a href="https://arxiv.org/abs/1503.03390">Jacobsthal numbers in generalised Petersen graphs</a>, arXiv preprint arXiv:1503.03390 [math.CO], 2015.

%H H. Bruhn, L. Gellert, and J. Günther, <a href="http://eurocomb2015.b.uib.no/files/2015/08/endm1943.pdf">Jacobsthal numbers in generalised Petersen graphs</a>, Electronic Notes in Discrete Math., 2015.

%H Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Falcao/falcao5.html">Intrinsic Properties of a Non-Symmetric Number Triangle</a>, J. Int. Seq., Vol. 26 (2023), Article 23.4.8.

%H L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr., <a href="http://www.fq.math.ca/Scanned/10-5/carlitz3-a.pdf">Representations for a special sequence</a>, Fibonacci Quarterly 10.5 (1972), pages 499-518 and 550.

%H Paula Catarino, Helena Campos, and Paulo Vasco. <a href="http://ami.ektf.hu/uploads/papers/finalpdf/AMI_46_from37to53.pdf">On the Mersenne sequence</a>. Annales Mathematicae et Informaticae, 46 (2016) pp. 37-53.

%H Miquel Cerda, <a href="/A001045/a001045.jpg">Irregular triangle whose row sums are the Jacobsthal numbers</a>.

%H Ji Young Choi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Choi/choi6.html">Ternary Modified Collatz Sequences And Jacobsthal Numbers</a>, Journal of Integer Sequences, Vol. 19 (2016), #16.7.5.

%H Ji Young Choi, <a href="https://www.emis.de/journals/JIS/VOL21/Choi/choi10.html">A Generalization of Collatz Functions and Jacobsthal Numbers</a>, J. Int. Seq., Vol. 21 (2018), Article 18.5.4.

%H Johann Cigler, <a href="https://arxiv.org/abs/1501.04750">Some remarks and conjectures related to lattice paths in strips along the x-axis</a>, arXiv:1501.04750 [math.CO], 2015.

%H M. H. Cilasun, <a href="https://arxiv.org/abs/1412.3265">An Analytical Approach to Exponent-Restricted Multiple Counting Sequences</a>, arXiv preprint arXiv:1412.3265 [math.NT], 2014.

%H M. H. Cilasun, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Cilasun/cila5.html">Generalized Multiple Counting Jacobsthal Sequences of Fermat Pseudoprimes</a>, Journal of Integer Sequences, Vol. 19, 2016, #16.2.3.

%H Charles K. Cook and Michael R. Bacon, <a href="http://ami.ektf.hu/uploads/papers/finalpdf/AMI_41_from27to39.pdf">Some identities for Jacobsthal and Jacobsthal-Lucas numbers satisfying higher order recurrence relations</a>, Annales Mathematicae et Informaticae, 41 (2013) pp. 27-39.

%H D. E. Daykin, D. J. Kleitman, and D. B. West, <a href="https://doi.org/10.1016/0097-3165(79)90063-3">The number of meets between two subsets of a lattice</a>, J. Combin. Theory, A 26 (1979), 135-156.

%H Gesualdo Delfino and Jacopo Viti, <a href="https://arxiv.org/abs/1104.4323">Potts q-color field theory and scaling random cluster model</a>, arXiv:1104.4323 [hep-th], 2011.

%H Karl Dilcher and Larry Ericksen, <a href="https://doi.org/10.1007/s11139-016-9864-3">Continued fractions and Stern polynomials</a>. Ramanujan Journal (2017). See Table 2.

%H Karl Dilcher and Hayley Tomkins, <a href="http://math.colgate.edu/~integers/s29/s29.mail.html">Square classes and divisibility properties of Stern polynomials</a>, Integers (2018) 18, Article #A29.

%H Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, <a href="https://arxiv.org/abs/1503.04249">Odd-Rule Cellular Automata on the Square Grid</a>, arXiv:1503.04249 [math.CO], 2015.

%H Peter E. Finch, <a href="https://arxiv.org/abs/1201.4470">From spin to anyon notation: The XXZ Heisenberg model as a D_3 (or su(2)_4) anyon chain</a>, arXiv preprint arXiv:1201.4470 [math-ph], 2012.

%H M. Cetin Firengiz and A. Dil, <a href="http://www.nntdm.net/papers/nntdm-20/NNTDM-20-4-21-32.pdf">Generalized Euler-Seidel method for second order recurrence relations</a>, Notes on Number Theory and Discrete Mathematics, Vol. 20, 2014, No. 4, 21-32.

%H Darrin D. Frey and James A. Sellers, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL3/SELLERS/sellers.html">Jacobsthal Numbers and Alternating Sign Matrices</a>, J. Integer Seqs., Vol. 3 (2000), Article 00.2.3.

%H Robert Frontczak and Taras Goy, <a href="https://doi.org/10.15330/cmp.12.1.34-45">Mersenne-Horadam identities using generating functions</a>, Carpathian Math. Publ. (2020) Vol. 12, No. 1, 34-45.

%H E. M. García-Caballero, S. G. Moreno, and M. P. Prophet, <a href="https://www.fq.math.ca/Papers1/52-1/CaballeroMorenoProphet.pdf">New Viète-like infinite products of nested radicals</a>, Fib. Q., 52 (No. 1, 2014), 27-31.

%H Dale Gerdemann, <a href="https://www.youtube.com/watch?v=9fAHnqeAFlQ">Triangles from (1,2) Recursion</a> and <a href="https://www.youtube.com/watch?v=yCz78MnALxM">Recursive Triangle Fragmentation from (1,2) Recursion </a>, YouTube Videos, December 2014.

%H A. Goldberg and N. A. Rosenberg, <a href="https://doi.org/10.1534/genetics.115.178509">Beyond 2/3 and 1/3: the complex signatures of sex-biased admixture on the X chromosome</a>, Genetics 201 (2015), 263-279.

%H J. Goldwasser et al., <a href="https://doi.org/10.1016/S0012-365X(98)00373-2">The density of ones in Pascal's rhombus</a>, Discrete Math., 204 (1999), 231-236.

%H Taras Goy, <a href="https://doi.org/10.32523/2077-9879-2018-9-4-61-67">On determinants and permanents of some Toeplitz-Hessenberg matrices whose entries are Jacobsthal numbers</a>, Eurasian Math. J. (2018) Vol. 9, No. 4, 61-67.

%H Taras P. Goy, <a href="http://lib.pu.if.ua:8080/bitstream/123456789/2610/1/MSTU8-pages.pdf">Jacobsthal number identities using the generalized Brioschi formula</a>, Vasyl Stefanyk Precarpathian National University, (Ivano-Frankivsk, Ukraine, 2020).

%H Jonny Griffiths, <a href="https://doi.org/10.1017/mag.2015.51">The Not-on-the-line transformation</a>, The Mathematical Gazette, 99, pp 347-352 (2015).

%H Martin Griffiths and Alex Bramham, <a href="https://www.fq.math.ca/Papers1/53-2/GriffithsBramham11172014.pdf">The Jacobsthal Numbers: Two Results and Two Questions</a>, Fibonacci Quart. 53 (2015), no. 2, 147-151.

%H Richard K. Guy, <a href="/A002186/a002186.pdf">Letters to N. J. A. Sloane, June-August 1968</a>.

%H Richard K. Guy, Tanya Khovanova, and Julian Salazar, <a href="https://arxiv.org/abs/1207.5099">Conway's subprime Fibonacci sequences</a>, arXiv:1207.5099 [math.NT], 2012-2014.

%H Lee Hae-hwang, <a href="/A026644/a026644.html">Illustration of initial terms in terms of rosemary plants</a>.

%H Silvia Heubach, <a href="http://www.calstatela.edu/sites/default/files/users/u1231/Papers/cgtc30.pdf">Tiling an m-by-n area with squares of size up to k-by-k (m<=5)</a>, preprint, published in: Congressus Numerantium 140 (1999), 43-64.

%H A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, <a href="https://doi.org/10.1007/978-3-0348-0237-6">The Tower of Hanoi - Myths and Maths</a>, Birkhäuser 2013. See page 56. <a href="http://tohbook.info">Book's website</a>.

%H Andreas M. Hinz and Paul K. Stockmeyer, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL25/Hinz/hinz5.html">Precious Metal Sequences and Sierpinski-Type Graphs</a>, J. Integer Seq., Vol 25 (2022), Article 22.4.8.

%H Brian Hopkins and Stéphane Ouvry, <a href="https://arxiv.org/abs/2008.04937">Combinatorics of Multicompositions</a>, arXiv:2008.04937 [math.CO], 2020.

%H Brian Hopkins, Andrew V. Sills, and Thotsaporn “AEK” Thanatipanonda, and Hua Wang, <a href="http://thotsaporn.com/composition.pdf">Parts and subword patterns in compositions</a>, Preprint 2015.

%H A. F. Horadam, <a href="http://www.fq.math.ca/Scanned/26-1/horadam2.pdf">Jacobsthal and Pell Curves</a>, Fib. Quart. 26, 79-83, 1988. [See J_n.]

%H A. F. Horadam, <a href="http://www.fq.math.ca/Scanned/34-1/horadam2.pdf">Jacobsthal Representation Numbers</a>, Fib Quart. 34, 40-54, 1996.

%H Jia Huang and Erkko Lehtonen, <a href="https://arxiv.org/abs/2401.15786">Associative-commutative spectra for some varieties of groupoids</a>, arXiv:2401.15786 [math.CO], 2024. See p. 17.

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=142">Encyclopedia of Combinatorial Structures 142</a>.

%H Dan Ismailescu, Joehyun Kim, Kelvin Kim, and Jeewoo Lee, <a href="https://arxiv.org/abs/1908.02749">The largest angle bisection procedure</a>, arXiv:1908.02749 [math.MG], 2019. See p. 17.

%H Milan Janjić, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Janjic/janjic63.html">On Linear Recurrence Equations Arising from Compositions of Positive Integers</a>, J. Int. Seq. 18 (2015), Article 15.4.7.

%H Milan Janjić, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Janjic/janjic93.html">Words and Linear Recurrences</a>, J. Int. Seq. 21 (2018), Article 18.1.4.

%H L. Edson Jeffery, <a href="/wiki/User:L._Edson_Jeffery/Unit-Primitive_Matrices">Unit-primitive matrices</a>.

%H D. Jhala, G. P. S. Rathore, and K. Sisodiya, <a href="https://doi.org/10.12691/tjant-2-4-3">Some Properties of k-Jacobsthal Numbers with Arithmetic Indexes</a>, Turkish Journal of Analysis and Number Theory, 2014, Vol. 2, No. 4, 119-124.

%H Tanya Khovanova, <a href="https://arxiv.org/abs/1801.01143">Coins and Logic</a>, arXiv:1801.01143 [math.HO], 2018.

%H Tanya Khovanova and Konstantin Knop, <a href="https://arxiv.org/abs/1611.09201">Coins that Change Their Weights</a>, arXiv:1611.09201 [math.CO], 2016.

%H Sandi Klavžar, <a href="https://doi.org/10.1007/s10878-011-9433-z">Structure of Fibonacci cubes: a survey</a>, J. Comb. Optim., 25, 2013, 505-522.

%H Masato Kobayashi, <a href="https://arxiv.org/abs/1907.11802">Weighted counting of Bruhat paths by shifted R-polynomials</a>, arXiv:1907.11802 [math.CO], 2019.

%H Takao Komatsu, <a href="https://arxiv.org/abs/1903.09986">Continued fractions associated with the topological index of the caterpillar-bond graph</a>, arXiv:1903.09986 [math.CO], 2019.

%H Thomas Koshy and Ralph P. Grimaldi, <a href="https://www.fq.math.ca/Papers1/55-2/KoshyGrimaldi10272016.pdf">Ternary words and Jacobsthal numbers</a>, Fib. Quart., 55 (No. 2, 2017), 129-136.

%H Peter J. Larcombe, Julius Fergy T. Rabago, and Eric J. Fennessey, <a href="http://pjm.ppu.edu/sites/default/files/papers/PJM_April2018_397to405.pdf">On two derivative sequences from scaled geometric mean sequence terms</a>, Palestine Journal of Mathematics (2018) Vol. 7(2), 397-405.

%H Kyu-Hwan Lee and Se-jin Oh, <a href="https://arxiv.org/abs/1601.06685">Catalan triangle numbers and binomial coefficients</a>, arXiv:1601.06685 [math.CO], 2016.

%H E. Lemmen, J. van Duivenbode, J. L. Duarte, and E. A. Lomonova, <a href="https://doi.org/10.1109/JESTPE.2015.2427913">Flexible Multilevel Converters using 4-Switch Extended Commutation Cells</a>, Emerging and Selected Topics in Power Electronics, IEEE Journal of, Volume:PP, Issue: 99, 2015.

%H S. L. Levine, <a href="http://www.fq.math.ca/Scanned/26-4/levine.pdf">Suppose more rabbits are born</a>, Fib. Quart., 26 (1988), 306-311.

%H Alan J. Macfarlane, <a href="http://www.damtp.cam.ac.uk/user/ajm/Papers2016/CellularAutomatonRule150.ps">On generating functions of some sequences of integers defined in the evolution of the cellular automaton Rule 150</a>, Preprint 2016.

%H T. Mansour and A. Robertson, <a href="https://arxiv.org/abs/math/0204005">Refined restricted permutations avoiding subsets of patterns of length three</a>, arXiv:math/0204005 [math.CO], 2002.

%H B. D. McKay and I. M. Wanless, <a href="https://doi.org/10.1137/070693874">A census of small latin hypercubes</a>, SIAM J. Discrete Math. 22, (2008) 719-736.

%H A. Moghaddamfar and H. Tajbakhsh, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Moghaddamfar/moghadam3.html">More Determinant Representations for Sequences</a>, Journal of Integer Sequences, 17 (2014), #14.5.6.

%H Sophie Morier-Genoud, <a href="https://arxiv.org/abs/1907.12790">Counting Coxeter's friezes over a finite field via moduli spaces</a>, arXiv:1907.12790 [math.CO], 2019.

%H F. P. Muga II, <a href="https://www.researchgate.net/publication/267327689">Extending the Golden Ratio and the Binet-de Moivre Formula</a>, March 2014; Preprint on ResearchGate.

%H Emanuele Munarini, <a href="https://doi.org/10.1515/puma-2015-0028">A generalization of André-Jeannin's symmetric identity</a>, Pure Mathematics and Applications (2018) Vol. 27, No. 1, 98-118.

%H G. Myerson and A. J. van der Poorten, <a href="https://www.jstor.org/stable/2974639">Some problems concerning recurrence sequences</a>, Amer. Math. Monthly 102 (1995), no. 8, 698-705.

%H S. Northshield, <a href="https://doi.org/10.4169/000298910X496714">Stern's diatomic sequence 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, ...</a>, Amer. Math. Monthly, 117 (2010), 581-598.

%H Kritkhajohn Onphaeng and Prapanpong Pongsriiam, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Pongsriiam/pong11.html">Jacobsthal and Jacobsthal-Lucas Numbers and Sums Introduced by Jacobsthal and Tverberg</a>, Journal of Integer Sequences, Vol. 20 (2017), Article 17.3.6.

%H Ahmet Öteleş, Zekeriya Y. Karatas, and Diyar O. Mustafa Zangana, <a href="https://www.emis.de/journals/JIS/VOL21/Oteles/ote5.html">Jacobsthal Numbers and Associated Hessenberg Matrices</a>, J. Int. Seq., Vol. 21 (2018), Article 18.2.5.

%H D. Panario, M. Sahin, and Q. Wang, <a href="http://www.emis.de/journals/INTEGERS/papers/n78/n78.Abstract.html">A family of Fibonacci-like conditional sequences</a>, INTEGERS, Vol. 13, 2013, #A78.

%H D. Panario, M. Sahin, Q. Wang, and W. Webb, <a href="https://doi.org/10.1016/j.amc.2014.05.108">General conditional recurrences</a>, Applied Mathematics and Computation, Volume 243, Sep 15 2014, Pages 220-231.

%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.

%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992

%H M. Rahmani, <a href="https://doi.org/10.1016/j.laa.2012.07.050">The Akiyama-Tanigawa matrix and related combinatorial identities</a>, Linear Algebra and its Applications 438 (2013) 219-230. - From _N. J. A. Sloane_, Dec 26 2012

%H N. A. Rosenberg, <a href="https://doi.org/10.1534/genetics.115.181057">Admixture models and the breeding systems of H. S. Jennings: a GENETICS connection</a>, Genetics 202 (2016), 9-13.

%H E. Schlemm, <a href="http://arxiv.org/abs/1303.4979">On the expected number of successes in a sequence of nested Bernoulli trials</a>, arXiv preprint arXiv:1303.4979 [math.PR], 2013.

%H A. G. Shannon and J. V. Leyendekkers, <a href="http://nntdm.net/papers/nntdm-21/NNTDM-21-2-35-42.pdf">The Golden Ratio family and the Binet equation</a>, Notes on Number Theory and Discrete Mathematics, Vol. 21, 2015, No. 2, 35-42.

%H N. J. A. Sloane, <a href="https://arxiv.org/abs/1503.01168">On the Number of ON Cells in Cellular Automata</a>, arXiv:1503.01168 [math.CO], 2015.

%H Yüksel Soykan, <a href="https://doi.org/10.9734/AIR/2019/v20i230154">On Summing Formulas For Generalized Fibonacci and Gaussian Generalized Fibonacci Numbers</a>, Advances in Research (2019) Vol. 20, No. 2, 1-15, Article AIR.51824.

%H Yüksel Soykan, <a href="https://doi.org/10.9734/jamcs/2020/v35i130241">Generalized Fibonacci Numbers: Sum Formulas</a>, Journal of Advances in Mathematics and Computer Science (2020) Vol. 35, No. 1, 89-104.

%H Yüksel Soykan, <a href="https://doi.org/10.9734/AJARR/2020/v9i130212">Closed Formulas for the Sums of Squares of Generalized Fibonacci Numbers</a>, Asian Journal of Advanced Research and Reports (2020) Vol. 9, No. 1, 23-39, Article no. AJARR.55441.

%H Yüksel Soykan, <a href="https://doi.org/10.34198/ejms.4220.297331">A Study on Generalized Fibonacci Numbers: Sum Formulas Sum_{k=0..n} k * x^k * W_k^3 and Sum_{k=1..n} k * x^k W_-k^3 for the Cubes of Terms</a>, Earthline Journal of Mathematical Sciences (2020) Vol. 4, No. 2, 297-331.

%H Yüksel Soykan, Erkan Taşdemir, and İnci Okumuş, <a href="https://doi.org/10.13140/RG.2.2.13499.36641">On Dual Hyperbolic Numbers With Generalized Jacobsthal Numbers Components</a>, Zonguldak Bülent Ecevit University, (Zonguldak, Turkey, 2019).

%H Paul K. Stockmeyer, <a href="https://arxiv.org/abs/1504.04404">The Pascal Rhombus and the Stealth Configuration</a>, arXiv:1504.04404 [math.CO], 2015.

%H X. Sun and V. H. Moll, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/Moll/moll.html">The p-adic Valuations of Sequences Counting Alternating Sign Matrices</a>, JIS 12 (2009) 09.3.8.

%H Hassan Tarfaoui, <a href="http://d.tarfaoui.free.fr/cg/1991/EX4/exobis.pdf">Concours Général 1991 - Exercice 4</a> (in French).

%H Two-Year College Math. Jnl., <a href="http://www.jstor.org/stable/2687194">Review of "Jacobsthal Representation Numbers"</a>, 28 (1997), p. 76.

%H USA Mathematical Olympiad 2013, <a href="http://web.archive.org/web/20130606075948/http://amc.maa.org/usamo/2013/2013USAMO_Day1_Day2_Final_S.pdf">Problem 2</a> (proposed by Sam Vandervelde).

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/JacobsthalNumber.html">Jacobsthal Number</a>, <a href="http://mathworld.wolfram.com/Negabinary.html">Negabinary</a>, <a href="http://mathworld.wolfram.com/Repunit.html">Repunit</a>, <a href="http://mathworld.wolfram.com/Rule28.html">Rule 28</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/IndependentVertexSet.html">Independent Vertex Set</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KingGraph.html">King Graph</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/VertexCover.html">Vertex Cover</a>.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Elementary_cellular_automaton">Elementary cellular automaton</a>

%H OEIS Wiki, <a href="https://oeis.org/wiki/Autosequence">Autosequence</a>.

%H Abdelmoumène Zekiri, Farid Bencherif, and Rachid Boumahdi, <a href="https://www.emis.de/journals/JIS/VOL21/Zekiri/zekiri4.html">Generalization of an Identity of Apostol</a>, J. Int. Seq., Vol. 21 (2018), Article 18.5.1.

%H G. B. M. Zerr, <a href="http://www.jstor.org/stable/2970981">Problem 64</a>, American Mathematical Monthly, vol. 3, no. 12, 1896 (p. 311).

%H <a href="/index/Cor#core">Index entries for "core" sequences</a>.

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,2).

%H <a href="/index/Ch#Cheby">Index entries for sequences related to Chebyshev polynomials</a>.

%H <a href="/index/Di#divseq">Index to divisibility sequences</a>.

%H <a href="/index/O#Olympiads">Index to sequences related to Olympiads and other Mathematical competitions</a>.

%F a(n) = 2^(n-1) - a(n-1). a(n) = 2*a(n-1) - (-1)^n = (2^n - (-1)^n)/3.

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

%F E.g.f.: (exp(2*x) - exp(-x))/3.

%F a(2*n) = 2*a(2*n-1)-1 for n >= 1, a(2*n+1) = 2*a(2*n)+1 for n >= 0. - _Lee Hae-hwang_, Oct 11 2002; corrected by Mario Catalani (mario.catalani(AT)unito.it), Dec 04 2002

%F Also a(n) is the coefficient of x^(n-1) in the bivariate Fibonacci polynomials F(n)(x, y) = x*F(n-1)(x, y) + y*F(n-2)(x, y), with y=2*x^2. - Mario Catalani (mario.catalani(AT)unito.it), Dec 04 2002

%F a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*3^(k-1). - _Paul Barry_, Apr 02 2003

%F The ratios a(n)/2^(n-1) converge to 2/3 and every fraction after 1/2 is the arithmetic mean of the two preceding fractions. - _Gary W. Adamson_, Jul 05 2003

%F a(n) = U(n-1, i/(2*sqrt(2)))*(-i*sqrt(2))^(n-1) with i^2=-1. - _Paul Barry_, Nov 17 2003

%F a(n+1) = Sum_{k=0..ceiling(n/2)} 2^k*binomial(n-k, k). - _Benoit Cloitre_, Mar 06 2004

%F a(2*n) = A002450(n) = (4^n - 1)/3; a(2*n+1) = A007583(n) = (2^(2*n+1) + 1)/3. - _Philippe Deléham_, Mar 27 2004

%F a(n) = round(2^n/3) = (2^n + (-1)^(n-1))/3 so lim_{n->infinity} 2^n/a(n) = 3. - _Gerald McGarvey_, Jul 21 2004

%F a(n) = Sum_{k=0..n-1} (-1)^k*2^(n-k-1) = Sum_{k=0..n-1}, 2^k*(-1)^(n-k-1). - _Paul Barry_, Jul 30 2004

%F a(n+1) = Sum_{k=0..n} binomial(k, n-k)*2^(n-k). - _Paul Barry_, Oct 07 2004

%F a(n) = Sum_{k=0..n-1} W(n-k, k)*(-1)^(n-k)*binomial(2*k,k), W(n, k) as in A004070. - _Paul Barry_, Dec 17 2004

%F From _Paul Barry_, Jan 17 2005: (Start)

%F a(n) = Sum_{k=0..n} k*binomial(n-1, (n-k)/2)*(1+(-1)^(n+k))*floor((2*k+1)/3).

%F a(n+1) = Sum_{k=0..n} k*binomial(n-1, (n-k)/2)*(1+(-1)^(n+k))*(A042965(k)+0^k). (End)

%F From _Paul Barry_, Jan 17 2005: (Start)

%F a(n+1) = ceiling(2^n/3) + floor(2^n/3) = (ceiling(2^n/3))^2 - (floor(2^n/3))^2.

%F a(n+1) = A005578(n) + A000975(n-1) = A005578(n)^2 - A000975(n-1)^2. (End)

%F a(n+1) = Sum_{k=0..n} Sum_{j=0..n} (-1)^(n-j)*binomial(j, k). - _Paul Barry_, Jan 26 2005

%F Let M = [1, 1, 0; 1, 0, 1; 0, 1, 1], then a(n) = (M^n)[2, 1], also matrix characteristic polynomial x^3 - 2*x^2 - x + 2 defines the three-step recursion a(0)=0, a(1)=1, a(2)=1, a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 2. - Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 28 2005

%F a(n) = ceiling(2^(n+1)/3) - ceiling(2^n/3) = A005578(n+1) - A005578(n). - _Paul Barry_, Oct 08 2005

%F a(n) = floor(2^(n+1)/3) - floor(2^n/3) = A000975(n) - A000975(n-1). - _Paul Barry_, Oct 08 2005

%F From _Paul Barry_, Feb 20 2003: (Start)

%F a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n-1)+3*k);

%F a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n-2)+3*k), where f(n)=A080425(n). (End)

%F From _Miklos Kristof_, Mar 07 2007: (Start)

%F a(2*n) = (1/3)*Product_{d|n} cyclotomic(d,4).

%F a(2*n+1) = (1/3)*Product_{d|2*n+1} cyclotomic(2*d,2). (End)

%F From _Hieronymus Fischer_, Apr 23 2007: (Start)

%F The a(n) are closely related to nested square roots; this is 2*sin(2^(-n)*Pi/2*a(n)) = sqrt(2-sqrt(2-sqrt(2-sqrt(...sqrt(2)))...) {with the '2' n times, n >= 0}.

%F Also 2*cos(2^(-n)*Pi*a(n)) = sqrt(2-sqrt(2-sqrt(2-sqrt(...sqrt(2)))...) {with the '2' n-1 times, n >= 1} as well as

%F 2*sin(2^(-n)*3/2*Pi*a(n)) = sqrt(2+sqrt(2+sqrt(2+sqrt(...sqrt(2)))...) {with the '2' n times, n >= 0} and

%F 2*cos(2^(-n)*3*Pi*a(n)) = -sqrt(2+sqrt(2+sqrt(2+sqrt(...sqrt(2)))...) {with the '2' n-1 times, n >= 1}.

%F a(n) = 2^(n+1)/Pi*arcsin(b(n+1)/2) where b(n) is defined recursively by b(0)=2, b(n)=sqrt(2-b(n-1)).

%F There is a similar formula regarding the arccos function, this is a(n) = 2^n/Pi*arccos(b(n)/2).

%F With respect to the sequence c(n) defined recursively by c(0)=-2, c(n)=sqrt(2+c(n-1)), the following formulas hold true: a(n) = 2^n/3*(1-(-1)^n*(1-2/Pi*arcsin(c(n+1)/2))); a(n) = 2^n/3*(1-(-1)^n*(1-1/Pi*arccos(-c(n)/2))).

%F (End)

%F Sum_{k=0..n} A039599(n,k)*a(k) = A049027(n), for n >= 1. - _Philippe Deléham_, Jun 10 2007

%F Sum_{k=0..n} A039599(n,k)*a(k+1) = A067336(n). - _Philippe Deléham_, Jun 10 2007

%F Let T = the 3 X 3 matrix [1,1,0; 1,0,1; 0,1,1]. Then T^n * [1,0,0,] = [A005578(n), a(n), A000975(n-1)]. - _Gary W. Adamson_, Dec 24 2007

%F a(n) + a(n+5) = 11*2^n. - _Paul Curtz_, Jan 17 2008

%F a(n) = Sum_{k=1..n} K(2, k)*a(n - k), where K(n,k) = k if 0 <= k <= n and K(n,k)=0 otherwise. (When using such a K-coefficient, several different arguments to K or several different definitions of K may lead to the same integer sequence. For example, the Fibonacci sequence can be generated in several ways using the K-coefficient.) - _Thomas Wieder_, Jan 13 2008

%F a(n) + a(n+2*k+1) = a(2*k+1)*2^n. - _Paul Curtz_, Feb 12 2008

%F a(n) = lower left term in the 2 X 2 matrix [0,2; 1,1]^n. - _Gary W. Adamson_, Mar 02 2008

%F a(n+1) = Sum_{k=0..n} A109466(n,k)*(-2)^(n-k). -_Philippe Deléham_, Oct 26 2008

%F a(n) = sqrt(8*a(n-1)*a(n-2) + 1). E.g., sqrt(3*5*8+1) = 11, sqrt(5*11*8+1) = 21. - Giuseppe Ottonello, Jun 14 2009

%F Let p[i] = Fibonacci(i-1) and let A be 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

%F a(p-1) = p*A007663(n)/3 if n > 1, and a(p-1) = p*A096060(n) if n > 2, with p=prime(n). - _Jonathan Sondow_, Jul 19 2010

%F Algebraically equivalent to replacing the 5's with 9's in the explicit (Binet) formula for the n-th term in the Fibonacci sequence: The formula for the n-th term in the Fibonacci sequence is F(n) = ((1+sqrt(5))^n - (1-sqrt(5))^n)/(2^n*sqrt(5)). Replacing the 5's with 9's gives ((1+sqrt(9))^n - (1-sqrt(9))^n)/(2^n*sqrt(9)) = (2^n+(-1)^(n+1))/3 = (2^n-(-1)^(n))/3 = a(n). - _Jeffrey R. Goodwin_, May 27 2011

%F For n > 1, a(n) = A000975(n-1) + (1 + (-1)^(n-1))/2. - _Vladimir Shevelev_, Feb 27 2012

%F From _Sergei N. Gladkovskii_, Jun 12 2012: (Start)

%F G.f.: x/(1-x-2*x^2) = G(0)/3; G(k) = 1 - ((-1)^k)/(2^k - 2*x*4^k/(2*x*2^k - ((-1)^k)/G(k+1))); (continued fraction 3 kind, 3-step).

%F E.g.f.: G(0)/3; G(k) = 1 - ((-1)^k)/(2^k - 2*x*4^k/(2*x*2^k - ((-1)^k)*(k+1)/G(k+1))); (continued fraction 3rd kind, 3-step). (End)

%F a(n) = 2^k * a(n-k) + (-1)^(n+k)*a(k). - _Paul Curtz_, _Jean-François Alcover_, Dec 11 2012

%F a(n) = sqrt((A014551(n))^2 + (-1)^(n-1)*2^(n+2))/3. - _Vladimir Shevelev_, Mar 13 2013

%F G.f.: Q(0)/3, where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k - 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k + 1/Q(k+1)))))); (continued fraction). - _Sergei N. Gladkovskii_, May 21 2013

%F G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(2*k+1 + 2*x)/( x*(2*k+2 + 2*x) + 1/Q(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Aug 29 2013

%F G.f.: Q(0) -1, where Q(k) = 1 + 2*x^2 + (k+2)*x - x*(k+1 + 2*x)/Q(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Oct 06 2013

%F a(n+2) = Sum_{k=0..n} A108561(n,k)*(-2)^k. - _Philippe Deléham_, Nov 17 2013

%F a(n) = (Sum_{k=1..n, k odd} C(n,k)*3^(k-1))/2^(n-1). - _Vladimir Shevelev_, Feb 05 2014

%F a(-n) = -(-1)^n * a(n) / 2^n for all n in Z. - _Michael Somos_, Mar 18 2014

%F a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-3)^k = (2^n - (-1)^n)/3 = (-1)^(n-1)*Sum_{k=0..n-1} (-2)^k. Equals (-1)^(n-1)*Phi(n,-2), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - _Tom Copeland_, Apr 14 2014

%F From _Peter Bala_, Apr 06 2015: (Start)

%F a(2*n)/a(n) = A014551(n) for n >= 1; a(3*n)/a(n) = 3*A245489(n) for n >= 1.

%F exp( Sum_{n >= 1} a(2*n)/a(n)*x^n/n ) = Sum_{n >= 0} a(n+1)*x^n.

%F exp( Sum_{n >= 1} a(3*n)/a(n)*x^n/n ) = Sum_{n >= 0} A084175(n+1)*x^n.

%F exp( Sum_{n >= 1} a(4*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015266(n+3)*(-x)^n.

%F exp( Sum_{n >= 1} a(5*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015287(n+4)*x^n.

%F exp( Sum_{n >= 1} a(6*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015305(n+5)*(-x)^n.

%F exp( Sum_{n >= 1} a(7*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015323(n+6)*x^n.

%F exp( Sum_{n >= 1} a(8*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015338(n+7)*(-x)^n.

%F exp( Sum_{n >= 1} a(9*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015356(n+8)*x^n.

%F exp( Sum_{n >= 1} a(10*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015371(n+9)*(-x)^n. (End)

%F a(n) = (1-(-1)^n)/2 + floor((2^n)/3). - _Reiner Moewald_, Jun 05 2015

%F a(n+k)^2 - A014551(k)*a(n)*a(n+k) + (-2)^k*a(n)^2 = (-2)^n*a(k)^2, for n >= 0 and k >= 0. - _Alexander Samokrutov_, Jul 21 2015

%F Dirichlet g.f.: (PolyLog(s,2) + (1 - 2^(1-s))*zeta(s))/3. - _Ilya Gutkovskiy_, Jun 27 2016

%F From _Yuchun Ji_, Apr 08 2018: (Start)

%F a(m)*a(n) + a(m-1)*a(n-1) - 2*a(m-2)*a(n-2) = 2^(m+n-3).

%F a(m+n-1) = a(m)*a(n) + 2*a(m-1)*a(n-1); a(m+n) = a(m+1)*a(n+1) - 4*a(m-1)*a(n-1).

%F a(2*n-1) = a(n)^2 + 2*a(n-1)^2; a(2*n) = a(n+1)^2 - 4*a(n-1)^2. (End)

%F a(n+4) = a(n) + 5*2^n, a(0) = 0, a(1..4) = [1,1,3,5]. That is to say, for n > 0, the ones digits of Jacobsthal numbers follow the pattern 1,1,3,5,1,1,3,5,1,1,3,5,.... - _Yuchun Ji_, Apr 25 2019

%F a(n) mod 10 = A091084(n). - _Alois P. Heinz_, Apr 25 2019

%F The sequence starting with "1" is the second INVERT transform of (1, -1, 3, -5, 11, -21, 43, ...). - _Gary W. Adamson_, Jul 08 2019

%F From _Kai Wang_, Jan 14 2020: (Start)

%F a(n)^2 - a(n+1)*a(n-1) = (-2)^(n-1).

%F a(n)^2 - a(n+r)*a(n-r) = (-2)^(n-r)*a(r)^2.

%F a(m)*a(n+1) - a(m+1)*a(n) = (-2)^n*a(m-n).

%F a(m-n) = (-1)^n*(a(m)*A014551(n) - A014551(m)*a(n))/(2^(n+1)).

%F a(m+n) = (a(m)*A014551(n) + A014551(m)*a(n))/2.

%F A014551(n)^2 - A014551(n+r)*A014551(n-r) = 9*(-1)^(n-r-1)*2^(n-r)*a(r)^2 .

%F A014551(m)*A014551(n+1) - A014551(m+1)*A014551(n) = 9*(-1)^(n-1)*2^(n)*a(m-n).

%F A014551(m-n) = (-1)^(n)*(A014551(m)*A014551(n) - 9*a(m)*a(n))/2^(n+1).

%F A014551(m+n) = (A014551(m)*A014551(n) + 9*a(m)*a(n))/2.

%F a(n) = Sum_{i=0..n-1; j=0..n-1; i+2*j=n-1} 2^j*((i+j)!/(i!*j!)). (End)

%F For n > 0, 1/(2*a(n+1)) = Sum_{m>=n} a(m)/(a(m+1)*a(m+2)). - _Kai Wang_, Mar 03 2020

%F For 4 > h >= 0, k >= 0, a(4*k+h) mod 5 = a(h) mod 5. - _Kai Wang_, May 07 2020

%F From _Kengbo Lu_, Jul 27 2020: (Start)

%F a(n) = 1 + Sum_{k=0..n-1} a(k) if n odd; a(n) = Sum_{k=0..n-1} a(k) if n even.

%F a(n) = F(n) + Sum_{k=0..n-2} a(k)*F(n-k-1), where F denotes the Fibonacci numbers.

%F a(n) = b(n) + Sum_{k=0..n-1} a(k)*b(n-k), where b(n) is defined through b(0) = 0, b(1) = 1, b(n) = 2*b(n-2).

%F a(n) = 1 + 2*Sum_{k=0..n-2} a(k).

%F a(m+n) = a(m)*a(n+1) + 2*a(m-1)*a(n).

%F a(2*n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)*2^(i+j). (End)

%e a(2) = 3 because the tiling of the 3 X 2 rectangle has either only 1 X 1 tiles, or one 2 X 2 tile in one of two positions (together with two 1 X 1 tiles).

%e From _Joerg Arndt_, Nov 10 2012: (Start)

%e The a(6)=21 length-5 ternary words with no two consecutive letters nonzero are (dots for 0's)

%e [ 1] [ . . . . ]

%e [ 2] [ . . . 1 ]

%e [ 3] [ . . . 2 ]

%e [ 4] [ . . 1 . ]

%e [ 5] [ . . 2 . ]

%e [ 6] [ . 1 . . ]

%e [ 7] [ . 1 . 1 ]

%e [ 8] [ . 1 . 2 ]

%e [ 9] [ . 2 . . ]

%e [10] [ . 2 . 1 ]

%e [11] [ . 2 . 2 ]

%e [12] [ 1 . . . ]

%e [13] [ 1 . . 1 ]

%e [14] [ 1 . . 2 ]

%e [15] [ 1 . 1 . ]

%e [16] [ 1 . 2 . ]

%e [17] [ 2 . . . ]

%e [18] [ 2 . . 1 ]

%e [19] [ 2 . . 2 ]

%e [20] [ 2 . 1 . ]

%e [21] [ 2 . 2 . ]

%e (End)

%e G.f. = x + x^2 + 3*x^3 + 5*x^4 + 11*x^5 + 21*x^6 + 43*x^7 + 85*x^8 + 171*x^9 + ...

%p A001045:=-1/(z+1)/(2*z-1); # _Simon Plouffe_ in his 1992 dissertation

%p A001045 := proc(n)

%p (2^n-(-1)^n)/3 ;

%p end proc: # _R. J. Mathar_, Dec 18 2012

%t Jacob0[n_] := (2^n - (-1)^n)/3; Table[Jacob0[n], {n, 0, 33}] (* _Robert G. Wilson v_, Dec 05 2005 *)

%t Array[(2^# - (-1)^#)/3 &, 33, 0] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)

%t LinearRecurrence[{1, 2}, {0, 1}, 40] (* _Harvey P. Dale_, Nov 30 2011 *)

%t CoefficientList[Series[x/(1 - x - 2 x^2), {x, 0, 34}], x] (* _Robert G. Wilson v_, Jul 21 2015 *)

%t Table[(2^n - (-1)^n)/3, {n, 0, 20}] (* _Eric W. Weisstein_, Sep 21 2017 *)

%t Table[Abs[QBinomial[n, 1, -2]], {n, 0, 35}] (* _John Keith_, Jan 29 2022 *)

%o (PARI) a(n) = (2^n - (-1)^n) / 3

%o (PARI) M=[1,1,0;1,0,1;0,1,1];for(i=0,34,print1((M^i)[2,1],",")) \\ Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 28 2005

%o (Sage) [lucas_number1(n, 1, -2) for n in range(34)] # _Zerinvary Lajos_, Apr 22 2009

%o # Alternatively:

%o a = BinaryRecurrenceSequence(1,2)

%o [a(n) for n in (0..34)] # _Peter Luschny_, Aug 29 2016

%o (Haskell)

%o a001045 = (`div` 3) . (+ 1) . a000079

%o a001045_list = 0 : 1 :

%o zipWith (+) (map (2 *) a001045_list) (tail a001045_list)

%o -- _Reinhard Zumkeller_, Mar 24 2013, Jan 05 2012, Feb 05 2011

%o (Maxima)

%o a[0]:0$

%o a[n]:=2^(n-1)-a[n-1]$

%o A001045(n):=a[n]$

%o makelist(A001045(n),n,0,30); /* _Martin Ettl_, Nov 05 2012 */

%o (PARI) a=0; for(n=0,34,print1(a,", "); a=2*(a-n%2)+1) \\ _K. Spage_, Aug 22 2014

%o (Python) # A001045.py

%o def A001045():

%o a, b = 0, 1

%o while True:

%o yield a

%o a, b = b, b+2*a

%o sequence = A001045()

%o [next(sequence) for i in range(20)] # _David Radcliffe_, Jun 26 2016

%o (Magma) [n le 2 select n-1 else Self(n-1)+2*Self(n-2): n in [1..40]]; // _Vincenzo Librandi_, Jun 27 2016

%o (Python) [(2**n-(-1)**n)//3 for n in range(40)] # _Gennady Eremin_, Mar 03 2022

%Y Partial sums of this sequence give A000975, where there are additional comments from B. E. Williams and _Bill Blewett_ on the tie problem.

%Y A002487(a(n)) = A000045(n).

%Y Row sums of A059260, A156667 and A134317. Equals A026644(n-2)+1 for n > 1.

%Y a(n) = A073370(n-1, 0), n >= 1 (first column of triangle).

%Y Cf. A266508 (binary), A081857 (base 4), A147612 (characteristic function).

%Y Cf. A000978, A000979, A019322, A066845, A105348, A130249, A130250, A130253, A005578, A002083, A113405, A138000, A064934, A003158, A175286 (Pisano periods), A147613, A156319, A002605, A000225, A052129, A014551 (companion "autosequence"), A015266, A015287, A015305, A015323, A015338, A015356, A015371, A084175, A245489, A283641.

%Y Cf. A049883 = primes in this sequence, A107036 = indices of primes, A129738.

%Y Cf. A091084 (mod 10), A239473, A280049.

%Y Bisections: A002450, A007583.

%Y Cf. A077925 (signed version).

%K nonn,nice,easy,core,changed

%O 0,4

%A _N. J. A. Sloane_

%E Thanks to _Don Knuth_, who pointed out several missing references, including Brocard (1880), which although it was mentioned in the 1973 Handbook of Integer Sequences, was omitted from the 1995 "Encyclopedia". - _N. J. A. Sloane_, Dec 26 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)