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.
%I A382155 #35 Mar 24 2025 11:53:50 %S A382155 1,2,6,6,16,10,24,14,32,18,40,22,48,26,56,30,64,34,72,38,80,42,88,46, %T A382155 96,50,104,54,112,58,120,62,128,66,136,70,144,74,152,78,160,82,168,86, %U A382155 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 %N A382155 a(n) = (n+1)! if n <= 2; thereafter a(n) = 4*n if n even or 2*n if n odd. %C A382155 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. %C A382155 See A382154 for further information. %H A382155 Paolo Xausa, <a href="/A382155/b382155.txt">Table of n, a(n) for n = 0..10000</a> %H A382155 N. J. A. Sloane, <a href="/A382154/a382154.jpg">The grid G</a> (Each X-node is joined to two O-nodes, and each O-node to four X-nodes.) %H A382155 N. J. A. Sloane, <a href="/A382155/a382155.jpg">Illustrates the initial terms of the coordination sequence of G with respect to a vertex of degree 2.</a> 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. %H A382155 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A382155 G.f.: (-2*x^6+5*x^4+2*x^3+4*x^2+2*x+1)/(1-x^2)^2. %t A382155 Join[{1, 2, 6}, Riffle[4*# + 2, 8*(# + 1)]] & [Range[50]] (* _Paolo Xausa_, Mar 24 2025 *) %o A382155 (Python) %o A382155 def A382155(n): return (1,2,6)[n] if n<3 else n<<(2>>(n&1)) # _Chai Wah Wu_, Mar 24 2025 %Y A382155 Partial sums give A382156. %Y A382155 Cf. A382154, A319384. %K A382155 nonn %O A382155 0,2 %A A382155 _N. J. A. Sloane_, Mar 23 2025