

A004523


Two even followed by one odd.


44



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

Guenther Rosenbaum showed that the sequence represents the optimal number of guesses in the static Mastermind game with two pegs. Namely, the optimal number of static guesses equals 2k, if the number of colors is either (3k  1) or 3k and is (2k + 1), if the number of colors is (3k + 1), k >= 1.  Alex Bogomolny, Mar 06 2002
First differences are in A011655.  R. J. Mathar, Mar 19 2008
a(n+1) is the maximum number of wins by a team in a sequence of n basketball games if the team's longest winning streak is 2 games. See example below. In general, floor(k(n+1)/(k+1)) gives the maximum number of wins in n games when the longest winning streak is of length k.  Dennis P. Walsh, Apr 18 2012
Sum(n>=2, 1/a(n)^k)=sum(j>=1, sum(i=1..2, 1/(i*j)^k))= Zeta(k)^2Zeta(k)*Zeta(k,3), where Zeta is the generalized Riemann Zeta function, for the case k=2 this sum is 5*Pi^2/24.  Enrique Pérez Herrero, Jun 25 2012.


LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..2000
G. Rosenbaum, (Static)Mastermind
Paul B. Slater, Hypergeometric/DifferenceEquationBased Separability Probability Formulas and Their Asymptotics for Generalized TwoQubit States Endowed with Random Induced Measure, arXiv preprint, 2015.
See also Static Mastermind Game
Index entries for linear recurrences with constant coefficients, signature (1,0,1,1).


FORMULA

G.f.: (x^2+2*x^3+2*x^4+x^5)/(1x^3)^2, not reduced.  Len Smiley (smiley(AT)math.uaa.alaska.edu)
a(n) = Floor(2n/3).
a(0) = a(1) = 0, a(n) = n1floor(a(n1)/2).  Benoit Cloitre, Nov 26 2002
a(n) = a(n1)+(1/2)((1)^Floor[(2n+2)/3]+1), a(0)=0.  Mario Catalani (mario.catalani(AT)unito.it), Oct 20 2003
a(n) = sum{k=0..n1, mod(Fib(k), 2)}.  Paul Barry, May 31 2005
a(n) = A004773(n)  A004396(n).  Reinhard Zumkeller, Aug 29 2005
O.g.f.: x^2*(1+x)/((1+x)^2*(1+x+x^2)).  R. J. Mathar, Mar 19 2008
a(n) = 2*(1+Sum{k=0..n}{1/9*[ 2*(k mod 3)+((k+1) mod 3)+4*((k+2) mod 3)]}+{[(n+2) mod 3] mod 2}, with n>=0. Paolo P. Lava, Oct 02 2008


EXAMPLE

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 winloss sequence with 7 wins is wwlwwlwwlw.  Dennis P. Walsh, Apr 18 2012


MAPLE

seq(floor(2n/3), n=0..75);


MATHEMATICA

Table[ Floor[2n/3], {n, 0, 75} ]


PROG

(Haskell)
a004523 n = a004523_list !! n
a004523_list = 0 : 0 : 1 : map (+ 2) a004523_list
 Reinhard Zumkeller, Nov 06 2012
(PARI) a(n)=2*n\3 \\ Charles R Greathouse IV, Sep 02 2015


CROSSREFS

Cf. A004396.
Zero followed by partial sums of A011655.
Sequence in context: A156301 A195124 A032509 * A038372 A121930 A020909
Adjacent sequences: A004520 A004521 A004522 * A004524 A004525 A004526


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane


EXTENSIONS

Dead link fixed by Nathaniel Johnston, Sep 20 2012


STATUS

approved



