login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002264 Nonnegative integers repeated 3 times. 93
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,7

COMMENTS

Complement of A010872, since A010872(n)+3*a(n)=n. - Hieronymus Fischer, Jun 01 2007

Chvátal proved that, given an arbitrary n-gon, there exist a(n) points such that all points in the interior are visible from at least one of those points; further, for all n >= 3, there exists an n-gon which cannot be covered in this fashion with fewer than a(n) points. This is known as the "art gallery problem". - Charles R Greathouse IV, Aug 29 2012

LINKS

Table of n, a(n) for n=0..75.

Václav Chvátal, A combinatorial theorem in plane geometry, Journal of Combinatorial Theory, Series B 18 (1975), pp. 39-41, doi:10.1016/0095-8956(75)90061-1.

Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).

FORMULA

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

a(n) = -1 + Sum{k=0..n} (-2*(k mod 3)+((k+1) mod 3)+4*((k+2) mod 3))/9. - Paolo P. Lava, Jun 20 2007

a(n) = (3n-3-sqrt(3)*(1-2*cos(2*Pi*(n-1)/3))*sin(2*Pi*(n-1)/3)))/9. - Hieronymus Fischer, Sep 18 2007

a(n) = (n-A010872(n))/3. - Hieronymus Fischer, Sep 18 2007

Complex representation: a(n)=(3n-(1-r^n)*(1+r^n/(1-r)))/9 where r=exp(2*Pi/3*i)=(-1+sqrt(3)*i)/2 and i=sqrt(-1). - Hieronymus Fischer, Sep 18 2007

a(n) = Sum_{k=0..n-1} A022003(k). - Hieronymus Fischer, Sep 18 2007

G.f.: x^3/((1-x)*(1-x^3)). - Hieronymus Fischer, Sep 18 2007

Also, floor((n^3-1)/(3*n^2)) (n>=1) will produce this sequence. Moreover, floor((n^3-n^2)/(3*n^2-2*n)) (n>=1) will produce this sequence as well. - Mohammad K. Azarian, Nov 08 2007

a(n) = (n-1+2*sin(4(n+2)Pi/3)/sqrt(3))/3. [Jaume Oliver Lafont, Dec 05 2008]

For n >= 3, a(n) = floor(log_3(3^a(n-1)+3^a(n-2)+3^a(n-3))). [Vladimir Shevelev, Jun 22 2010]

a(n) = (n-3+A010872(n-1)+A010872(n-2))/3 using Zumkeller's 2008 formula in A010872. - Adriano Caroli, Nov 23 2010

a(n) = A004526(n) - A008615(n). - Reinhard Zumkeller, Apr 28 2014

a(2*n) = A004523(n) and a(2*n+1) = A004396(n). - L. Edson Jeffery, Jul 30 2014

a(n) = n-2-a(n-1)-a(n-2) for n > 1 with a(0) = a(1) = 0. - Derek Orr, Apr 28 2015

From Wesley Ivan Hurt, May 27 2015: (Start)

a(n) = a(n-1) + a(n-3) - a(n-4), n>4.

a(n) = (n-1+0^((-1)^(n/3)-(-1)^n)-0^((-1)^(n/3)*(-1)^(1/3)+(-1)^n))/3. (End)

MAPLE

P:=proc(n) local a, i, k; for i from 0 by 1 to n do a:=-1+sum('1/9*(-2*(k mod 3)+((k+1) mod 3)+4*((k+2) mod 3))', 'k'=0..i); print(a); od; end: P(100); # Paolo P. Lava, Jun 20 2007

# Alternative:

seq(i$3, i=0..100); # Robert Israel, Aug 04 2014

MATHEMATICA

Flatten[Table[{n, n, n}, {n, 0, 25}]] (* Harvey P. Dale, Jun 09 2013 *)

PROG

(PARI) a(n)=n\3  /* Jaume Oliver Lafont, Mar 25 2009 */

(Sage) [floor(n/3) for n in xrange(0, 79)] # Zerinvary Lajos, Dec 01 2009

(Haskell)

a002264 n = a002264_list !! n

a002264_list = 0 : 0 : 0 : map (+ 1) a002264_list

-- Reinhard Zumkeller, Nov 06 2012, Apr 16 2012

(PARI) v=[0, 0]; for(n=2, 50, v=concat(v, n-2-v[#v]-v[#v-1])); v \\ Derek Orr, Apr 28 2015

(MAGMA) [Floor(n/3): n in [0..100]]; // Vincenzo Librandi, Apr 29 2015

(MAGMA) &cat [[n, n, n]: n in [0..30]]; // Bruno Berselli, Apr 29 2015

CROSSREFS

Cf. A001477, A008620, A004526, A002265, A002266, A010761, A010762, A110532, A110533, A010872, A010873, A010874.

Partial sums give A130518.

Cf. A004523 interlaced with A004396.

Sequence in context: A261231 A296357 A086161 * A008620 A104581 A261916

Adjacent sequences:  A002261 A002262 A002263 * A002265 A002266 A002267

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

Clarified my formulas Mohammad K. Azarian, Aug 01 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 01:39 EDT 2018. Contains 313840 sequences. (Running on oeis4.)