login
A158515
Number of colors needed to paint a wheel graph on n nodes.
3
0, 1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4
OFFSET
0,3
COMMENTS
Adjacent nodes are not allowed to have the same color.
LINKS
Eric Weisstein's World of Mathematics, Wheel Graph
Wikipedia, Wheel graph
FORMULA
G.f.: x*(1+2*x+2*x^2+2*x^3)/(1-x^2)
MATHEMATICA
PadRight[{0, 1, 2}, 100, {4, 3}] (* Paolo Xausa, Apr 22 2024 *)
PROG
(PARI) a(n)=if(n<4, n, 4-n%2)
(Scheme) (define (A158515 n) (if (< n 4) n (- 4 (modulo n 2)))) ;; Antti Karttunen, Sep 14 2017
CROSSREFS
Sequence in context: A182101 A242289 A349229 * A285884 A123709 A165482
KEYWORD
nonn,easy
AUTHOR
Jaume Oliver Lafont, Mar 20 2009
STATUS
approved