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.

Original entry on oeis.org

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

Views

Author

Jaume Oliver Lafont, Mar 20 2009

Keywords

Comments

Adjacent nodes are not allowed to have the same color.

Crossrefs

Programs

  • Mathematica
    PadRight[{0, 1, 2}, 100, {4, 3}] (* Paolo Xausa, Apr 22 2024 *)
  • 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

Formula

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