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 A170890 #34 Feb 24 2021 02:48:19 %S A170890 0,1,2,4,7,10,14,21,29,37,43,53,61,71,83,103,123,139,151,165,173,183, %T A170890 195,215,235,253,271,295,317,345,385,441,493,531,559,581,589,599,611, %U A170890 631,651,669,687,711,733,761,801,857,909,949,983,1015,1037,1065,1105,1161 %N A170890 Toothpick sequence similar to A160406, but always staying outside the wedge, starting with a horizontal half-toothpick which protrudes from the vertex of the wedge. %C A170890 The initial half-tookpick makes an angle of 90 degrees w.r.t. the wedge's direction. This breaks the symmetry and explains the changing parity of the terms. - _M. F. Hasler_, Jan 29 2013 %H A170890 David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.] %H A170890 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> %e A170890 From _M. F. Hasler_, Jan 29 2013: (Start) %e A170890 The first steps are illustrated as follows, where two vertical "|" or three horizontal "_" correspond to one single full toothpick: %e A170890 : ___ ___ |___ ___| %e A170890 : ___ |___| |___| | |___| | %e A170890 : _ |_ |_ | |_| | |_| | | |_| %e A170890 : /\ |/\ |/\ |/\ ¯¯¯|/\ |¯¯¯|/\ %e A170890 : / \ / \ / \ / \ / \ / \ %e A170890 : %e A170890 : a(0)=0, a(1)=1, a(2)=2, a(3)=4, a(5)=7, a(6)=10, ... (End) %o A170890 (PARI) A170890(n, print_all=0)={ my( cnt=n>0, ee=[[1,1]], p=Set(vector(2*n-cnt,k,k-n-abs(k-n)*I)), c, d); for(i=2, n, print_all & print1(cnt","); p=setunion(p, Set(Mat(ee~)[, 1])); my(ne=[]); for(k=1, #ee, setsearch(p, c=ee[k][1]+d=ee[k][2]*I) || ne=setunion(ne, Set([[c, d]])); setsearch(p, c-2*d) || ne=setunion(ne, Set([[c-2*d, -d]]))); forstep( k=#ee=eval(ne), 2, -1, ee[k][1]==ee[k-1][1] & k-- & ee=vecextract(ee, Str("^"k"..", k+1))); cnt+=#ee); cnt} \\ - _M. F. Hasler_, Jan 29 2013 %Y A170890 See A170891 for the first differences. %Y A170890 Cf. A139250, A170886, A170888, A170892. %K A170890 nonn %O A170890 0,3 %A A170890 _Omar E. Pol_, Jan 09 2010 %E A170890 a(9) corrected by _Omar E. Pol_, following an observation by _Kevin Ryde_, Jan 29 2013 %E A170890 Terms beyond a(9) from _M. F. Hasler_, Jan 29 2013