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 A194274 #66 Jan 31 2024 13:11:42 %S A194274 0,1,4,8,12,17,24,32,40,49,60,72,84,97,112,128,144,161,180,200,220, %T A194274 241,264,288,312,337,364,392,420,449,480,512,544,577,612,648,684,721, %U A194274 760,800,840,881,924,968,1012,1057,1104,1152,1200,1249,1300,1352,1404 %N A194274 Concentric square numbers (see Comments lines for definition). %C A194274 Cellular automaton on the first quadrant of the square grid. The sequence gives the number of cells "ON" in the structure after n-th stage. A098181 gives the first differences. For a definition without words see the illustration of initial terms in the example section. For other concentric polygonal numbers see A194273, A194275 and A032528. %C A194274 Also, union of A046092 and A077221, the bisections of this sequence. %C A194274 Also row sums of an infinite square array T(n,k) in which column k lists 4*k-1 zeros followed by the numbers A008574 (see example). %H A194274 Arkadiusz Wesolowski, <a href="/A194274/b194274.txt">Table of n, a(n) for n = 0..10000</a> %H A194274 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a> %H A194274 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4,4,-3,1). %F A194274 a(n) = n^2 - a(n-2), with a(0)=0, a(1)=1. - _Alex Ratushnyak_, Aug 03 2012 %F A194274 From _R. J. Mathar_, Aug 22 2011: (Start) %F A194274 G.f.: x*(1 + x)/((1 + x^2)*(1 - x)^3). %F A194274 a(n) = (A005563(n) - A056594(n-1))/2. (End) %F A194274 a(n) = a(-n-2) = (2*n*(n+2) + (1-(-1)^n)*i^(n+1))/4, where i=sqrt(-1). - _Bruno Berselli_, Sep 22 2011 %F A194274 a(n) = floor(3*n/4) + floor((n*(n+2)+1)/2) - floor((3*n+1)/4). - _Arkadiusz Wesolowski_, Nov 08 2011 %F A194274 a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5), with a(0)=0, a(1)=1, a(2)=4, a(3)=8, a(4)=12. - _Harvey P. Dale_, Sep 11 2013 %F A194274 E.g.f.: (exp(x)*x*(3 + x) - sin(x))/2. - _Stefano Spezia_, Feb 26 2023 %e A194274 Using the numbers A008574 we can write: %e A194274 0, 1, 4, 8, 12, 16, 20, 24, 28, 32, 36, ... %e A194274 0, 0, 0, 0, 0, 1, 4, 8, 12, 16, 20, ... %e A194274 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, ... %e A194274 And so on. %e A194274 =========================================== %e A194274 The sums of the columns give this sequence: %e A194274 0, 1, 4, 8, 12, 17, 24, 32, 40, 49, 60, ... %e A194274 ... %e A194274 Illustration of initial terms: %e A194274 . o o o o o o %e A194274 . o o o o o o o %e A194274 . o o o o o o o o o o %e A194274 . o o o o o o o o o o o o %e A194274 . o o o o o o o o o o %e A194274 . o o o o o o o o o o o o o o o o o o o o o %e A194274 . %e A194274 . 1 4 8 12 17 24 %t A194274 Table[Floor[3*n/4] + Floor[(n*(n + 2) + 1)/2] - Floor[(3*n + 1)/4], {n, 0, 52}] (* _Arkadiusz Wesolowski_, Nov 08 2011 *) %t A194274 RecurrenceTable[{a[0]==0,a[1]==1,a[n]==n^2-a[n-2]},a,{n,60}] (* or *) LinearRecurrence[{3,-4,4,-3,1},{0,1,4,8,12},60] (* _Harvey P. Dale_, Sep 11 2013 *) %o A194274 (Python) %o A194274 prpr = 0 %o A194274 prev = 1 %o A194274 for n in range(2,777): %o A194274 print(str(prpr), end=", ") %o A194274 curr = n*n - prpr %o A194274 prpr = prev %o A194274 prev = curr %o A194274 # _Alex Ratushnyak_, Aug 03 2012 %o A194274 (Python) %o A194274 def A194274(n): return (3*n>>2)+(n*(n+2)+1>>1)-(3*n+1>>2) # _Chai Wah Wu_, Jul 15 2023 %o A194274 (Magma) [n le 2 select n-1 else (n-1)^2 - Self(n-2): n in [1..61]]; // _G. C. Greubel_, Jan 31 2024 %o A194274 (SageMath) %o A194274 def A194274(n): return n if n<2 else n^2 - A194274(n-2) %o A194274 [A194274(n) for n in range(41)] # _G. C. Greubel_, Jan 31 2024 %Y A194274 Cf. A000290, A005563, A008574, A056594, A032528, A046092. %Y A194274 Cf. A077221, A085250, A098181, A194273, A194275. %K A194274 nonn,easy %O A194274 0,3 %A A194274 _Omar E. Pol_, Aug 20 2011