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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A158478 Number of colors needed to paint n sectors of a circle. 9
0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

No pair of adjacent sectors can have the same color.

For n > 0: smallest prime factor of A098548(n).

LINKS

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

FORMULA

G.f.: x*(1+2*x+2*x^2)/(1-x^2)

a(n)=(5/2)-[(-1)^n]/2-2*[C(2*n,n) mod 2]-2*{C[(n+1)^2,n+3] mod 2}, with n>=0 [From Paolo P. Lava, Mar 31 2009]

PROG

(PARI) a(n)=if(n<4, n, 2+n%2)

(Haskell)

a158478 n = if n < 4 then n else 2 + mod n 2

a158478_list = [0..3] ++ cycle [2, 3]

-- Reinhard Zumkeller, Nov 30 2014

CROSSREFS

Cf. A010693, A158411.

Cf. A020639, A098548.

Sequence in context: A307200 A165587 A010693 * A139713 A171465 A178620

Adjacent sequences:  A158475 A158476 A158477 * A158479 A158480 A158481

KEYWORD

nonn

AUTHOR

Jaume Oliver Lafont, Mar 20 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 00:38 EDT 2019. Contains 323528 sequences. (Running on oeis4.)