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 A077221 #72 Jan 16 2023 08:18:02 %S A077221 0,1,8,17,32,49,72,97,128,161,200,241,288,337,392,449,512,577,648,721, %T A077221 800,881,968,1057,1152,1249,1352,1457,1568,1681,1800,1921,2048,2177, %U A077221 2312,2449,2592,2737,2888,3041,3200,3361,3528,3697,3872,4049,4232 %N A077221 a(0) = 0 and then alternately even and odd numbers in increasing order such that the sum of any two successive terms is a square. %C A077221 This sequence arises from reading the line from 0, in the direction 0, 1, ... and the same line from 0, in the direction 0, 8, ..., in the square spiral whose vertices are the triangular numbers A000217. Cf. A139591, etc. - _Omar E. Pol_, May 03 2008 %C A077221 The general formula for alternating sums of powers of odd integers is in terms of the Swiss-Knife polynomials P(n,x) A153641 (P(n,0)-(-1)^k*P(n,2*k))/2. Here n=2, thus a(k) = |(P(2,0)-(-1)^k*P(2,2*k))/2|. - _Peter Luschny_, Jul 12 2009 %C A077221 Axis perpendicular to A046092 in the square spiral whose vertices are the triangular numbers A000217. See the comment above. - _Omar E. Pol_, Sep 14 2011 %C A077221 Column 8 of A195040. - _Omar E. Pol_, Sep 28 2011 %C A077221 Concentric octagonal numbers. A139098 and A069129 interleaved. - _Omar E. Pol_, Sep 17 2011 %C A077221 Subsequence of A194274. - _Bruno Berselli_, Sep 22 2011 %C A077221 Partial sums of A047522. - _Reinhard Zumkeller_, Jan 07 2012 %C A077221 Alternating sum of the first n odd squares in decreasing order, n >= 1. Also number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton. The rules are: on the infinite square grid, start with all cells OFF, so a(0) = 0. Turn a single cell to the ON state, so a(1) = 1. At each subsequent step, the neighbor cells of each cell of the old generation are turned ON, and the cells of the old generation are turned OFF. Here "neighbor" refers to the eight adjacent cells of each ON cell. See example. - _Omar E. Pol_, Feb 16 2014 %H A077221 Vincenzo Librandi, <a href="/A077221/b077221.txt">Table of n, a(n) for n = 0..10000</a> %H A077221 Bruno Berselli, <a href="http://www.base5forum.it/upload/A_077221.jpg">An origin of A077221 (illustration)</a> (see Pol's comment). %H A077221 N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>. %H A077221 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1). %H A077221 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>. %F A077221 a(2n) = 8*n^2, a(2n+1) = 8*n(n+1) + 1. %F A077221 From _Ralf Stephan_, Mar 31 2003: (Start) %F A077221 a(n) = 2*n^2 + 4*n + 1 [+1 if n is odd] with a(0)=1. %F A077221 G.f.: x*(x^2+6*x+1)/(1-x)^3/(1+x). (End) %F A077221 Row sums of triangle A131925; binomial transform of (1, 7, 2, 4, -8, 16, -32, ...). - _Gary W. Adamson_, Jul 29 2007 %F A077221 a(n) = a(-n); a(n+1) = A195605(n) - (-1)^n. - _Bruno Berselli_, Sep 22 2011 %F A077221 a(n) = 2*n^2 + ((-1)^n-1)/2. - _Omar E. Pol_, Sep 28 2011 %F A077221 Sum_{n>=1} 1/a(n) = Pi^2/48 + tan(Pi/(2*sqrt(2)))*Pi /(4*sqrt(2)). - _Amiram Eldar_, Jan 16 2023 %e A077221 From _Omar E. Pol_, Feb 16 2014: (Start) %e A077221 Illustration of initial terms as a cellular automaton: %e A077221 . %e A077221 . O O O O O O O %e A077221 . O O O O O O O %e A077221 . O O O O O O O O O O %e A077221 . O O O O O O O O O O %e A077221 . O O O O O O O O O O %e A077221 . O O O O O O O %e A077221 . O O O O O O O %e A077221 . %e A077221 . 1 8 17 32 %e A077221 . %e A077221 (End) %p A077221 a := n -> 2*n^2 - (n mod 2); # _Peter Luschny_, Jul 12 2009 %t A077221 a=1;lst={a};Do[b=n^2-a;AppendTo[lst,b];a=b,{n,3,6!,2}];lst (* _Vladimir Joseph Stephan Orlovsky_, May 18 2009 *) %o A077221 (Magma) [2*n^2 - (n mod 2): n in [0..50]]; // _Vincenzo Librandi_, Sep 22 2011 %o A077221 (Haskell) %o A077221 a077221 n = a077221_list !! n %o A077221 a077221_list = scanl (+) 0 a047522_list %o A077221 -- _Reinhard Zumkeller_, Jan 07 2012 %Y A077221 Cf. A032528, A069129, A077222, A131925, A139098, A194274, A195040, A195041, A195042, A195142. %K A077221 nonn,easy %O A077221 0,3 %A A077221 _Amarnath Murthy_, Nov 03 2002 %E A077221 Extended by _Ralf Stephan_, Mar 31 2003