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.
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, 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, 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
Offset: 1
Examples
Triangle begins: 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, 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; 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; 49, 23, 0, 0, 5, 0; 51, 0, 0, 9, 0, 0; 53, 25, 15, 0, 0, 3; 55, 0, 0, 0, 0, 0, 1; ... 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. 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. From _Omar E. Pol_, Nov 24 2020: (Start) For an illustration of the rows of triangle consider the infinite "double-staircases" diagram defined in A335616 (see also the theorem there). For n = 15 the diagram with first 15 levels looks like this: . Level "Double-staircases" diagram . _ 1 _|1|_ 2 _|1 _ 1|_ 3 _|1 |1| 1|_ 4 _|1 _| |_ 1|_ 5 _|1 |1 _ 1| 1|_ 6 _|1 _| |1| |_ 1|_ 7 _|1 |1 | | 1| 1|_ 8 _|1 _| _| |_ |_ 1|_ 9 _|1 |1 |1 _ 1| 1| 1|_ 10 _|1 _| | |1| | |_ 1|_ 11 _|1 |1 _| | | |_ 1| 1|_ 12 _|1 _| |1 | | 1| |_ 1|_ 13 _|1 |1 | _| |_ | 1| 1|_ 14 _|1 _| _| |1 _ 1| |_ |_ 1|_ 15 |1 |1 |1 | |1| | 1| 1| 1| . 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]. For a connection with the "Ziggurat" diagram and the parts and subparts of the symmetric representation of sigma(15) see also A237270. (End)
Links
- G. C. Greubel, Table of n, a(n) for the first 200 rows, flattened
- Max Alekseyev, Proof of the alternating sum property of A196020, SeqFan Mailing List, Nov 17 2013.
- Paul D. Hanna, About an identity for sigma, SeqFan Mailing List, Nov 18 2013.
- Index entries for sequences related to sigma(n)
Crossrefs
Programs
-
Maple
T_row := proc(n) local T; T := (n, k) -> if modp(n-k/2, k) = 0 and n >= k*(k+1)/2 then 2*n/k-k else 0 fi; seq(T(n,k), k=1..floor((sqrt(8*n+1)-1)/2)) end: seq(print(T_row(n)),n=1..24); # Peter Luschny, Oct 27 2015
-
Mathematica
T[n_, k_] := If[Mod[n - k*(k+1)/2, k] == 0 ,2*n/k - k, 0] row[n_] := Floor[(Sqrt[8n+1]-1)/2] line[n_] := Map[T[n, #]&, Range[row[n]]] a196020[m_, n_] := Map[line, Range[m, n]] Flatten[a196020[1,22]] (* data *) (* Hartmut F. W. Hoft, Oct 26 2015 *) 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]}]] Flatten[Table[A196020row[n], {n,1,24}]] (* Peter Luschny, Oct 28 2015 *)
-
Sage
def T(n,k): q = (2*n-k)/2 b = k.divides(q.numerator()) and gcd(k,q.denominator()) == 1 return 2*n/k - k if b else 0 for n in (1..24): [T(n, k) for k in (1..floor((sqrt(8*n+1)-1)/2))] # Peter Luschny, Oct 28 2015
Formula
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
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
Comments