%I #35 Apr 21 2024 11:40:40
%S 0,1,4,9,18,27,36,49,74,95,104,117,142,167,192,229,302,359,368,381,
%T 406,431,456,493,566,627,652,689,762,835,908,1017,1234,1399,1408,1421,
%U 1446,1471,1496,1533,1606,1667,1692,1729,1802,1875,1948,2057,2274,2443,2468
%N T-toothpick sequence (see Comments lines for definition).
%C A T-toothpick is formed from three toothpicks of equal length, in the shape of a T. There are three endpoints. We call the middle of the top toothpick the pivot point.
%C We start at round 0 with no T-toothpicks.
%C At round 1 we place a T-toothpick anywhere in the plane.
%C At round 2 we place three other T-toothpicks.
%C And so on...
%C The rule for adding a new T-toothpick is the following. A new T-toothpick is added at any exposed endpoint, with the pivot point touching the endpoint and so that the crossbar of the new toothpick is perpendicular to the exposed end.
%C The sequence gives the number of T-toothpicks after n rounds. A160173 (the first differences) gives the number added at the n-th round.
%C See the entry A139250 for more information about the toothpick process and the toothpick propagation.
%C On the infinite square grid a T-toothpick can be represented as a square polyedge with three components from a central point: two consecutive components on the same straight-line and a centered orthogonal component.
%C If the T-toothpick has three components then at the n-th round the structure is a polyedge with 3*a(n) components.
%C From _Omar E. Pol_, Mar 26 2011: (Start)
%C For formula and more information see the Applegate-Pol-Sloane paper, chapter 11, "T-shaped toothpicks". See also A160173.
%C Also, this sequence can be illustrated using another structure in which every T-toothpick is replaced by an isosceles right triangle. (End)
%C The structure is very distinct but the graph is similar to the graphs from the following sequences: A147562, A160164, A162795, A169707, A187220, A255366, A256260, at least for the known terms from Data section. - _Omar E. Pol_, Nov 24 2015
%C Shares with A255366 some terms with the same index, for example the element a(43) = 1729, the Hardy-Ramanujan number. - _Omar E. Pol_, Nov 25 2015
%H David Applegate, <a href="/A139250/a139250.anim.html">The movie version</a>
%H 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 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 a(n) = 2*A151920(n) + 2*A151920(n-1) + n + 1. - _Charlie Neder_, Feb 07 2019
%t wt[n_] := DigitCount[n, 2, 1];
%t A151920[n_] := Sum[3^wt[i], {i, 1, n + 1}]/3;
%t a[n_] := 2*A151920[n - 2] + 2*A151920[n - 3] + n;
%t Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Apr 21 2024, after _Charlie Neder_ *)
%Y Cf. A139250, A139251, A147562, A160120, A160160, A160164, A160170, A160173, A160406, A160408, A160426, A160800, A162795, A169707, A187220, A255366, A256260.
%K nonn,nice
%O 0,3
%A _Omar E. Pol_, Jun 01 2009
%E Edited and extended by _N. J. A. Sloane_, Jan 01 2010