A004523 Two even followed by one odd; or floor(2n/3).
0, 0, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 30, 30, 31, 32, 32, 33, 34, 34, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 44, 44, 45, 46
Offset: 0
Examples
For n=11, we have a(11)=7 since there are at most 7 wins by a team in a sequence of 10 games in which its longest winning streak is 2 games. One such win-loss sequence with 7 wins is wwlwwlwwlw. - _Dennis P. Walsh_, Apr 18 2012
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..2000
- E. Ackerman and R. Pinchasi, Covering a chessboard with staircase walks, Discrete Mathematics, 313 (2013).
- Allan Bickle, Two Short Proofs on Total Domination, Discuss Math Graph Theory, 33 2 (2013), 457-459.
- Alex Bogomolny and Don Greenwell, Static Mastermind Game, Cut The Knot!, December 1999.
- R. C. Brigham, J. R. Carrington, and R. P. Vitray, Connected graphs with maximum total domination number, J. Combin. Comput. Combin. Math. 34 (2000), 81-96.
- E. J. Cockayne, R. M. Dawes, and S. T. Hedetniemi, Total domination in graphs, Networks 10 (1980), 211-219.
- Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint, 2016.
- Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47.
- Francis Laclé, 2-adic parity explorations of the 3n+ 1 problem, hal-03201180v2 [cs.DM], 2021.
- G. Rosenbaum, (Static-)Mastermind.
- Paul B. Slater, Formulas for Generalized Two-Qubit Separability Probabilities, arXiv:1609.08561 [quant-ph], 2016.
- Paul B. Slater, Hypergeometric/Difference-Equation-Based Separability Probability Formulas and Their Asymptotics for Generalized Two-Qubit States Endowed with Random Induced Measure, arXiv:1504.04555 [quant-ph], 2015.
- Eric Weisstein's World of Mathematics, Johnson Graph.
- Eric Weisstein's World of Mathematics, Total Domination Number.
- Eric Weisstein's World of Mathematics, Triangular Graph.
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
Crossrefs
Programs
-
Haskell
a004523 n = a004523_list !! n a004523_list = 0 : 0 : 1 : map (+ 2) a004523_list -- Reinhard Zumkeller, Nov 06 2012
-
Magma
[Floor(2*n/3): n in [0..50]]; // G. C. Greubel, Nov 02 2017
-
Maple
seq(floor(2n/3), n=0..75);
-
Mathematica
Table[Floor[2 n/3], {n, 0, 75}] Table[(6 n + 3 Cos[2 n Pi/3] - Sqrt[3] Sin[2 n Pi/3] - 3)/9, {n, 0, 20}] (* Eric W. Weisstein, Apr 08 2018 *) Floor[2 Range[0, 20]/3] (* Eric W. Weisstein, Apr 08 2018 *) LinearRecurrence[{1, 0, 1, -1}, {0, 1, 2, 2}, {0, 20}] (* Eric W. Weisstein, Apr 08 2018 *) CoefficientList[Series[x^2 (1 + x)/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Apr 08 2018 *) Table[If[EvenQ[n],{n,n},n],{n,0,50}]//Flatten (* Harvey P. Dale, May 27 2021 *)
-
PARI
a(n)=2*n\3 \\ Charles R Greathouse IV, Sep 02 2015
Formula
G.f.: (x^2 + 2*x^3 + 2*x^4 + x^5)/(1 - x^3)^2, not reduced. - Len Smiley
a(n) = floor(2*n/3).
a(0) = a(1) = 0; for n > 1, a(n) = n - 1 - floor(a(n-1)/2). - Benoit Cloitre, Nov 26 2002
a(n) = a(n-1) + (1/2)*((-1)^floor((2*n+2)/3)+1), with a(0)=0. - Mario Catalani (mario.catalani(AT)unito.it), Oct 20 2003
a(n) = Sum_{k=0..n-1} (Fibonacci(k) mod 2). - Paul Barry, May 31 2005
O.g.f.: x^2*(1 + x)/((1 - x)^2*(1 + x + x^2)). - R. J. Mathar, Mar 19 2008
a(n) = ceiling(2*(n-1)/3) = n - 1 - floor((n-1)/3). - Bruno Berselli, Jan 18 2017
a(n) = (6*n - 3 + 2*sqrt(3)*sin(2*(n-2)*Pi/3))/9. - Wesley Ivan Hurt, Sep 30 2017
Sum_{n>=2} (-1)^n/a(n) = Pi/4 (A003881). - Amiram Eldar, Sep 29 2022
Comments