login
A382155
a(n) = (n+1)! if n <= 2; thereafter a(n) = 4*n if n even or 2*n if n odd.
3
1, 2, 6, 6, 16, 10, 24, 14, 32, 18, 40, 22, 48, 26, 56, 30, 64, 34, 72, 38, 80, 42, 88, 46, 96, 50, 104, 54, 112, 58, 120, 62, 128, 66, 136, 70, 144, 74, 152, 78, 160, 82, 168, 86, 176, 90, 184, 94, 192, 98, 200, 102, 208, 106, 216, 110, 224, 114, 232, 118, 240, 122, 248, 126, 256, 130, 264, 134, 272, 138, 280, 142, 288, 146, 296
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
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.
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
Partial sums give A382156.
Sequence in context: A056136 A349288 A098571 * A194120 A161503 A019076
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 23 2025
STATUS
approved