cp's OEIS Frontend

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.

A256940 a(n) is the total number of free ends of a certain configuration of line segments after n iterations (see Comments lines for definition).

This page as a plain text file.
%I A256940 #63 Mar 09 2025 12:54:51
%S A256940 2,4,8,12,12,12,20,20,16,24,28,48,52,36,44,36,16,24,40,56,72,72,76,80,
%T A256940 60,64,80,124,132,88,100,68,16,24,40,56,72,80,88,104,112,128,176,216,
%U A256940 244,212,168,148,84,64,104,152,200,200,212,216,148,144,176,276,296,192,212,136,16
%N A256940 a(n) is the total number of free ends of a certain configuration of line segments after n iterations (see Comments lines for definition).
%C A256940 The initial pattern is a straight line segment which has 2 free ends: a(0)=2.
%C A256940 The construction rules for the following generations are:
%C A256940 (i) add 2 line segments (all line segments are of equal length) at each free end of previous generation by arranging them in a "V" shape at angle Pi/2 and symmetrically placed at the free end,
%C A256940 (ii) overlaps among different generations are prohibited (if, for a given free end, any of the two new segments from its "V" touch or cross a segment from an earlier generation, then the entire "V" is not added, and that free end is just declared non-free),
%C A256940 (iii) the {a(n)} free ends are the ends of elements that do not touch or cross the others (if a new segment is touched by another segment only at the endpoint which it shares with its parent, then this doesn't count as an intersection and its other end is considered free).
%C A256940 It seems that a(n) drop to 16 for n = 8, 16, 32, 64,... . See illustration in the links.
%C A256940 The structure of the illustration of initial terms is very similar to the structure of A194270 and A220500. - _Omar E. Pol_, Apr 19 2015
%H A256940 Kival Ngaokrajang, <a href="/A256940/a256940_2.pdf">Illustration of initial terms, n <= 12</a>
%H A256940 Andrey Zabolotskiy, <a href="/A256940/a256940_4.pdf">Illustration for a(64)=16</a>
%t A256940 new2[{{s_, t_}, a_}] := Simplify@Table[{{t, AngleVector[t, {1, a + si Pi/4}]}, a + si Pi/4}, {si, {1, -1}}];
%t A256940 xx[l1_, l2_] := SquaredEuclideanDistance[First@l1, First@l2] <= 4 && With[{int = Simplify@RegionIntersection[Line@l1, Line@l2]}, int =!= EmptyRegion[2] && int =!= Point[{First@l2}] && int =!= Point[{First@l1}]];
%t A256940 {nonfree, free} = {{}, {{{{1/2, 0}, {1, 0}}, 0}, {{{1/2, 0}, {0, 0}}, Pi}}};
%t A256940 a = {2};
%t A256940 next[] := ({oldnonfree, oldfree, nonfree, free} = {nonfree, free, Join[free, nonfree], {}};
%t A256940   Do[n2 = new2[f]; If[And @@ Table[AllTrue[oldnonfree, ! xx[First@#, First@new] &], {new, n2}], Do[
%t A256940     tt = GroupBy[free, xx[First@#, First@new] &];
%t A256940     free = Lookup[tt, False, {}];
%t A256940     If[KeyExistsQ[tt, True], nonfree = Join[nonfree, tt[True], {new}], AppendTo[free, new]];
%t A256940   , {new, n2}]], {f, oldfree}];
%t A256940   AppendTo[a, Length@free];);
%t A256940 Do[next[], {10}];
%t A256940 a (* _Andrey Zabolotskiy_, Mar 09 2025 *)
%Y A256940 Cf. A194270, A194440, A194442, A220500, A220520, A220522, A256641, A256941.
%K A256940 nonn
%O A256940 0,1
%A A256940 _Kival Ngaokrajang_, Apr 19 2015
%E A256940 a(1) = 2 prepended and a(3) = 8 corrected by _Omar E. Pol_, Apr 19 2015
%E A256940 Partially edited by _Kival Ngaokrajang_, as _Omar E. Pol_ suggestion, Apr 26 2015
%E A256940 Terms a(12), a(13), a(59) corrected by _Kival Ngaokrajang_, Apr 26 2015
%E A256940 Terms a(27), a(60), a(63) corrected, other terms verified, description clarified by _Andrey Zabolotskiy_, Mar 09 2025