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 A187220 #130 Feb 22 2023 18:27:13 %S A187220 0,1,3,7,15,23,31,47,71,87,95,111,135,159,191,247,311,343,351,367,391, %T A187220 415,447,503,567,607,639,695,767,847,967,1143,1303,1367,1375,1391, %U A187220 1415,1439,1471,1527,1591,1631,1663,1719,1791,1871,1991,2167,2327,2399,2431 %N A187220 Gullwing sequence (see Comments lines for precise definition). %C A187220 The Gullwing (or G-toothpick) sequence is a special type of toothpick sequence. It appears that this is a superstructure of A139250. %C A187220 We define a "G-toothpick" to consist of two arcs of length Pi/2 forming a "gullwing" whose total length is equal to Pi = 3.141592... %C A187220 A gullwing-shaped toothpick or G-toothpick or simply "gull" is formed by two Q-toothpicks (see A187210). %C A187220 A G-toothpick has a midpoint and two endpoints. An endpoint is said to be "exposed" if it is not the midpoint or endpoint of any other G-toothpick. %C A187220 The sequence gives the number of G-toothpicks in the structure after n stages. A187221 (the first differences) gives the number of G-toothpicks added at n-th stage. %C A187220 a(n) is also the diameter of a circle whose circumference equals the total length of all gulls in the gullwing structure after n stages. %C A187220 It appears that the gullwing pattern has a recursive, fractal-like structure. The animation shows the fractal-like behavior. %C A187220 Note that the structure contains many different types of geometrical figures, for example: circles, hearts, etc. All figures are formed by arcs. %C A187220 It appears that there are infinitely many types of circular shapes, which are related to the rectangles of the toothpick structure of A139250. %C A187220 It also appears that the structure contains a nice pattern formed by distinct modular substructures: one central cross surrounded by several asymmetrical crosses (or "hidden crosses") of distinct sizes, and also several "nuclei" of crosses. This pattern is essentially similar to the crosses of A139250 but here the structure is harder to see. For example, consider the nucleus of a cross; in the toothpick structure a nucleus is formed by two squares and two rectangles but here a nucleus is formed by two circles and two hearts. %C A187220 It appears furthermore that this structure has connections with the square-cross fractal and with the T-square fractal, just as in the case of the toothpick structure of A139250. %C A187220 For more information see A139250 and A187210. %C A187220 It appears this is also the connection between A147562 (the Ulam-Warburton cellular automaton) and the toothpick sequence A139250. The behavior of the function is similar to A147562 but here the structure is more complex. (see Plot 2 button: A147562 vs A187220). - _Omar E. Pol_, Mar 11 2011, Mar 13 2011 %C A187220 From _Omar E. Pol_, Mar 25 2011: (Start) %C A187220 If we remove the first gull of the structure so we can see that there is a correspondence between the gullwing structure and the I-toothpick structure of A139250, for example: a pair of opposite gulls in horizontal position in the gullwing structure is equivalent to a vertical I-toothpick with length 4 in the I-toothpick structure, such that the midpoint of each horizontal gull coincides with the midpoint of each vertical toothpick of the I-toothpick. See A160164. %C A187220 Also, B-toothpick sequence. We define a "B-toothpick" to consist of four arcs of length Pi/2 forming a "bell" similar to the Gauss function. A Bell-shaped toothpick or B-toothpick or simply "bell" is formed by four Q-toothpicks (see A187210). A B-toothpick has length 2*Pi. The sequence gives the number of B-toothpicks in the structure after n stages. %C A187220 Also, if we remove the first bell of the structure, we can find a correspondence between this structure and the I-toothpick structure of A139250. In this case, for example, a pair of opposite bells in horizontal position is equivalent to a vertical I-toothpick with length 8 in the I-toothpick structure, such that the midpoint of each horizontal bell coincides with the midpoint of each vertical toothpick of the I-toothpick. See A160164. %C A187220 Also, for this sequence there is a third structure formed by isosceles right triangles since gulls or bells can be replaced by these triangles. %C A187220 Note that the size of the gulls, bells and triangles can be adjusted such that two or three of these structures can be overlaid. %C A187220 (End) %C A187220 Also, it appears that if we let k=floor(log_2(n)), then for n >= 1, a(2^k) = (4^(k+1) + 5)/3 - 2^(k+1). Otherwise, a(n)=(4^(k+1) + 5)/3 + 8*A153006(n-1-2^k). - _Christopher Hohl_, Dec 19 2018 %H A187220 Iain Fox, <a href="/A187220/b187220.txt">Table of n, a(n) for n = 0..10000</a> %H A187220 David Applegate, <a href="/A139250/a139250.anim.html">The movie version</a> %H A187220 David Applegate, <a href="/A187220/a187220.pdf">Illustration for a(16) = 311</a> [Created from the movie version, see previous link] %H A187220 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 A187220 Brady Haran and N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=_UtCli1SgjI">Terrific Toothpick Patterns</a>, Numberphile video (2018). %H A187220 Omar E. Pol, <a href="http://www.polprimos.com/imagenespub/poltp050.jpg">Illustration of initial terms</a> %H A187220 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> %F A187220 a(n) = 1 + 2*A139250(n-1), for n >= 1. %F A187220 a(n) = 1 + A160164(n-1), for n >= 1. - [Suggested by _Omar E. Pol_, Mar 13 2011, proved by _Nathaniel Johnston_, Mar 22 2011] %F A187220 The formula involving A160164 can be seen by identifying a Gullwing in the n-th generation (n >= 2) with midpoint at (x,y) and endpoints at (x-1,y+1) and (x+1,y+1) with a toothpick in the (n-1)st generation with endpoints at (x,y-1) and (x,y+1) -- this toothpick from (x,y-1) to (x,y+1) should be considered as having length ONE (i.e., it is HALF of an I-toothpick). The formula involving A139250 follows as a result of the relationship between A139250 and A160164. %F A187220 a(n) = A147614(n-1) + A160124(n-1), n >= 2. - _Omar E. Pol_, Feb 15 2013 %F A187220 a(n) = 7 + 8*A153000(n-3), n >= 3. - _Omar E. Pol_, Feb 16 2013 %e A187220 On the infinite square grid we start at stage 0 with no G-toothpicks, so a(0) = 0. %e A187220 At stage 1 we place a G-toothpick: %e A187220 Midpoint : (0,-1) %e A187220 Endpoints: (-1,0) and (1,0) %e A187220 So a(1) = 1. There are two exposed endpoints. %e A187220 At stage 2 we place two G-toothpicks: %e A187220 Midpoint of the left G-toothpick : (-1,0) %e A187220 Endpoints of the left G-toothpick: (-2,1) and (-2,-1) %e A187220 Midpoint of the right G-toothpick : (1,0) %e A187220 Endpoints of the right G-toothpick: (2,1) and (2,-1) %e A187220 So a(2) = 1+2 = 3. There are four exposed endpoints. %e A187220 And so on... %t A187220 Join[{0, 1}, Rest[CoefficientList[Series[(2 x / ((1 - x) (1 + 2 x))) (1+2 x Product[1 + x^(2^k - 1) + 2 x^(2^k), {k, 0, 20}]), {x, 0, 53}], x] + 1 ]] (* _Vincenzo Librandi_, Jul 02 2017 *) %o A187220 (Python) %o A187220 def msb(n): %o A187220 t=0 %o A187220 while n>>t>0: t+=1 %o A187220 return 2**(t - 1) %o A187220 def a139250(n): %o A187220 k=(2*msb(n)**2 + 1)//3 %o A187220 return 0 if n==0 else k if n==msb(n) else k + 2*a139250(n - msb(n)) + a139250(n - msb(n) + 1) - 1 %o A187220 def a(n): return 0 if n==0 else 1 + 2*a139250(n - 1) %o A187220 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jul 01 2017 %o A187220 (PARI) A139250(n) = my(msb(m) = 2^(#binary(m)-1), k = (2*msb(n)^2 + 1) / 3); if(n==msb(n), k , k + 2*A139250(n-msb(n)) + A139250(n - msb(n) + 1) - 1) %o A187220 a(n) = if(n<2, n, 1 + 2*A139250(n-1)) \\ _Iain Fox_, Dec 10 2018 %Y A187220 Cf. A002450, A139250, A147562, A160164, A187210, A187221, A187222. %K A187220 nonn,easy %O A187220 0,3 %A A187220 _Omar E. Pol_, Mar 07 2011