A005578 a(2*n) = 2*a(2*n-1), a(2*n+1) = 2*a(2*n)-1.
1, 1, 2, 3, 6, 11, 22, 43, 86, 171, 342, 683, 1366, 2731, 5462, 10923, 21846, 43691, 87382, 174763, 349526, 699051, 1398102, 2796203, 5592406, 11184811, 22369622, 44739243, 89478486, 178956971, 357913942, 715827883, 1431655766, 2863311531, 5726623062, 11453246123
Offset: 0
References
- R. K. Guy, Graphs and the strong law of small numbers. Graph theory, combinatorics and applications. Vol. 2 (Kalamazoo, MI, 1988), 597-614, Wiley-Intersci. Publ., Wiley, New York, 1991.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Sujith Uthsara Kalansuriya Arachchi, Hung Viet Chu, Jiasen Liu, Qitong Luan, Rukshan Marasinghe, and Steven J. Miller, On a Pair of Diophantine Equations, arXiv:2309.04488 [math.NT], 2023.
- Joerg Arndt, Matters Computational (The Fxtbook), p. 315.
- 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.
- Fan Chung and Shlomo Sternberg, Mathematics and the Buckyball
- Johann Cigler, Some remarks and conjectures related to lattice paths in strips along the x-axis, arXiv:1501.04750 [math.CO], 2015.
- Johann Cigler, Recurrences for certain sequences of binomial sums in terms of (generalized) Fibonacci and Lucas polynomials, arXiv:2212.02118 [math.NT], 2022.
- Madeleine Goertz and Aaron Williams, The Quaternary Gray Code and How It Can Be Used to Solve Ziggurat and Other Ziggu Puzzles, arXiv:2411.19291 [math.CO], 2024. See pp. 6, 17.
- R. K. Guy, Letter to N. J. A. Sloane, Apr 08 1988 (annotated scanned copy, included with permission)
- Clemens Heuberger and Helmut Prodinger, On minimal expansions in redundant number systems: Algorithms and quantitative analysis, Computing 66(2001), 377-393.
- Andreas M. Hinz, The Lichtenberg sequence, Fib. Quart., 55 (2017), 2-12.
- Andreas M. Hinz and Paul K. Stockmeyer, Precious Metal Sequences and Sierpinski-Type Graphs, J. Integer Seq., Vol 25 (2022), Article 22.4.8.
- Gurmeet Singh Manku and Joe Sawada, A loopless Gray code for minimal signed-binary representations, 13th Annual European Symposium on Algorithms (ESA), LNCS 3669 (2005), 438-447.
- Thor Martinsen, Non-Fisherian generalized Fibonacci numbers, Notes Num. Theor. Disc. Math. (2025) Vol. 31, No. 2, 370-389. See pp. 385, 387.
- John P. McSorley, Counting structures in the Moebius ladder, Discrete Math., 184 (1998), 137-164.
- Hans Olofsen, Blending functions based on trigonometric and polynomial approximations of the Fabius function, The Arctic University of Norway (Narvik, 2019).
- 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.
- Chloe E. Shiff and Noah A. Rosenberg, Enumeration of rooted binary perfect phylogenies, arXiv:2410.14915 [q-bio.PE], 2024. See p. 16.
- Andrew V. Sills and Hua Wang, On the maximal Wiener index and related questions, Discrete Applied Mathematics, Volume 160, Issues 10-11, July 2012, Pages 1615-1623.
- Eric Weisstein's World of Mathematics, Walsh Function
- Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
Crossrefs
Programs
-
GAP
List([0..40],n->(2^(n+1)+3+(-1)^n)/6); # Muniru A Asiru, Dec 22 2018
-
Magma
[(2^(n+1)+3+(-1)^n)/6: n in [0..40]]; // Vincenzo Librandi, Aug 14 2011
-
Maple
A005578:=-(-1+z+z^2)/((z-1)*(2*z-1)*(z+1)); # Simon Plouffe in his 1992 dissertation with(combstruct):ZL0:=S=Prod(Sequence(Prod(a, Sequence(b))), a):ZL1:=Prod(begin_blockP, Z, end_blockP):ZL2:=Prod(begin_blockLR, Z, Sequence(Prod(mu_length, Z), card>=1), end_blockLR): ZL3:=Prod(begin_blockRL, Sequence(Prod(mu_length, Z), card>=1), Z, end_blockRL):Q:=subs([a=Union(ZL3), b=ZL3], ZL0), begin_blockP=Epsilon, end_blockP=Epsilon, begin_blockLR=Epsilon, end_blockLR=Epsilon, begin_blockRL=Epsilon, end_blockRL=Epsilon, mu_length=Epsilon:temp15:=draw([S, {Q}, unlabelled], size=15):seq(count([S, {Q}, unlabelled], size=n), n=2..34); # Zerinvary Lajos, Mar 08 2008
-
Mathematica
a=0; Table[a=2^n-a;(a/2+1)/2,{n,5!}] (* Vladimir Joseph Stephan Orlovsky, Nov 22 2009 *) LinearRecurrence[{2,1,-2}, {1,1,2}, 40] (* G. C. Greubel, Aug 26 2019 *)
-
PARI
a(n)=(2^(n+1)+3+(-1)^n)/6 \\ Charles R Greathouse IV, Mar 22 2016
-
Python
print([1+2**n//3 for n in range(40)]) # Gennady Eremin, Feb 05 2022
-
Sage
[(2^(n+1)+3+(-1)^n)/6 for n in (0..40)] # G. C. Greubel, Aug 26 2019
Formula
a(n) = ceiling(2^n/3).
a(n) = 1 + floor((2^n)/3) (proof by mathematical induction).
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
From Paul Barry, Jul 20 2003: (Start)
G.f.: (1 - x - x^2)/((1-x^2)*(1-2*x)). [Guy, 1988];
E.g.f.: (exp(2*x) - exp(-x))/3 + cosh(x) = (2*exp(2*x) + 3*exp(x) + exp(-x))/6. (End)
The 30 listed terms are given by a(0)=1, a(1)=1 and, for n > 1, by a(n) = a(n-1) + a(n-2) + Sum_{i=0..n-4} Fibonacci(i)*a(n-4-i). - John W. Layman, Jan 07 2000
a(n) = (2^(n+1) + 3 + (-1)^n)/6. - Vladeta Jovovic, Jul 02 2002
Binomial transform of A001045(n-1)(-1)^n + 0^n/2. - Paul Barry, Apr 28 2004
a(n) = (1 + A001045(n+1))/2. - Paul Barry, Apr 28 2004
a(n) = Sum_{k=0..n} (-1)^k*Sum_{j=0..n-k} (if((j-k) mod 2)=0, binomial(n-k, j), 0). - Paul Barry, Jan 25 2005
Let M = the 6 X 6 adjacency matrix of a benzene ring, (reference): [0,1,0,0,0,1; 1,0,1,0,0,0; 0,1,0,1,0,0; 0,0,1,0,1,0; 0,0,0,1,0,1; 1,0,0,0,1,0]. Then a(n) = leftmost nonzero term of M^n * [1,0,0,0,0,0]. E.g.: a(6) = 22 since M^6 * [1,0,0,0,0,0] = [22,0,21,0,21,0]. - Gary W. Adamson, Jun 14 2006
Starting (1, 2, 3, 6, 11, 22, ...), = row sums of triangle A135229. - Gary W. Adamson, Nov 23 2007
Let T = the 3 X 3 matrix [1,1,0; 1,0,1; 0,1,1]. Then T^n * [1,0,0] = [A005578(n), A001045(n), A000975(n-1)]. - Gary W. Adamson, Dec 24 2007
a(n) = 1 + 2^(n-1) - a(n-1) = a(n-1) + 2*a(n-2) - 1 = a(n-2) + 2^(n-2). - Paul Curtz, Jan 31 2009
a(n) = A023105(n+1) - 1. - Carl Joshua Quines, Jul 17 2019
Extensions
Edited by N. J. A. Sloane, Jun 20 2015
Comments