login
The OEIS is supported by the many generous donors 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. 10
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
FORMULA
G.f.: x*(1+2*x+2*x^2)/(1-x^2).
E.g.f.: 2*cosh(x) + 3*sinh(x) - 2*(1 + x). - Stefano Spezia, Mar 24 2020
MATHEMATICA
Join[Range[0, 1], ConstantArray[{2, 3}, 20]] // Flatten (* Robert Price, Jun 15 2020 *)
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
Sequence in context: A368405 A356464 A010693 * A139713 A171465 A178620
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)