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.
0, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621, 44739243, 89478485, 178956971, 357913941, 715827883, 1431655765, 2863311531, 5726623061, 11453246123
Offset: 0
Examples
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). From _Joerg Arndt_, Nov 10 2012: (Start) The a(6)=21 length-5 ternary words with no two consecutive letters nonzero are (dots for 0's) [ 1] [ . . . . ] [ 2] [ . . . 1 ] [ 3] [ . . . 2 ] [ 4] [ . . 1 . ] [ 5] [ . . 2 . ] [ 6] [ . 1 . . ] [ 7] [ . 1 . 1 ] [ 8] [ . 1 . 2 ] [ 9] [ . 2 . . ] [10] [ . 2 . 1 ] [11] [ . 2 . 2 ] [12] [ 1 . . . ] [13] [ 1 . . 1 ] [14] [ 1 . . 2 ] [15] [ 1 . 1 . ] [16] [ 1 . 2 . ] [17] [ 2 . . . ] [18] [ 2 . . 1 ] [19] [ 2 . . 2 ] [20] [ 2 . 1 . ] [21] [ 2 . 2 . ] (End) 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 + ...
References
- Jathan Austin and Lisa Schneider, Generalized Fibonacci sequences in Pythagorean triple preserving sequences, Fib. Q., 58:1 (2020), 340-350.
- 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.
- International Mathematical Olympiad 2001, Hong Kong Preliminary Selection Contest Problem #16.
- Jablan S. and Sazdanovic R., LinKnot: Knot Theory by Computer, World Scientific Press, 2007. See p. 80.
- Ernst Erich Jacobsthal, Fibonaccische Polynome und Kreisteilungsgleichungen, Sitzungsber. Berliner Math. Gesell. 17 (1919-1920), 43-57.
- 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.
- Donald E. Knuth, Art of Computer Programming, Vol. 3, Sect. 5.3.1, Eq. 13.
- Thomas Koshy, Fibonacci and Lucas numbers with applications, Wiley, 2001, p. 98.
- Steven Roman, Introduction to Coding and Information Theory, Springer Verlag, 1996, 41-42.
- 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]
- 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).
- Robert M. Young, Excursions in Calculus, MAA, 1992, p. 239
Links
- Indranil Ghosh, Table of n, a(n) for n = 0..3316 (terms 0..500 from T. D. Noe)
- M. H. Albert, M. D. Atkinson, and V. Vatter, Inflations of geometric grid classes: three case studies.
- Jean-Paul Allouche, Jeffrey Shallit, Zhixiong Wen, Wen Wu, and Jiemeng Zhang, Sum-free sets generated by the period-k-folding sequences and some Sturmian sequences, arXiv:1911.01687 [math.CO], 2019.
- Joerg Arndt, Matters Computational (The Fxtbook), pp.315-318.
- Mohammad K. Azarian, Limit of Nested Square Roots, Problem B-664, Fibonacci Quarterly, Vol. 28, No. 2, May 1990, p. 182.
- Mohammad K. Azarian, Solution to Problem B-664, Limit of Nested Square Roots, Fibonacci Quarterly, Vol. 29, No. 2, May 1991, p. 182.
- Roland Bacher, Chebyshev polynomials, quadratic surds and a variation of Pascal's triangle, arXiv:1509.09054 [math.CO], 2015.
- Paul Barry, On sequences with {-1, 0, 1} Hankel transforms, arXiv preprint arXiv:1205.2565 [math.CO], 2012. - From _N. J. A. Sloane_, Oct 18 2012
- Paul Barry, A Catalan Transform and Related Transformations on Integer Sequences, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.
- Paul Barry, On Integer-Sequence-Based Constructions of Generalized Pascal Triangles, Journal of Integer Sequences, Vol. 9 (2006), Article 06.2.4.
- Paul Barry, Riordan arrays, generalized Narayana triangles, and series reversion, Linear Algebra and its Applications, 491 (2016) 343-385.
- Paul Barry, Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices, Journal of Integer Sequences, 19 (2016), Article 16.3.5.
- Paul Barry, Notes on Riordan arrays and lattice paths, arXiv:2504.09719 [math.CO], 2025. See pp. 14, 29.
- Katerina Böhmová, Cristina Dalfó, and Clemens Huemer, On cyclic Kautz digraphs, arXiv:1512.05917 [math.CO], 2015; alternative link.
- Wieb Bosma, Signed bits and fast exponentiation, J. Th. Nombres de Bordeaux, 13 no. 1 (2001), p. 27-41.
- Garry Bowlin and Matthew G. Brin, Coloring Planar Graphs via Colored Paths in the Associahedra, arXiv preprint arXiv:1301.3984 [math.CO], 2013. - From _N. J. A. Sloane_, Feb 12 2013
- Rachael Boyd and Richard Hepworth, Combinatorics of injective words for Temperley-Lieb algebras, arXiv:2006.04261 [math.AT], 2020.
- Paul Bradley and Peter Rowley, Orbits on k-subsets of 2-transitive Simple Lie-type Groups, 2014.
- Henri Brocard, Propriété d'une série de triangles, Nouvelle Correspondance Mathématique, Vol. 6 (1880), 145-151.
- H. Bruhn, L. Gellert, and J. Günther, Jacobsthal numbers in generalised Petersen graphs, arXiv preprint arXiv:1503.03390 [math.CO], 2015.
- H. Bruhn, L. Gellert, and J. Günther, Jacobsthal numbers in generalised Petersen graphs, Electronic Notes in Discrete Math., 2015.
- Isabel Cação, Helmuth R. Malonek, Maria Irene Falcão, and Graça Tomaz, Intrinsic Properties of a Non-Symmetric Number Triangle, J. Int. Seq., Vol. 26 (2023), Article 23.4.8.
- L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr., Representations for a special sequence, Fibonacci Quarterly 10.5 (1972), pages 499-518 and 550.
- Paula Catarino, Helena Campos, and Paulo Vasco. On the Mersenne sequence. Annales Mathematicae et Informaticae, 46 (2016) pp. 37-53.
- Miquel Cerda, Irregular triangle whose row sums are the Jacobsthal numbers.
- Ji Young Choi, Ternary Modified Collatz Sequences And Jacobsthal Numbers, Journal of Integer Sequences, Vol. 19 (2016), #16.7.5.
- Ji Young Choi, A Generalization of Collatz Functions and Jacobsthal Numbers, J. Int. Seq., Vol. 21 (2018), Article 18.5.4.
- Johann Cigler, Some remarks and conjectures related to lattice paths in strips along the x-axis, arXiv:1501.04750 [math.CO], 2015.
- M. H. Cilasun, An Analytical Approach to Exponent-Restricted Multiple Counting Sequences, arXiv preprint arXiv:1412.3265 [math.NT], 2014.
- M. H. Cilasun, Generalized Multiple Counting Jacobsthal Sequences of Fermat Pseudoprimes, Journal of Integer Sequences, Vol. 19, 2016, #16.2.3.
- Charles K. Cook and Michael R. Bacon, Some identities for Jacobsthal and Jacobsthal-Lucas numbers satisfying higher order recurrence relations, Annales Mathematicae et Informaticae, 41 (2013) pp. 27-39.
- D. E. Daykin, D. J. Kleitman, and D. B. West, The number of meets between two subsets of a lattice, J. Combin. Theory, A 26 (1979), 135-156.
- Gesualdo Delfino and Jacopo Viti, Potts q-color field theory and scaling random cluster model, arXiv:1104.4323 [hep-th], 2011.
- Karl Dilcher and Larry Ericksen, Continued fractions and Stern polynomials. Ramanujan Journal (2017). See Table 2.
- Karl Dilcher and Hayley Tomkins, Square classes and divisibility properties of Stern polynomials, Integers (2018) 18, Article #A29.
- Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, Odd-Rule Cellular Automata on the Square Grid, arXiv:1503.04249 [math.CO], 2015.
- Peter E. Finch, From spin to anyon notation: The XXZ Heisenberg model as a D_3 (or su(2)_4) anyon chain, arXiv preprint arXiv:1201.4470 [math-ph], 2012.
- M. A. Fiol and J. Vilaltella, Some results on the structure of multipoles in the study of snarks, Electron J. Combin., 22(1) (2015), #P1.45.
- M. Cetin Firengiz and A. Dil, Generalized Euler-Seidel method for second order recurrence relations, Notes on Number Theory and Discrete Mathematics, Vol. 20, 2014, No. 4, 21-32.
- Darrin D. Frey and James A. Sellers, Jacobsthal Numbers and Alternating Sign Matrices, J. Integer Seqs., Vol. 3 (2000), Article 00.2.3.
- Robert Frontczak and Taras Goy, Mersenne-Horadam identities using generating functions, Carpathian Math. Publ. (2020) Vol. 12, No. 1, 34-45.
- E. M. García-Caballero, S. G. Moreno, and M. P. Prophet, New Viète-like infinite products of nested radicals, Fib. Q., 52 (No. 1, 2014), 27-31.
- Dale Gerdemann, Triangles from (1,2) Recursion and Recursive Triangle Fragmentation from (1,2) Recursion , YouTube Videos, December 2014.
- A. Goldberg and N. A. Rosenberg, Beyond 2/3 and 1/3: the complex signatures of sex-biased admixture on the X chromosome, Genetics 201 (2015), 263-279.
- J. Goldwasser et al., The density of ones in Pascal's rhombus, Discrete Math., 204 (1999), 231-236.
- Taras Goy, On determinants and permanents of some Toeplitz-Hessenberg matrices whose entries are Jacobsthal numbers, Eurasian Math. J. (2018) Vol. 9, No. 4, 61-67.
- Taras P. Goy, Jacobsthal number identities using the generalized Brioschi formula, Vasyl Stefanyk Precarpathian National University, (Ivano-Frankivsk, Ukraine, 2020).
- Jonny Griffiths, The Not-on-the-line transformation, The Mathematical Gazette, 99, pp 347-352 (2015).
- Martin Griffiths and Alex Bramham, The Jacobsthal Numbers: Two Results and Two Questions, Fibonacci Quart. 53 (2015), no. 2, 147-151.
- Richard K. Guy, Letters to N. J. A. Sloane, June-August 1968.
- Richard K. Guy, Tanya Khovanova, and Julian Salazar, Conway's subprime Fibonacci sequences, arXiv:1207.5099 [math.NT], 2012-2014.
- Lee Hae-hwang, Illustration of initial terms in terms of rosemary plants.
- Silvia Heubach, Tiling an m-by-n area with squares of size up to k-by-k (m<=5), preprint, published in: Congressus Numerantium 140 (1999), 43-64.
- A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 56. Book's website.
- Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
- Brian Hopkins and Stéphane Ouvry, Combinatorics of Multicompositions, arXiv:2008.04937 [math.CO], 2020.
- Brian Hopkins, Mark Shattuck, Andrew V. Sills, Thotsaporn "AEK" Thanatipanonda, and Hua Wang, Parts and subword patterns in compositions, Preprint 2015.
- A. F. Horadam, Jacobsthal and Pell Curves, Fib. Quart. 26, 79-83, 1988. [See J_n.]
- A. F. Horadam, Jacobsthal Representation Numbers, Fib Quart. 34, 40-54, 1996.
- Jia Huang and Erkko Lehtonen, Associative-commutative spectra for some varieties of groupoids, arXiv:2401.15786 [math.CO], 2024. See p. 17.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 142.
- Dan Ismailescu, Joehyun Kim, Kelvin Kim, and Jeewoo Lee, The largest angle bisection procedure, arXiv:1908.02749 [math.MG], 2019. See p. 17.
- Milan Janjić, On Linear Recurrence Equations Arising from Compositions of Positive Integers, J. Int. Seq. 18 (2015), Article 15.4.7.
- Milan Janjić, Words and Linear Recurrences, J. Int. Seq. 21 (2018), Article 18.1.4.
- L. Edson Jeffery, Unit-primitive matrices.
- D. Jhala, G. P. S. Rathore, and K. Sisodiya, Some Properties of k-Jacobsthal Numbers with Arithmetic Indexes, Turkish Journal of Analysis and Number Theory, 2014, Vol. 2, No. 4, 119-124.
- Tanya Khovanova, Coins and Logic, arXiv:1801.01143 [math.HO], 2018.
- Tanya Khovanova and Konstantin Knop, Coins that Change Their Weights, arXiv:1611.09201 [math.CO], 2016.
- Sandi Klavžar, Structure of Fibonacci cubes: a survey, J. Comb. Optim., 25, 2013, 505-522.
- Masato Kobayashi, Weighted counting of Bruhat paths by shifted R-polynomials, arXiv:1907.11802 [math.CO], 2019.
- Takao Komatsu, Continued fractions associated with the topological index of the caterpillar-bond graph, arXiv:1903.09986 [math.CO], 2019.
- Thomas Koshy and Ralph P. Grimaldi, Ternary words and Jacobsthal numbers, Fib. Quart., 55 (No. 2, 2017), 129-136.
- Peter J. Larcombe, Julius Fergy T. Rabago, and Eric J. Fennessey, On two derivative sequences from scaled geometric mean sequence terms, Palestine Journal of Mathematics (2018) Vol. 7(2), 397-405.
- Kyu-Hwan Lee and Se-jin Oh, Catalan triangle numbers and binomial coefficients, arXiv:1601.06685 [math.CO], 2016.
- E. Lemmen, J. van Duivenbode, J. L. Duarte, and E. A. Lomonova, Flexible Multilevel Converters using 4-Switch Extended Commutation Cells, Emerging and Selected Topics in Power Electronics, IEEE Journal of, Volume:PP, Issue: 99, 2015.
- S. L. Levine, Suppose more rabbits are born, Fib. Quart., 26 (1988), 306-311.
- Alan J. Macfarlane, On generating functions of some sequences of integers defined in the evolution of the cellular automaton Rule 150, Preprint 2016.
- T. Mansour and A. Robertson, Refined restricted permutations avoiding subsets of patterns of length three, arXiv:math/0204005 [math.CO], 2002.
- B. D. McKay and I. M. Wanless, A census of small latin hypercubes, SIAM J. Discrete Math. 22, (2008) 719-736.
- A. Moghaddamfar and H. Tajbakhsh, More Determinant Representations for Sequences, Journal of Integer Sequences, 17 (2014), #14.5.6.
- Sophie Morier-Genoud, Counting Coxeter's friezes over a finite field via moduli spaces, arXiv:1907.12790 [math.CO], 2019.
- F. P. Muga II, Extending the Golden Ratio and the Binet-de Moivre Formula, March 2014; Preprint on ResearchGate.
- Emanuele Munarini, A generalization of André-Jeannin's symmetric identity, Pure Mathematics and Applications (2018) Vol. 27, No. 1, 98-118.
- G. Myerson and A. J. van der Poorten, Some problems concerning recurrence sequences, Amer. Math. Monthly 102 (1995), no. 8, 698-705.
- S. Northshield, Stern's diatomic sequence 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, ..., Amer. Math. Monthly, 117 (2010), 581-598.
- Kritkhajohn Onphaeng and Prapanpong Pongsriiam, Jacobsthal and Jacobsthal-Lucas Numbers and Sums Introduced by Jacobsthal and Tverberg, Journal of Integer Sequences, Vol. 20 (2017), Article 17.3.6.
- Ahmet Öteleş, Zekeriya Y. Karatas, and Diyar O. Mustafa Zangana, Jacobsthal Numbers and Associated Hessenberg Matrices, J. Int. Seq., Vol. 21 (2018), Article 18.2.5.
- D. Panario, M. Sahin, and Q. Wang, A family of Fibonacci-like conditional sequences, INTEGERS, Vol. 13, 2013, #A78.
- D. Panario, M. Sahin, Q. Wang, and W. Webb, General conditional recurrences, Applied Mathematics and Computation, Volume 243, Sep 15 2014, Pages 220-231.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- M. Rahmani, The Akiyama-Tanigawa matrix and related combinatorial identities, Linear Algebra and its Applications 438 (2013) 219-230. - From _N. J. A. Sloane_, Dec 26 2012
- N. A. Rosenberg, Admixture models and the breeding systems of H. S. Jennings: a GENETICS connection, Genetics 202 (2016), 9-13.
- E. Schlemm, On the expected number of successes in a sequence of nested Bernoulli trials, arXiv preprint arXiv:1303.4979 [math.PR], 2013.
- A. G. Shannon and J. V. Leyendekkers, The Golden Ratio family and the Binet equation, Notes on Number Theory and Discrete Mathematics, Vol. 21, 2015, No. 2, 35-42.
- N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
- Yüksel Soykan, On Summing Formulas For Generalized Fibonacci and Gaussian Generalized Fibonacci Numbers, Advances in Research (2019) Vol. 20, No. 2, 1-15, Article AIR.51824.
- Yüksel Soykan, Generalized Fibonacci Numbers: Sum Formulas, Journal of Advances in Mathematics and Computer Science (2020) Vol. 35, No. 1, 89-104.
- Yüksel Soykan, Closed Formulas for the Sums of Squares of Generalized Fibonacci Numbers, Asian Journal of Advanced Research and Reports (2020) Vol. 9, No. 1, 23-39, Article no. AJARR.55441.
- Yüksel Soykan, 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, Earthline Journal of Mathematical Sciences (2020) Vol. 4, No. 2, 297-331.
- Yüksel Soykan, Erkan Taşdemir, and İnci Okumuş, On Dual Hyperbolic Numbers With Generalized Jacobsthal Numbers Components, Zonguldak Bülent Ecevit University, (Zonguldak, Turkey, 2019).
- Paul K. Stockmeyer, The Pascal Rhombus and the Stealth Configuration, arXiv:1504.04404 [math.CO], 2015.
- X. Sun and V. H. Moll, The p-adic Valuations of Sequences Counting Alternating Sign Matrices, JIS 12 (2009) 09.3.8.
- Hassan Tarfaoui, Concours Général 1991 - Exercice 4 (in French).
- Two-Year College Math. Jnl., Review of "Jacobsthal Representation Numbers", 28 (1997), p. 76.
- USA Mathematical Olympiad 2013, Problem 2 (proposed by Sam Vandervelde).
- Eric Weisstein's World of Mathematics, Jacobsthal Number, Negabinary, Repunit, Rule 28.
- Eric Weisstein's World of Mathematics, Independent Vertex Set.
- Eric Weisstein's World of Mathematics, King Graph.
- Eric Weisstein's World of Mathematics, Vertex Cover.
- Wikipedia, Elementary cellular automaton
- OEIS Wiki, Autosequence.
- Abdelmoumène Zekiri, Farid Bencherif, and Rachid Boumahdi, Generalization of an Identity of Apostol, J. Int. Seq., Vol. 21 (2018), Article 18.5.1.
- G. B. M. Zerr, Problem 64, American Mathematical Monthly, vol. 3, no. 12, 1896 (p. 311).
- Index entries for "core" sequences.
- Index entries for linear recurrences with constant coefficients, signature (1,2).
- Index entries for sequences related to Chebyshev polynomials.
- Index to divisibility sequences.
- Index to sequences related to Olympiads and other Mathematical competitions.
Crossrefs
Partial sums of this sequence give A000975, where there are additional comments from B. E. Williams and Bill Blewett on the tie problem.
a(n) = A073370(n-1, 0), n >= 1 (first column of triangle).
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.
Cf. A077925 (signed version).
Programs
-
Haskell
a001045 = (`div` 3) . (+ 1) . a000079 a001045_list = 0 : 1 : zipWith (+) (map (2 *) a001045_list) (tail a001045_list) -- Reinhard Zumkeller, Mar 24 2013, Jan 05 2012, Feb 05 2011
-
Magma
[n le 2 select n-1 else Self(n-1)+2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jun 27 2016
-
Maple
A001045 := proc(n) (2^n-(-1)^n)/3 ; end proc: # R. J. Mathar, Dec 18 2012
-
Mathematica
Jacob0[n_] := (2^n - (-1)^n)/3; Table[Jacob0[n], {n, 0, 33}] (* Robert G. Wilson v, Dec 05 2005 *) Array[(2^# - (-1)^#)/3 &, 33, 0] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *) LinearRecurrence[{1, 2}, {0, 1}, 40] (* Harvey P. Dale, Nov 30 2011 *) CoefficientList[Series[x/(1 - x - 2 x^2), {x, 0, 34}], x] (* Robert G. Wilson v, Jul 21 2015 *) Table[(2^n - (-1)^n)/3, {n, 0, 20}] (* Eric W. Weisstein, Sep 21 2017 *) Table[Abs[QBinomial[n, 1, -2]], {n, 0, 35}] (* John Keith, Jan 29 2022 *)
-
Maxima
a[0]:0$ a[n]:=2^(n-1)-a[n-1]$ A001045(n):=a[n]$ makelist(A001045(n),n,0,30); /* Martin Ettl, Nov 05 2012 */
-
PARI
a(n) = (2^n - (-1)^n) / 3
-
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
-
PARI
a=0; for(n=0,34,print1(a,", "); a=2*(a-n%2)+1) \\ K. Spage, Aug 22 2014
-
Python
# A001045.py def A001045(): a, b = 0, 1 while True: yield a a, b = b, b+2*a sequence = A001045() [next(sequence) for i in range(20)] # David Radcliffe, Jun 26 2016
-
Python
[(2**n-(-1)**n)//3 for n in range(40)] # Gennady Eremin, Mar 03 2022
-
Sage
[lucas_number1(n, 1, -2) for n in range(34)] # Zerinvary Lajos, Apr 22 2009 # Alternatively: a = BinaryRecurrenceSequence(1,2) [a(n) for n in (0..34)] # Peter Luschny, Aug 29 2016
Formula
a(n) = 2^(n-1) - a(n-1). a(n) = 2*a(n-1) - (-1)^n = (2^n - (-1)^n)/3.
G.f.: x/(1 - x - 2*x^2) = x/((x+1)*(1-2*x)). Simon Plouffe in his 1992 dissertation
E.g.f.: (exp(2*x) - exp(-x))/3.
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
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
a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*3^(k-1). - Paul Barry, Apr 02 2003
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
a(n) = U(n-1, i/(2*sqrt(2)))*(-i*sqrt(2))^(n-1) with i^2=-1. - Paul Barry, Nov 17 2003
a(n+1) = Sum_{k=0..ceiling(n/2)} 2^k*binomial(n-k, k). - Benoit Cloitre, Mar 06 2004
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
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
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
a(n+1) = Sum_{k=0..n} binomial(k, n-k)*2^(n-k). - Paul Barry, Oct 07 2004
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
From Paul Barry, Jan 17 2005: (Start)
a(n) = Sum_{k=0..n} k*binomial(n-1, (n-k)/2)*(1+(-1)^(n+k))*floor((2*k+1)/3).
a(n+1) = Sum_{k=0..n} k*binomial(n-1, (n-k)/2)*(1+(-1)^(n+k))*(A042965(k)+0^k). (End)
From Paul Barry, Jan 17 2005: (Start)
a(n+1) = ceiling(2^n/3) + floor(2^n/3) = (ceiling(2^n/3))^2 - (floor(2^n/3))^2.
a(n+1) = Sum_{k=0..n} Sum_{j=0..n} (-1)^(n-j)*binomial(j, k). - Paul Barry, Jan 26 2005
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
From Paul Barry, Feb 20 2003: (Start)
a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n-1)+3*k);
a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n-2)+3*k), where f(n)=A080425(n). (End)
From Miklos Kristof, Mar 07 2007: (Start)
a(2*n) = (1/3)*Product_{d|n} cyclotomic(d,4).
a(2*n+1) = (1/3)*Product_{d|2*n+1} cyclotomic(2*d,2). (End)
From Hieronymus Fischer, Apr 23 2007: (Start)
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}.
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
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
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}.
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)).
There is a similar formula regarding the arccos function, this is a(n) = 2^n/Pi*arccos(b(n)/2).
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))).
(End)
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
a(n) + a(n+5) = 11*2^n. - Paul Curtz, Jan 17 2008
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
a(n) + a(n+2*k+1) = a(2*k+1)*2^n. - Paul Curtz, Feb 12 2008
a(n) = lower left term in the 2 X 2 matrix [0,2; 1,1]^n. - Gary W. Adamson, Mar 02 2008
a(n+1) = Sum_{k=0..n} A109466(n,k)*(-2)^(n-k). -Philippe Deléham, Oct 26 2008
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
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
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
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
For n > 1, a(n) = A000975(n-1) + (1 + (-1)^(n-1))/2. - Vladimir Shevelev, Feb 27 2012
From Sergei N. Gladkovskii, Jun 12 2012: (Start)
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).
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)
a(n) = 2^k * a(n-k) + (-1)^(n+k)*a(k). - Paul Curtz, Jean-François Alcover, Dec 11 2012
a(n) = sqrt((A014551(n))^2 + (-1)^(n-1)*2^(n+2))/3. - Vladimir Shevelev, Mar 13 2013
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
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
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
a(n+2) = Sum_{k=0..n} A108561(n,k)*(-2)^k. - Philippe Deléham, Nov 17 2013
a(n) = (Sum_{k=1..n, k odd} C(n,k)*3^(k-1))/2^(n-1). - Vladimir Shevelev, Feb 05 2014
a(-n) = -(-1)^n * a(n) / 2^n for all n in Z. - Michael Somos, Mar 18 2014
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
From Peter Bala, Apr 06 2015: (Start)
exp( Sum_{n >= 1} a(2*n)/a(n)*x^n/n ) = Sum_{n >= 0} a(n+1)*x^n.
exp( Sum_{n >= 1} a(3*n)/a(n)*x^n/n ) = Sum_{n >= 0} A084175(n+1)*x^n.
exp( Sum_{n >= 1} a(4*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015266(n+3)*(-x)^n.
exp( Sum_{n >= 1} a(5*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015287(n+4)*x^n.
exp( Sum_{n >= 1} a(6*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015305(n+5)*(-x)^n.
exp( Sum_{n >= 1} a(7*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015323(n+6)*x^n.
exp( Sum_{n >= 1} a(8*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015338(n+7)*(-x)^n.
exp( Sum_{n >= 1} a(9*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015356(n+8)*x^n.
exp( Sum_{n >= 1} a(10*n)/a(n)*x^n/n ) = Sum_{n >= 0} A015371(n+9)*(-x)^n. (End)
a(n) = (1-(-1)^n)/2 + floor((2^n)/3). - Reiner Moewald, Jun 05 2015
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
Dirichlet g.f.: (PolyLog(s,2) + (1 - 2^(1-s))*zeta(s))/3. - Ilya Gutkovskiy, Jun 27 2016
From Yuchun Ji, Apr 08 2018: (Start)
a(m)*a(n) + a(m-1)*a(n-1) - 2*a(m-2)*a(n-2) = 2^(m+n-3).
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).
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)
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
a(n) mod 10 = A091084(n). - Alois P. Heinz, Apr 25 2019
The sequence starting with "1" is the second INVERT transform of (1, -1, 3, -5, 11, -21, 43, ...). - Gary W. Adamson, Jul 08 2019
From Kai Wang, Jan 14 2020: (Start)
a(n)^2 - a(n+1)*a(n-1) = (-2)^(n-1).
a(n)^2 - a(n+r)*a(n-r) = (-2)^(n-r)*a(r)^2.
a(m)*a(n+1) - a(m+1)*a(n) = (-2)^n*a(m-n).
a(n) = Sum_{i=0..n-1; j=0..n-1; i+2*j=n-1} 2^j*((i+j)!/(i!*j!)). (End)
For n > 0, 1/(2*a(n+1)) = Sum_{m>=n} a(m)/(a(m+1)*a(m+2)). - Kai Wang, Mar 03 2020
For 4 > h >= 0, k >= 0, a(4*k+h) mod 5 = a(h) mod 5. - Kai Wang, May 07 2020
From Kengbo Lu, Jul 27 2020: (Start)
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.
a(n) = F(n) + Sum_{k=0..n-2} a(k)*F(n-k-1), where F denotes the Fibonacci numbers.
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).
a(n) = 1 + 2*Sum_{k=0..n-2} a(k).
a(m+n) = a(m)*a(n+1) + 2*a(m-1)*a(n).
a(2*n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)*2^(i+j). (End)
G.f.: x/(1 - x - 2*x^2) = Sum_{n >= 0} x^(n+1) * Product_{k = 1..n} (k + 2*x)/(1 + k*x) (a telescoping series). - Peter Bala, May 08 2024
a(n) = Sum_{r>=0} F(n-2r, r), where F(n, 0) is the n-th Fibonacci number and F(n,r) = Sum_{j=1..n} F(n+1-j, r-1) F(j, r-1). - Gregory L. Simay, Aug 31 2024
From Peter Bala, Jun 27 2025: (Start)
The following are all examples of telescoping infinite products:
Product_{n >= 1} (1 + 2^n/a(2*n+2)) = 2, since 1 + 2^n/a(2*n+2) = b(n+1)/b(n), where b(n) = 2 - 3/(2^n + 1).
Product_{n >= 1} (1 - 2^n/a(2*n+2)) = 2/5, since 1 - 2^n/a(2*n+2) = c(n+1)/c(n), where c(n) = 2 + 3/(2^n - 1).
Product_{n >= 1} (1 + (-2)^n/a(2*n+2)) = 2/3, since 1 + (-2)^n/a(2*n+2) = d(n+1)/d(n), where d(n) = 2 - 1/(1 + (-2)^n).
Product_{n >= 1} (1 - (-2)^n/a(2*n+2)) = 6/5, since 1 - (-2)^n/a(2*n+2) = e(n+1)/e(n), where e(n) = 2 - 1/(1 - (-2)^n). (End)
Extensions
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
Comments