login
Irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists 1's interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.
213

%I #199 Nov 05 2024 23:40:14

%S 1,1,1,1,1,0,1,1,1,0,1,1,1,0,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0,1,0,1,1,

%T 0,0,1,0,0,1,1,1,1,0,1,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,1,1,0,0,0,1,0,0,

%U 0,1,1,1,1,0,0,1,1,0,0,1,0,0,1,1,0,0,0,0,1,0,1,0,0,0

%N Irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists 1's interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.

%C The sum of row n gives A001227(n), the number of odd divisors of n.

%C Row n has length A003056(n), hence column k starts in row A000217(k).

%C If n = 2^j then the only positive integer in row n is T(n,1) = 1.

%C If n is an odd prime then the only two positive integers in row n are T(n,1) = 1 and T(n,2) = 1.

%C The partial sums of column k give the column k of A235791.

%C The connection with A196020 is as follows: A235791 --> A236104 --> A196020.

%C The connection with the symmetric representation of sigma is as follows: A235791 --> A237591 --> A237593 --> A239660 --> A237270.

%C From _Hartmut F. W. Hoft_, Oct 23 2014: (Start)

%C Property: Let n = 2^m*s*t with m >= 0 and 1 <= s, t odd, and r(n) = floor((sqrt(8*n+1) - 1)/2) = A003056(n). T(n, k) = 1 precisely when k is odd and k|n, or k = 2^(m+1)*s when 1 <= s < 2^(m+1)*s <= r(n) < t. Thus each odd divisor greater than r(n) is matched by a unique even index less than or equal to r(n).

%C For further connections with the symmetric representation of sigma see also A249223. (End)

%C From _Omar E. Pol_, Jan 21 2017: (Start)

%C Conjecture 1: alternating sum of row n gives A067742(n), the number of middle divisors of n.

%C The sum of row n also gives the number of subparts in the symmetric representation of sigma(n), equaling A001227(n), the number of odd divisors of n. For more information see A279387. (End)

%C From _Omar E. Pol_, Feb 08 2017, Feb 22 2017: (Start)

%C Conjecture 2: Alternating sum of row n also gives the number of central subparts in the symmetric representation of sigma(n), equaling the width of the terrace at the n-th level in the main diagonal of the pyramid described in A245092.

%C Conjecture 3: The sum of the odd-indexed terms in row n gives A082647(n): the number of odd divisors of n less than sqrt(2*n), also the number of partitions of n into an odd number of consecutive parts.

%C Conjecture 4: The sum of the even-indexed terms in row n gives A131576(n): the number of odd divisors of n greater than sqrt(2*n), also the number of partitions of n into an even number of consecutive parts.

%C Conjecture 5: The sum of the even-indexed terms in row n also gives the number of pairs of equidistant subparts in the symmetric representation of sigma(n). (End)

%C Conjecture 6: T(n,k) is also the number of partitions of n into exactly k consecutive parts. - _Omar E. Pol_, Apr 28 2017

%C The number of zeros in the n-th row equals A238005(n). - _Omar E. Pol_, Sep 11 2021

%C This triangle is a member of an infinite family of irregular triangles read by rows in which column k lists 1's interleaved with k-1 zeros, and the first element of column k is where the row number equals the k-th (m+2)-gonal number, with n >= 1, k >= 1, m >= 0. T(n,k) is also the number of partitions of n into k consecutive parts that differ by m. This is the case for m = 1. For other values of m see the cross-references. - _Omar E. Pol_, Sep 29 2021

%C The indices of the rows where the number of 1's increases to a record give A053624. - _Omar E. Pol_, Mar 04 2023

%H G. C. Greubel, <a href="/A237048/b237048.txt">Table of n, a(n) for the first 150 rows, flattened</a>

%F For n >= 1 and k = 1, ..., A003056(n): if k is odd then T(n, k) = 1 if k|n, otherwise 0, and if k is even then T(n, k) = 1 if k|(n-k/2), otherwise 0. - _Hartmut F. W. Hoft_, Oct 23 2014

%F a(n) = A057427(A196020(n)) = A057427(A261699(n)). - _Omar E. Pol_, Nov 14 2016

%F A000203(n) = Sum_{k=1..A003056(n)} (-1)^(k-1) * ((Sum_{j=k*(k+1)/2..n} T(j,k))^2 - (Sum_{j=k*(k+1)/2..n} T(j-1,k))^2), assuming that T(k*(k+1)/2-1,k) = 0. - _Omar E. Pol_, Oct 10 2018

%F T(n,k) = A285914(n,k)/k. - _Omar E. Pol_, Sep 29 2021

%F From _Hartmut F. W. Hoft_, Apr 30 2024: (Start)

%F Another way of expressing the formula above, using S(n,k) for entries in the triangle of A235791, is:

%F T(n,k) = S(n,k) - S(n-1,k), for all n >= 1 and 1 <= k <= A003056(n), noting that for triangular numbers n(n+1)/2, S(n(n+1)/2 - 1, A003056(n(n+1)/2)) = S(n(n+1)/2 - 1, n) = 0.

%F Also, T(n,k) = 1 if n - k(k+1)/2 (mod k) = 0, and 0 otherwise. (End)

%e Triangle begins (rows 1..28):

%e 1;

%e 1;

%e 1, 1;

%e 1, 0;

%e 1, 1;

%e 1, 0, 1;

%e 1, 1, 0;

%e 1, 0, 0;

%e 1, 1, 1;

%e 1, 0, 0, 1;

%e 1, 1, 0, 0;

%e 1, 0, 1, 0;

%e 1, 1, 0, 0;

%e 1, 0, 0, 1;

%e 1, 1, 1, 0, 1;

%e 1, 0, 0, 0, 0;

%e 1, 1, 0, 0, 0;

%e 1, 0, 1, 1, 0;

%e 1, 1, 0, 0, 0;

%e 1, 0, 0, 0, 1;

%e 1, 1, 1, 0, 0, 1;

%e 1, 0, 0, 1, 0, 0;

%e 1, 1, 0, 0, 0, 0;

%e 1, 0, 1, 0, 0, 0;

%e 1, 1, 0, 0, 1, 0;

%e 1, 0, 0, 1, 0, 0;

%e 1, 1, 1, 0, 0, 1;

%e 1, 0, 0, 0, 0, 0, 1;

%e ...

%e For n = 20 the divisors of 20 are 1, 2, 4, 5, 10, 20.

%e There are two odd divisors: 1 and 5. On the other hand the 20th row of triangle is [1, 0, 0, 0, 1] and the row sum is 2, equaling the number of odd divisors of 20.

%e From _Hartmut F. W. Hoft_, Oct 23 2014: (Start)

%e For n = 18 the divisors are 1, 2, 3, 6, 9, 18.

%e There are three odd divisors: 1 and 3 are in their respective columns, but 9 is accounted for in column 4 = 2^2*1 since 18 = 2^1*1*9 and 9>5, the number of columns in row 18. (End)

%e From _Omar E. Pol_, Dec 17 2016: (Start)

%e Illustration of initial terms:

%e Row _

%e 1 _|1|

%e 2 _|1 _|

%e 3 _|1 |1|

%e 4 _|1 _|0|

%e 5 _|1 |1 _|

%e 6 _|1 _|0|1|

%e 7 _|1 |1 |0|

%e 8 _|1 _|0 _|0|

%e 9 _|1 |1 |1 _|

%e 10 _|1 _|0 |0|1|

%e 11 _|1 |1 _|0|0|

%e 12 _|1 _|0 |1 |0|

%e 13 _|1 |1 |0 _|0|

%e 14 _|1 _|0 _|0|1 _|

%e 15 _|1 |1 |1 |0|1|

%e 16 _|1 _|0 |0 |0|0|

%e 17 _|1 |1 _|0 _|0|0|

%e 18 _|1 _|0 |1 |1 |0|

%e 19 _|1 |1 |0 |0 _|0|

%e 20 _|1 _|0 _|0 |0|1 _|

%e 21 _|1 |1 |1 _|0|0|1|

%e 22 _|1 _|0 |0 |1 |0|0|

%e 23 _|1 |1 _|0 |0 |0|0|

%e 24 _|1 _|0 |1 |0 _|0|0|

%e 25 _|1 |1 |0 _|0|1 |0|

%e 26 _|1 _|0 _|0 |1 |0 _|0|

%e 27 _|1 |1 |1 |0 |0|1 _|

%e 28 |1 |0 |0 |0 |0|0|1|

%e ...

%e Note that the 1's are placed exactly below the horizontal line segments.

%e Also the above structure represents the left hand part of the front view of the pyramid described in A245092. For more information about the pyramid and the symmetric representation of sigma see A237593. (End)

%p r := proc(n) floor((sqrt(1+8*n)-1)/2) ; end proc: # A003056

%p A237048:=proc(n,k) local i; global r;

%p if n<(k-1)*k/2 or k>r(n) then return(0); fi;

%p if (k mod 2)=1 and (n mod k)=0 then return(1); fi;

%p if (k mod 2)=0 and ((n-k/2) mod k) = 0 then return(1); fi;

%p return(0);

%p end;

%p for n from 1 to 12 do lprint([seq(A237048(n,k),k=1..r(n))]); od; # _N. J. A. Sloane_, Jan 15 2021

%t cd[n_, k_] := If[Divisible[n, k], 1, 0]

%t row[n_] := Floor[(Sqrt[8n+1] - 1)/2]

%t a237048[n_, k_] := If[OddQ[k], cd[n, k], cd[n - k/2, k]]

%t a237048[n_] := Map[a237048[n, #]&, Range[row[n]]]

%t Flatten[Map[a237048, Range[24]]] (* data: 24 rows of triangle *)

%t (* _Hartmut F. W. Hoft_, Oct 23 2014 *)

%o (PARI) t(n,k) = if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0);

%o tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(t(n, k), ", ");); print(););} \\ _Michel Marcus_, Sep 20 2015

%o (Python)

%o from sympy import sqrt

%o import math

%o def T(n, k): return (n%k == 0)*1 if k%2 == 1 else (((n - k/2)%k) == 0)*1

%o for n in range(1, 21): print([T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]) # _Indranil Ghosh_, Apr 21 2017

%Y Indices of 1's are also the indices of nonzero terms in A196020, A211343, A236106, A239662, A261699, A272026, A280850, A285891, A285914, A286013, A339275.

%Y The MMA code here is also used in A262045.

%Y Triangles of the same family related to partitions into consecutive parts that differ by m are: A051731 (m=0), this sequence (m=1), A303300 (m=2), A330887 (m=3), A334460 (m=4), A334465 (m=5).

%Y Cf. A000203, A001227, A003056, A053624, A057427, A067742, A082647, A131576, A236104, A235791, A237270, A237271, A237591, A237593, A238005, A239657, A245092, A249351, A262611, A262626, A279387, A279693, A285898, A334466.

%K nonn,easy,tabf

%O 1

%A _Omar E. Pol_, Mar 01 2014