%I #110 Jun 11 2021 05:14:42
%S 0,1,1,4,4,6,6,13,13,15,15,21,21,25,25,40,40,42,42,48,48,52,52,66,66,
%T 70,70,82,82,90,90,121,121,123,123,129,129,133,133,147,147,151,151,
%U 163,163,171,171,201,201,205,205,217,217,225,225,253,253,261,261,285,285,301,301,364,364
%N Number of triangles formed by the positions of odd numbers in the first n rows of Pascal's triangle, also known as Tartaglia's triangle.
%C Named Tartaglia's triangle after the Italian mathematician Niccolò Fontana Tartaglia (1500-1577). - _Amiram Eldar_, Jun 11 2021
%H Riccardo Perego and Emmanuele Villa, <a href="/A262260/a262260.pdf">Tartaglia's Triangle Odd Distribution (in Italian), 2012</a>.
%H Jon E. Schoenfield, <a href="/A262260/a262260.png">Plot of terms through n=2^14</a>.
%H Emmanuele Villa, <a href="/A262260/a262260.txt">A,B,C,D coefficients for the first 500 rows</a>.
%H Emmanuele Villa, <a href="https://www.dropbox.com/s/oo60d32f04rfs6u/tartaglia.cs?dl=0">C# Program that calculates the first 50 rows</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Pascal%27s_triangle">Pascal's Triangle</a>.
%F Empirical formula:
%F a(0)=0; a(1)=1; for n>1, a(n) = a(n-1) + A + B + C - D
%F where
%F A = A001316(n-1) if n = 2x+1, 0 otherwise
%F B = A001316(n-3) if n = 4x+1, 0 otherwise
%F C = B-1 if n = 8x+1, 0 otherwise
%F D = A088512(n+1) = A001316((n+1-m)/8)-1 if n = 8x+1, 0 otherwise, where m is the highest power of 2 less than n.
%e Taking Pascal's triangle, removing the even terms and replacing each odd term with a dot, will give you this illustration (the circles are connected with lines to show the sub-triangles):
%e triangle counts
%e ---------------
%e row new total
%e === === =====
%e 0 o 0 0
%e / \
%e 1 o---o 1 1
%e / \
%e 2 o o 0 1
%e / \ / \
%e 3 o---o---o---o 3 4
%e / \
%e 4 o o 0 4
%e / \ / \
%e 5 o---o o---o 2 6
%e / \ / \
%e 6 o o o o 0 6
%e / \ / \ / \ / \
%e 7 o---o---o---o---o---o---o---o 7 13
%e / \
%e 8 o o 0 13
%e .
%e .
%e Formula example:
%e given a(46) = 171, a(47) is computed as follows:
%e A = A001316(46) = 16
%e B = A001316(44) = 8
%e C = A001316(44) - 1 = 7
%e D = A001316((47+1-32)/8) - 1 = 1
%e a(47) = 171 + 16 + 8 + 7 - 1 = 201
%e .
%e .
%e You can find results for a(n), A, B, C and D in the links section for the first 500 rows.
%Y Cf. A000120, A001316, A001317, A006943, A088512.
%K nonn,base
%O 0,4
%A _Emmanuele Villa_, Nov 09 2016