The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A217123 Number of possible ordered pairs (x, y) where x is the number of beads adjacent to at least one black bead and y the number of beads adjacent to at least one white bead in a binary necklace of length n. 1
 2, 3, 4, 6, 8, 10, 14, 18, 22, 26, 32, 38, 44, 50, 58, 66, 74, 82, 92, 102, 112, 122, 134, 146, 158, 170, 184, 198, 212, 226, 242, 258, 274, 290, 308, 326, 344, 362, 382, 402, 422, 442, 464, 486, 508, 530, 554, 578, 602, 626, 652, 678 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1). FORMULA For p>0, 0<=q<4, a(4*p+q) = 4*p^2 + 2*p*q (+4 if q=3, +2 otherwise). a(n) = (13-(-1)^n+2*(-i)^n+2*i^n+2*n^2)/8, where i=sqrt(-1). G.f.: x*(x^7-2*x^6-x^5+2*x^4-x^3+x-2)/((x-1)^3*(x+1)*(x^2+1)). [Colin Barker, Oct 04 2012] EXAMPLE 0: (0,0) 1: (1,0), (0,1) 2: (2,0), (1,1), (0,2) 3: (3,0), (3,2), (2,3), (0,3) 4: (4,4), (2,2), (0,4), (4,2), (2,4), (4,0) 5: (5,4), (5,0), (4,5), (5,2), (0,5), (4,3), (2,5), (3,4) In the binary necklace 01010, four beads are next to a zero and three are next to a one, yielding the pair (4,3). MAPLE A217123 := proc(n)     local p, q ;     if n < 4 then         return op(n, [2, 3, 4]) ;     end if;     q := n mod 4 ;     p := floor(n/4) ;     if q =3 then         4*p^2+2*p*q +4;     else         4*p^2+2*p*q +2;     end if; end proc: # R. J. Mathar, Sep 27 2012 CROSSREFS Sequence in context: A220851 A028290 A003107 * A014977 A008583 A053253 Adjacent sequences:  A217120 A217121 A217122 * A217124 A217125 A217126 KEYWORD nonn,easy AUTHOR Andrew Woods, Sep 26 2012 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.

Last modified May 18 04:22 EDT 2021. Contains 343994 sequences. (Running on oeis4.)