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 A238549 #60 Jul 04 2023 11:36:20 %S A238549 1,2,6,8,16,20,36,44,76,92,156,188,316,380,636,764,1276,1532,2556, %T A238549 3068,5116,6140,10236,12284,20476,24572,40956,49148,81916,98300, %U A238549 163836,196604,327676,393212,655356,786428,1310716,1572860,2621436,3145724,5242876,6291452,10485756 %N A238549 a(n) is one fourth of the total number of free ends of 4 line segments expansion at n iterations (see Comments lines for definition). %C A238549 The initial pattern consists of 4 straight line segments which are the radii of a square. The next generations are scaled down by a factor of 1/sqrt(2) and rotated by an angle of Pi/4. Their free ends are the ends of elements that do not contact or cross the other ones. Overlaps among different generations are prohibited. See illustration in the links. %C A238549 We take the official definition to be that provided by the PARI program. From this the assertions in the Formula section follow (they were formerly stated as conjectures). - _N. J. A. Sloane_, Feb 24 2019 %C A238549 From _Georg Fischer_, Feb 20 2019: (Start) %C A238549 The following pattern can be seen for a(n) in base 2: %C A238549 n a(n) %C A238549 == ================== %C A238549 1 1 = 1_2 %C A238549 2 2 = 10_2 %C A238549 3 6 = 110_2 %C A238549 4 8 = 1000_2 %C A238549 5 16 = 10000_2 %C A238549 6 20 = 10100_2 %C A238549 7 36 = 100100_2 %C A238549 8 44 = 101100_2 %C A238549 9 76 = 1001100_2 %C A238549 10 92 = 1011100_2 %C A238549 11 156 = 10011100_2 %C A238549 12 188 = 10111100_2 %C A238549 13 316 = 100111100_2 %C A238549 14 380 = 101111100_2 %C A238549 15 636 = 1001111100_2 %C A238549 16 764 = 1011111100_2 %C A238549 (End) %H A238549 Kival Ngaokrajang, <a href="/A238549/a238549_3.pdf">Illustration of initial terms</a> %H A238549 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1, 2, -2). %F A238549 a(n) = 1 + Sum_{i=1..n-1} A143095(i). %F A238549 G.f.: x*(2*x^2+x+1) / ((x-1)*(2*x^2-1)). - _Colin Barker_, May 02 2015 %F A238549 From _Georg Fischer_, Feb 20 2019: (Start) %F A238549 With p = floor((n + 2) / 2) for n >= 4: if n even then a(n) = 2^p + 4 * (2^(p - 4) - 1); if n odd then a(n) = 2^p + 4 * (2^(p - 3) - 1). %F A238549 a(n) = a(n - 1) + 2 * a(n - 2) - 2 * a(n - 3). %F A238549 (End) %e A238549 The first numbers of free ends (4*a(n)) are 4, 8, 24, 32, 64, 80, 144, 176, 304, 368, 624, ... %o A238549 (PARI) {print1(1,", "); for (n=1,100,s=1; for (i=0,n-1,s=s+(5-3*(-1)^i)*2^(1/4*(2*i-1+(-1)^i))/2); print1(s,", "))} %o A238549 (Sage) %o A238549 def a(): %o A238549 s, n = 2, 1 %o A238549 yield 1 %o A238549 while True: %o A238549 yield s %o A238549 s += (5-3*(-1)^n)*2^((2*n-1+(-1)^n)//4)//2 %o A238549 n += 1 %o A238549 A238549 = a(); [next(A238549) for _ in range(43)] # _Peter Luschny_, Feb 24 2019 %Y A238549 Cf. A143095, A256641. %K A238549 nonn %O A238549 1,2 %A A238549 _Kival Ngaokrajang_, May 01 2015