A003462 a(n) = (3^n - 1)/2.
0, 1, 4, 13, 40, 121, 364, 1093, 3280, 9841, 29524, 88573, 265720, 797161, 2391484, 7174453, 21523360, 64570081, 193710244, 581130733, 1743392200, 5230176601, 15690529804, 47071589413, 141214768240, 423644304721, 1270932914164
Offset: 0
Examples
There are 4 3-block bicoverings of a 3-set: {{1, 2, 3}, {1, 2}, {3}}, {{1, 2, 3}, {1, 3}, {2}}, {{1, 2, 3}, {1}, {2, 3}} and {{1, 2}, {1, 3}, {2, 3}}. Ternary........Decimal 0.................0 1.................1 11................4 111..............13 1111.............40 etc. - _Zerinvary Lajos_, Jan 14 2007 There are altogether a(3) = 13 three letter words over {A,B,C} with say, A, appearing an odd number of times: AAA; ABC, ACB, ABB, ACC; BAC, CAB, BAB, CAC; BCA, CBA, BBA, CCA. - _Wolfdieter Lang_, Jul 16 2017
References
- J. G. Mauldon, Strong solutions for the counterfeit coin problem, IBM Research Report RC 7476 (#31437) 9/15/78, IBM Thomas J. Watson Research Center, P. O. Box 218, Yorktown Heights, N. Y. 10598.
- Paulo Ribenboim, The Book of Prime Number Records, Springer-Verlag, NY, 2nd ed., 1989, p. 60.
- Paulo Ribenboim, The Little Book of Big Primes, Springer-Verlag, NY, 1991, p. 53.
- Amir Sapir, The Tower of Hanoi with Forbidden Moves, The Computer J. 47 (1) (2004) 20, case three-in-a row, sequence a(n).
- Robert Sedgewick, Algorithms, 1992, pp. 109.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Paolo Xausa, Table of n, a(n) for n = 0..2000 (terms 0..200 from T. D. Noe)
- A. Abdurrahman, CM Method and Expansion of Numbers, arXiv:1909.10889 [math.NT], 2019.
- Max A. Alekseyev and Toby Berger, Solving the Tower of Hanoi with Random Moves. In: J. Beineke, J. Rosenhouse (eds.) The Mathematics of Various Entertaining Subjects: Research in Recreational Math, Princeton University Press, 2016, pp. 65-79. ISBN 978-0-691-16403-8
- Arcytech, The Sierpinski Triangle Fractal.
- Andrei Asinowski and Michaela A. Polley, Patterns in rectangulations. Part I: T-like patterns, inversion sequence classes I(010, 101, 120, 201) and I(011, 201), and rushed Dyck paths, arXiv:2501.11781 [math.CO], 2025. See p. 26.
- Jean-Luc Baril and Helmut Prodinger, Enumeration of partial Lukasiewicz paths, arXiv:2205.01383 [math.CO], 2022.
- Beáta Bényi and Toshiki Matsusaka, Extensions of the combinatorics of poly-Bernoulli numbers, arXiv:2106.05585 [math.CO], 2021.
- Göksal Bilgici and Tuncay Deniz Şentürk, Some Addition Formulas for Fibonacci, Pell and Jacobsthal Numbers, Annales Mathematicae Silesianae (2019) Vol. 33, 55-65.
- Carlos M. da Fonseca and Anthony G. Shannon, A formal operator involving Fermatian numbers, Notes Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 491-498.
- Sung-Hyuk Cha, On Complete and Size Balanced k-ary Tree Integer Sequences, International Journal of Applied Mathematics and Informatics, Issue 2, Volume 6, 2012, pp. 67-75. - From _N. J. A. Sloane_, Dec 24 2012
- Shaoshi Chen, Hanqian Fang, Sergey Kitaev, and Candice X.T. Zhang, Patterns in Multi-dimensional Permutations, arXiv:2411.02897 [math.CO], 2024. See pp. 17, 26.
- Nachum Dershowitz, Between Broadway and the Hudson: A Bijection of Corridor Paths, arXiv:2006.06516 [math.CO], 2020.
- Roger B. Eggleton, Maximal Midpoint-Free Subsets of Integers, International Journal of Combinatorics Volume 2015, Article ID 216475, 14 pages.
- John Elias, Sierpinski Nesting Stars, Stars of 3*9^n-1/2, Stars of 9^n-1/2, Sierpinski Anti-Triangles.
- Graham Everest, Shaun Stevens, Duncan Tamsett and Tom Ward, Primes generated by recurrence sequences, Amer. Math. Monthly, Vol. 114, No. 5 (2007), pp. 417-431.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 372.
- Takao Komatsu, Some recurrence relations of poly-Cauchy numbers, J. Nonlinear Sci. Appl., (2019) Vol. 12, Issue 12, 829-845.
- G. Kreweras, Sur les éventails de segments, Cahiers du Bureau Universitaire de Recherche Opérationnelle, Institut de Statistique, Université de Paris, #15 (1970), 3-41. [Annotated scanned copy]
- H. V. Krishna and N. J. A. Sloane, Correspondence, 1975.
- Ross La Haye, Binary Relations on the Power Set of an n-Element Set, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6.
- Wolfdieter Lang, Notes on certain inhomogeneous three term recurrences.
- László Németh, The trinomial transform triangle, J. Int. Seqs., Vol. 21 (2018), Article 18.7.3. Also arXiv:1807.07109 [math.NT], 2018.
- László Németh and László Szalay, Sequences Involving Square Zig-Zag Shapes, J. Int. Seq., Vol. 24 (2021), Article 21.5.2.
- 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.
- Yash Puri and Thomas Ward, Arithmetic and growth of periodic orbits, J. Integer Seqs., Vol. 4 (2001), #01.2.1.
- D. C. Santos, E. A. Costa, and P. M. M. C. Catarino, On Gersenne Sequence: A Study of One Family in the Horadam-Type Sequence, Axioms 14, 203, (2025). See p. 4.
- A. G. Shannon, Letter to N. J. A. Sloane, Dec 06 1974.
- Morgan Ward, Note on divisibility sequences, Bull. Amer. Math. Soc., 42 (1936), 843-845.
- Eric Weisstein's World of Mathematics, Apollonian Network.
- Eric Weisstein's World of Mathematics, Dorogovtsev-Goltsev-Mendes Graph.
- Eric Weisstein's World of Mathematics, Graph Cycle.
- Eric Weisstein's World of Mathematics, Maximal Clique.
- Eric Weisstein's World of Mathematics, Maximum Clique.
- Eric Weisstein's World of Mathematics, Mephisto Waltz Sequence.
- Eric Weisstein's World of Mathematics, Repunit.
- Eric Weisstein's World of Mathematics, Weighing.
- Thomas Wieder, The number of certain k-combinations of an n-set, Applied Mathematics Electronic Notes, Vol. 8 (2008).
- K. Zsigmondy, Zur Theorie der Potenzreste, Monatsh. Math., Vol. 3 (1892), 265-284.
- Index entries for sequences related to sorting
- Index entries for linear recurrences with constant coefficients, signature (4,-3)
Crossrefs
Cf. A000225, A000392, A004125, A014753, A028491 (indices of primes), A059443 (column k = 3), A065363, A097933, A120444, A321872 (sum reciprocals).
Cf. A064099 (minimal number of weightings to detect lighter or heavier coin among n coins).
Cf. A039755 (column k = 1).
Cf. A006516 (binomial transform, and special 4 letter words).
Cf. A341590.
Programs
-
GAP
A003462:=List([0..30],n->(3^n-1)/2); # Muniru A Asiru, Sep 27 2017
-
Haskell
a003462 = (`div` 2) . (subtract 1) . (3 ^) a003462_list = iterate ((+ 1) . (* 3)) 0 -- Reinhard Zumkeller, May 09 2012
-
Magma
[(3^n-1)/2: n in [0..30]]; // Vincenzo Librandi, Feb 21 2015
-
Maple
A003462 := n-> (3^n - 1)/2: seq(A003462(n), n=0..30); A003462:=1/(3*z-1)/(z-1); # Simon Plouffe in his 1992 dissertation
-
Mathematica
(3^Range[0, 30] - 1)/2 (* Harvey P. Dale, Jul 13 2011 *) LinearRecurrence[{4, -3}, {0, 1}, 30] (* Harvey P. Dale, Jul 13 2011 *) Accumulate[3^Range[0, 30]] (* Alonso del Arte, Sep 10 2017 *) CoefficientList[Series[x/(1 - 4x + 3x^2), {x, 0, 30}], x] (* Eric W. Weisstein, Sep 28 2017 *) Table[FromDigits[PadRight[{},n,1],3],{n,0,30}] (* Harvey P. Dale, Jun 01 2022 *)
-
Maxima
A003462(n):=(3^n - 1)/2$ makelist(A003462(n),n,0,30); /* Martin Ettl, Nov 05 2012 */
-
PARI
a(n)=(3^n-1)/2
-
PARI
concat(0, Vec(x/((1-x)*(1-3*x)) + O(x^30))) \\ Altug Alkan, Nov 01 2015
-
Sage
[(3^n - 1)/2 for n in range(0,30)] # Zerinvary Lajos, Jun 05 2009
Formula
G.f.: x/((1-x)*(1-3*x)).
a(n) = 4*a(n-1) - 3*a(n-2), n > 1. a(0) = 0, a(1) = 1.
a(n) = 3*a(n-1) + 1, a(0) = 0.
E.g.f.: (exp(3*x) - exp(x))/2. - Paul Barry, Apr 11 2003
a(n+1) = Sum_{k = 0..n} binomial(n+1, k+1)*2^k. - Paul Barry, Aug 20 2004
a(n) = Sum_{i = 0..n-1} 3^i, for n > 0; a(0) = 0.
a(n) = A125118(n, 2) for n > 1. - Reinhard Zumkeller, Nov 21 2006
a(n) = StirlingS2(n+1, 3) + StirlingS2(n+1, 2). - Ross La Haye, Jan 10 2008
a(n) = 2*a(n-1) + 3*a(n-2) + 2, n > 1. - Gary Detlefs, Jun 21 2010
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3), a(0) = 0, a(1) = 1, a(2) = 4. Observation by G. Detlefs. See the W. Lang comment and link. - Wolfdieter Lang, Oct 18 2010
A008344(a(n)) = 0, for n > 1. - Reinhard Zumkeller, May 09 2012
A085059(a(n)) = 1 for n > 0. - Reinhard Zumkeller, Jan 31 2013
G.f.: Q(0)/2 where Q(k) = 1 - 1/(9^k - 3*x*81^k/(3*x*9^k - 1/(1 - 1/(3*9^k - 27*x*81^k/(9*x*9^k - 1/Q(k+1)))))); (continued fraction ). - Sergei N. Gladkovskii, Apr 12 2013
a(n) = A001065(3^n) where A001065(m) is the sum of the proper divisors of m for positive integer m. - Chayim Lowen, Mar 03 2015
Sum_{n>=1} 1/a(n) = A321872. - Amiram Eldar, Nov 18 2020
Extensions
More terms from Michael Somos
Corrected my comment of Jan 10 2008. - Ross La Haye, Oct 29 2008
Removed comment that duplicated a formula. - Joerg Arndt, Mar 11 2010
Comments