A382155 a(n) = (n+1)! if n <= 2; thereafter a(n) = 4*n if n even or 2*n if n odd.
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
Keywords
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).
Programs
-
Mathematica
Join[{1, 2, 6}, Riffle[4*# + 2, 8*(# + 1)]] & [Range[50]] (* Paolo Xausa, Mar 24 2025 *)
-
Python
def A382155(n): return (1,2,6)[n] if n<3 else n<<(2>>(n&1)) # Chai Wah Wu, Mar 24 2025
Formula
G.f.: (-2*x^6+5*x^4+2*x^3+4*x^2+2*x+1)/(1-x^2)^2.
Comments