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 A196020 #275 Dec 23 2024 14:53:42 %S A196020 1,3,5,1,7,0,9,3,11,0,1,13,5,0,15,0,0,17,7,3,19,0,0,1,21,9,0,0,23,0,5, %T A196020 0,25,11,0,0,27,0,0,3,29,13,7,0,1,31,0,0,0,0,33,15,0,0,0,35,0,9,5,0, %U A196020 37,17,0,0,0,39,0,0,0,3,41,19,11,0,0,1,43,0,0,7,0,0,45,21,0,0,0,0,47,0,13,0,0,0 %N A196020 Irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists the odd numbers interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2. %C A196020 Gives an identity for sigma(n): alternating sum of row n equals the sum of divisors of n. For proof see _Max Alekseyev_ link. %C A196020 Row n has length A003056(n) hence column k starts in row A000217(k). %C A196020 The number of positive terms in row n is A001227(n), the number of odd divisors of n. %C A196020 If n = 2^j then the only positive integer in row n is T(n,1) = 2^(j+1) - 1. %C A196020 If n is an odd prime then the only two positive integers in row n are T(n,1) = 2n - 1 and T(n,2) = n - 2. %C A196020 If T(n,k) = 3 then T(n+1,k+1) = 1, the first element of the column k+1. %C A196020 The partial sums of column k give the column k of A236104. %C A196020 The connection with the symmetric representation of sigma is as follows: A236104 --> A235791 --> A237591 --> A237593 --> A239660 --> A237270. %C A196020 Alternating sum of row n equals the number of units cubes that protrude from the n-th level of the stepped pyramid described in A245092. - _Omar E. Pol_, Oct 28 2015 %C A196020 Conjecture: T(n,k) is the difference between the square of the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the square of the total number of partitions of all positive integers < n into exactly k consecutive parts. - _Omar E. Pol_, Feb 14 2018 %C A196020 From _Omar E. Pol_, Nov 24 2020: (Start) %C A196020 T(n,k) is also the number of steps in the first n levels of the k-th double-staircase that has at least one step in the n-th level of the "Double- staircases" diagram, otherwise T(n,k) = 0, (see the Example section). %C A196020 For the connection with A280851 see also the algorithm of A280850 and the conjecture of A296508. (End) %C A196020 The number of zeros in the n-th row equals A238005(n). - _Omar E. Pol_, Sep 11 2021 %C A196020 Apart from the alternating row sums and the sum of divisors function A000203 another connection with Euler's pentagonal theorem is that in the irregular triangle of A238442 the k-th column starts in the row that is the k-th generalized pentagonal number A001318(k) while here the k-th column starts in the row that is the k-th generalized hexagonal number A000217(k). Both A001318 and A000217 are successive members of the same family: the generalized polygonal numbers. - _Omar E. Pol_, Sep 23 2021 %C A196020 Other triangle with the same row lengths and alternating row sums equals sigma(n) is A252117. - _Omar E. Pol_, May 03 2022 %H A196020 G. C. Greubel, <a href="/A196020/b196020.txt">Table of n, a(n) for the first 200 rows, flattened</a> %H A196020 Max Alekseyev, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2013-November/011933.html">Proof of the alternating sum property of A196020</a>, SeqFan Mailing List, Nov 17 2013. %H A196020 Paul D. Hanna, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2013-November/011935.html">About an identity for sigma</a>, SeqFan Mailing List, Nov 18 2013. %H A196020 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a> %F A196020 A000203(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k). %F A196020 T(n,k) = 2*A211343(n,k) - 1, if A211343(n,k) >= 1 otherwise T(n,k) = 0. %F A196020 If n==k/2 (mod k) and n>=k(k+1)/2, then T(n,k) = 2*n/k - k; otherwise T(n,k) = 0. - _Max Alekseyev_, Nov 18 2013 %F A196020 T(n,k) = A236104(n,k) - A236104(n-1,k), assuming that A236104(k*(k+1)/2-1,k) = 0. - _Omar E. Pol_, Oct 14 2018 %F A196020 T(n,k) = A237048(n,k)*A338721(n,k). - _Omar E. Pol_, Feb 22 2022 %e A196020 Triangle begins: %e A196020 1; %e A196020 3; %e A196020 5, 1; %e A196020 7, 0; %e A196020 9, 3; %e A196020 11, 0, 1; %e A196020 13, 5, 0; %e A196020 15, 0, 0; %e A196020 17, 7, 3; %e A196020 19, 0, 0, 1; %e A196020 21, 9, 0, 0; %e A196020 23, 0, 5, 0; %e A196020 25, 11, 0, 0; %e A196020 27, 0, 0, 3; %e A196020 29, 13, 7, 0, 1; %e A196020 31, 0, 0, 0, 0; %e A196020 33, 15, 0, 0, 0; %e A196020 35, 0, 9, 5, 0; %e A196020 37, 17, 0, 0, 0; %e A196020 39, 0, 0, 0, 3; %e A196020 41, 19, 11, 0, 0, 1; %e A196020 43, 0, 0, 7, 0, 0; %e A196020 45, 21, 0, 0, 0, 0; %e A196020 47, 0, 13, 0, 0, 0; %e A196020 49, 23, 0, 0, 5, 0; %e A196020 51, 0, 0, 9, 0, 0; %e A196020 53, 25, 15, 0, 0, 3; %e A196020 55, 0, 0, 0, 0, 0, 1; %e A196020 ... %e A196020 For n = 15 the divisors of 15 are 1, 3, 5, 15, so the sum of divisors of 15 is 1 + 3 + 5 + 15 = 24. On the other hand, the 15th row of the triangle is 29, 13, 7, 0, 1, so the alternating row sum is 29 - 13 + 7 - 0 + 1 = 24, equaling the sum of divisors of 15. %e A196020 If n is even then the alternating sum of the n-th row is simpler to evaluate than the sum of divisors of n. For example the sum of divisors of 24 is 1 + 2 + 3 + 4 + 6 + 8 + 12 + 24 = 60, and the alternating sum of the 24th row of triangle is 47 - 0 + 13 - 0 + 0 - 0 = 60. %e A196020 From _Omar E. Pol_, Nov 24 2020: (Start) %e A196020 For an illustration of the rows of triangle consider the infinite "double-staircases" diagram defined in A335616 (see also the theorem there). %e A196020 For n = 15 the diagram with first 15 levels looks like this: %e A196020 . %e A196020 Level "Double-staircases" diagram %e A196020 . _ %e A196020 1 _|1|_ %e A196020 2 _|1 _ 1|_ %e A196020 3 _|1 |1| 1|_ %e A196020 4 _|1 _| |_ 1|_ %e A196020 5 _|1 |1 _ 1| 1|_ %e A196020 6 _|1 _| |1| |_ 1|_ %e A196020 7 _|1 |1 | | 1| 1|_ %e A196020 8 _|1 _| _| |_ |_ 1|_ %e A196020 9 _|1 |1 |1 _ 1| 1| 1|_ %e A196020 10 _|1 _| | |1| | |_ 1|_ %e A196020 11 _|1 |1 _| | | |_ 1| 1|_ %e A196020 12 _|1 _| |1 | | 1| |_ 1|_ %e A196020 13 _|1 |1 | _| |_ | 1| 1|_ %e A196020 14 _|1 _| _| |1 _ 1| |_ |_ 1|_ %e A196020 15 |1 |1 |1 | |1| | 1| 1| 1| %e A196020 . %e A196020 The first largest double-staircase has 29 horizontal steps, the second double-staircase has 13 steps, the third double-staircase has 7 steps, and the fifth double-staircases has only one step. Note that the fourth double-staircase does not count because it does not have horizontal steps in the 15th level, so the 15th row of triangle is [29, 13, 7, 0, 1]. %e A196020 For a connection with the "Ziggurat" diagram and the parts and subparts of the symmetric representation of sigma(15) see also A237270. (End) %p A196020 T_row := proc(n) local T; %p A196020 T := (n, k) -> if modp(n-k/2, k) = 0 and n >= k*(k+1)/2 then 2*n/k-k else 0 fi; %p A196020 seq(T(n,k), k=1..floor((sqrt(8*n+1)-1)/2)) end: %p A196020 seq(print(T_row(n)),n=1..24); # _Peter Luschny_, Oct 27 2015 %t A196020 T[n_, k_] := If[Mod[n - k*(k+1)/2, k] == 0 ,2*n/k - k, 0] %t A196020 row[n_] := Floor[(Sqrt[8n+1]-1)/2] %t A196020 line[n_] := Map[T[n, #]&, Range[row[n]]] %t A196020 a196020[m_, n_] := Map[line, Range[m, n]] %t A196020 Flatten[a196020[1,22]] (* data *) %t A196020 (* _Hartmut F. W. Hoft_, Oct 26 2015 *) %t A196020 A196020row = Function[n,Table[If[Divisible[Numerator[n-k/2],k] && CoprimeQ[ Denominator[n- k/2], k],2*n/k-k,0],{k,1,Floor[(Sqrt[8 n+1]-1)/2]}]] %t A196020 Flatten[Table[A196020row[n], {n,1,24}]] (* _Peter Luschny_, Oct 28 2015 *) %o A196020 (Sage) %o A196020 def T(n,k): %o A196020 q = (2*n-k)/2 %o A196020 b = k.divides(q.numerator()) and gcd(k,q.denominator()) == 1 %o A196020 return 2*n/k - k if b else 0 %o A196020 for n in (1..24): [T(n, k) for k in (1..floor((sqrt(8*n+1)-1)/2))] # _Peter Luschny_, Oct 28 2015 %Y A196020 Columns 1-2: A005408, A193356. %Y A196020 Compare with A027750, A238442, A237270, A237273, A252117, A280851, A296508. %Y A196020 Cf. A000203, A000217, A001227, A001318, A003056, A211343, A212119, A228813, A231345, A231347, A235791, A235794, A236104, A236106, A236112, A237048, A237271, A237591, A237593, A238005, A239660, A244050, A245092, A261699, A262626, A286000, A286001, A280850, A335616, A338721. %K A196020 nonn,tabf %O A196020 1,2 %A A196020 _Omar E. Pol_, Feb 02 2013