OFFSET
0,2
COMMENTS
Let G denote the 2-dimensional grid obtained from the square grid Z X Z by deleting the vertices with both coordinates odd and the four edges at each of those vertices (see link). G has vertices with valency either 2 (one coordinate even and one odd, indicated by X) or 4 (both coordinates even, indicated by O). The present sequence is the coordination sequence of G with respect to a vertex of valency 2.
See A382154 for further information.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..10000
N. J. A. Sloane, The grid G (Each X-node is joined to two O-nodes, and each O-node to four X-nodes.)
N. J. A. Sloane, Illustrates the initial terms of the coordination sequence of G with respect to a vertex of degree 2. E.g. the 6 red vertices labeled 3 correspond to a(3) = 6, and the 16 blue vertices labeled 4 correspond to a(4) = 16.
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
G.f.: (-2*x^6+5*x^4+2*x^3+4*x^2+2*x+1)/(1-x^2)^2.
MATHEMATICA
Join[{1, 2, 6}, Riffle[4*# + 2, 8*(# + 1)]] & [Range[50]] (* Paolo Xausa, Mar 24 2025 *)
PROG
(Python)
def A382155(n): return (1, 2, 6)[n] if n<3 else n<<(2>>(n&1)) # Chai Wah Wu, Mar 24 2025
(PARI) a(n)=if(n>2, 2*n*[2, 1][n%2+1], [1, 2, 6][n+1]) \\ Charles R Greathouse IV, May 28 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 23 2025
STATUS
approved
