cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A004523 Two even followed by one odd; or floor(2n/3).

Original entry on oeis.org

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

Views

Author

Keywords

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)^2 - Zeta(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
a(n) is the pattern of (0+2k, 0+2k, 1+2k), k>=0. a(n) is also the number of odd integers divisible by 3 in ]2(n-1)^2, 2n^2[. - Ralf Steiner, Jun 25 2017
a(n) is also the total domination number of the n-triangular (Johnson) graph for n > 2. - Eric W. Weisstein, Apr 09 2018
a(n) is the maximum total domination number of connected graphs with order n>2. The extremal graphs are "brushes", as defined in the links below. - Allan Bickle, Dec 24 2021
a(n) is the minimal number of ascending or descending staircase walks necessary to cover a chessboard of size n-1, for n > 1. See Ackerman and Pinchasi. - Sela Fried, Jan 16 2023

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
		

Crossrefs

Zero followed by partial sums of A011655.

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
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) = 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

A057353 a(n) = floor(3n/4).

Original entry on oeis.org

0, 0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 48, 48, 49, 50, 51, 51, 52, 53, 54
Offset: 0

Views

Author

Keywords

Comments

The cyclic pattern (and numerator of the gf) is computed using Euclid's algorithm for GCD.
For n >= 2, a(n) is the number of different integers that can be written as floor(k^2/n) for k = 1, 2, 3, ..., n-1. Generalization of the 1st problem proposed during the 15th Balkan Mathematical Olympiad in 1998 where the question was asked for n = 1998 with a(1998) = 1498. - Bernard Schott, Apr 22 2022
For n > 1, a(n) is also the Hadwiger number of the (n+1)-cycle complement graph (up to at least n = 16). - Eric W. Weisstein, Mar 10 2025

References

  • N. Dershowitz and E. M. Reingold, Calendrical Calculations, Cambridge University Press, 1997.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1994.

Crossrefs

Programs

Formula

G.f.: (1+x+x^2)*x^2/((1-x)*(1-x^4)). - Bruce Corrigan (scentman(AT)myfamily.com), Jul 03 2002
For all m>=0 a(4m)=0 mod 3; a(4m+1)=0 mod 3; a(4m+2)= 1 mod 3; a(4m+3) = 2 mod 3
a(n) = A002378(n) - A173562(n). - Reinhard Zumkeller, Feb 21 2010
a(n+1) = A140201(n) - A002265(n+1). - Reinhard Zumkeller, Jan 26 2011
a(n) = n-1 - A002265(n-1) = ( A007310(n) + A057077(n+1) )/4 for n>0. a(n) = a(n-1)+a(n-4)-a(n-5) for n>4. - Bruno Berselli, Jan 28 2011
a(n) = 1/8*(6*n + 2*cos((Pi*n)/2) + cos(Pi*n) - 2*sin((Pi*n)/2) - 3). - Ilya Gutkovskiy, Sep 18 2015
a(4n) = a(4n+1). - Altug Alkan, Sep 26 2015
Sum_{n>=2} (-1)^n/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Sep 29 2022
Showing 1-2 of 2 results.