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.

A158515 Number of colors needed to paint a wheel graph on n nodes.

This page as a plain text file.
%I A158515 #19 Feb 16 2025 08:33:10
%S A158515 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,
%T A158515 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,
%U A158515 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
%N A158515 Number of colors needed to paint a wheel graph on n nodes.
%C A158515 Adjacent nodes are not allowed to have the same color.
%H A158515 Antti Karttunen, <a href="/A158515/b158515.txt">Table of n, a(n) for n = 0..1001</a>
%H A158515 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/WheelGraph.html">Wheel Graph</a>
%H A158515 Wikipedia, <a href="http://en.wikipedia.org/wiki/Wheel_graph">Wheel graph</a>
%H A158515 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).
%F A158515 G.f.: x*(1+2*x+2*x^2+2*x^3)/(1-x^2)
%t A158515 PadRight[{0, 1, 2}, 100, {4, 3}] (* _Paolo Xausa_, Apr 22 2024 *)
%o A158515 (PARI) a(n)=if(n<4,n,4-n%2)
%o A158515 (Scheme) (define (A158515 n) (if (< n 4) n (- 4 (modulo n 2)))) ;; _Antti Karttunen_, Sep 14 2017
%Y A158515 Cf. A158411, A158478.
%K A158515 nonn,easy
%O A158515 0,3
%A A158515 _Jaume Oliver Lafont_, Mar 20 2009