Original entry on oeis.org
1, 3, 6, 8, 12, 15, 19, 21, 27, 30, 34, 38, 42, 46, 53, 55, 59, 65, 69, 73, 80, 84, 88, 92, 98, 102, 110, 113, 117, 125, 129, 131, 139, 143, 151, 156, 160, 164, 172, 176, 180, 188, 192, 196, 207, 211, 215, 219, 225, 231, 239, 243, 247, 255, 262, 266, 274, 278
Offset: 1
A338723
Alternating row sums in triangle A338721.
Original entry on oeis.org
1, 3, 4, 6, 6, 9, 9, 11, 13, 14, 14, 18, 18, 18, 21, 23, 23, 25, 25, 29, 30, 30, 30, 34, 36, 36, 36, 39, 39, 43, 43, 45, 45, 45, 49, 52, 52, 52, 52, 56, 56, 60, 60, 60, 63, 63, 63, 67, 69, 71, 71, 71, 71, 75, 76, 80, 80, 80, 80, 84, 84, 84, 88, 90, 90, 93, 93
Offset: 1
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.
Original entry on oeis.org
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
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)
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.
-
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
-
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 *)
-
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
A335616
a(n) is twice the number of partitions of n into consecutive parts, minus the number of partitions of n into consecutive parts that contain 1 as a part.
Original entry on oeis.org
1, 2, 3, 2, 4, 3, 4, 2, 6, 3, 4, 4, 4, 4, 7, 2, 4, 6, 4, 4, 7, 4, 4, 4, 6, 4, 8, 3, 4, 8, 4, 2, 8, 4, 8, 5, 4, 4, 8, 4, 4, 8, 4, 4, 11, 4, 4, 4, 6, 6, 8, 4, 4, 8, 7, 4, 8, 4, 4, 8, 4, 4, 12, 2, 8, 7, 4, 4, 8, 8, 4, 6, 4, 4, 12, 4, 8, 7, 4, 4, 10, 4, 4, 8, 8, 4, 8, 4, 4, 12, 7, 4, 8, 4, 8, 4, 4, 6, 12, 6
Offset: 1
Illustration of initial terms:
n a(n) Diagram
_
1 1 _|1|_
2 2 _|1 _ 1|_
3 3 _|1 |1| 1|_
4 2 _|1 _| |_ 1|_
5 4 _|1 |1 _ 1| 1|_
6 3 _|1 _| |1| |_ 1|_
7 4 _|1 |1 | | 1| 1|_
8 2 _|1 _| _| |_ |_ 1|_
9 6 _|1 |1 |1 _ 1| 1| 1|_
10 3 _|1 _| | |1| | |_ 1|_
11 4 _|1 |1 _| | | |_ 1| 1|_
12 4 _|1 _| |1 | | 1| |_ 1|_
13 4 _|1 |1 | _| |_ | 1| 1|_
14 4 _|1 _| _| |1 _ 1| |_ |_ 1|_
15 7 _|1 |1 |1 | |1| | 1| 1| 1|_
16 2 |1 | | | | | | | | 1|
...
For n = 6 (above), the total number of steps in all double staircases that have at least one step in the 6th level of the structure is equal to 3, since there are two steps in the first double staircase, there are no steps in the second double staircase, and there is only one step in the third double staircase, so a(3) = 2 + 0 + 1 = 3.
From the theorem (see comments) for n = 6, let s(k) = A196020(6,k) be the total number of steps from level n to the top, in the k-th double staircase that has at least a step in the 6th level of the structure, otherwise s(k) = 0. We have that s(1) = 11, s(2) = 0 and s(3) = 1. So the alternating sum is 11 - 0 + 1 = 12, which equals sigma(6) = 1 + 2 + 3 + 6 = 12.
Note that to evaluate sigma(n), it is sufficient to have only the n-th level of the diagram, since the width of the base level of a double staircase equals the number of its steps. See below:
For n = 6 the 6th level of the above diagram looks like this:
_ _ _
|1 | |1| | 1|
.
Width of the 1st staircase: |<-------- 11 ------->|
.
Width of the 3rd staircase: --->|1|<---
.
The width of the first double staircase is 11, the width of the second double staircase does not count, and the width of the third double staircase is 1, so the alternating sum is 11 - 0 + 1 = 12 = sigma(6).
For n = 15 the alternating sum is 29 - 13 + 7 - 0 + 1 = 24 = sigma(15).
For n = 16 the alternating sum is 31 - 0 + 0 - 0 + 0 = 31 = sigma(16).
For more information about these alternating sums see A196020.
Cf.
A000079,
A000203,
A000217,
A001227,
A054843,
A054844,
A065091,
A136107.
A196020,
A204217,
A236104,
A235791,
A237048,
A237593,
A237593,
A245092,
A249351,
A262611,
A262626,
A279693,
A279733,
A281010,
A281011,
A286001,
A299765,
A338721.
-
N:= 100:
S := convert(series( add( x^(n*(n+1)/2)*(1 + x^n)/(1 - x^n), n = 1..floor(sqrt(2*N)) ), x, N+1 ), polynom):
seq(coeff(S, x, n), n = 1..N); # Peter Bala, Jan 20 2021
-
A335616[n_]:=2DivisorSigma[0,n/2^IntegerExponent[n,2]]-Boole[IntegerQ[(Sqrt[8n+1]-1)/2]];Array[A335616,100] (* Paolo Xausa, Sep 03 2023 *)
A347186
Ziggurat sequence (see Comments lines for definition).
Original entry on oeis.org
1, 4, 6, 16, 12, 37, 20, 64, 36, 90, 42, 161, 56, 156, 107, 256, 90, 334, 110, 408, 202, 342, 156, 697, 207, 462, 312, 785, 240, 976, 272, 1024, 446, 756, 441, 1586, 380, 930, 604, 1736, 462, 1841, 506, 1806, 1101, 1332, 600, 2921, 720, 1820, 992, 2450, 756, 2998, 1108, 3257
Offset: 1
Illustration of the geometric algorithm and the initial terms (n = 1..6):
-------------------------------------------------------------------------------
Stage 1 Stage 2 Stage 3
(Construction) (Debugging) (Annihilation)
-------------------------------------------------------------------------------
Double-staircases Diagram of Ziggurat
n diagram A196020 diagram a(n)
-------------------------------------------------------------------------------
_ _ _
1 |_| |_| |_| 1
1 1 1
.
_ _ _
_| |_ _| |_ _| |_
2 |_ _ _| |_ _ _| |_ _ _| 4
1 1 1
.
_ _
_| |_ _| |_ _ _
_| _ |_ _| _ |_ _| | | |_
3 |_ _|_|_ _| |_ _|_|_ _| |_ _|_|_ _| 6
1 2 1 2 1
.
_ _ _
_| |_ _| |_ _| |_
_| _ |_ _| |_ _| |_
_| | | |_ _| |_ _| |_
4 |_ _ _|_|_ _ _| |_ _ _ _ _ _ _| |_ _ _ _ _ _ _| 16
1 2 1 1
.
_ _
_| |_ _| |_
_| _ |_ _| _ |_ _ _
_| | | |_ _| | | |_ _| | | |_
_| _| |_ |_ _| _| |_ |_ _| | | |_
5 |_ _ _|_ _ _|_ _ _| |_ _ _|_ _ _|_ _ _| |_ _ _|_ _ _|_ _ _| 12
1 2 1 2 1
.
_ _ _
_| |_ _| |_ _| |_
_| _ |_ _| |_ _| |_
_| | | |_ _| |_ _| |_
_| _| |_ |_ _| |_ _| |_
_| | _ | |_ _| _ |_ _| _ |_
6 |_ _ _ _|_|_|_|_ _ _ _| |_ _ _ _ _|_|_ _ _ _ _| |_ _ _ _ _|_|_ _ _ _ _| 37
1 2 3 1 3 1 3
.
For n = 7..14 the examples are omitted.
For n = 15 the illustration of the geometric algorithm is as follows:
Stage 1 (Construction):
We draw the diagram called "double-staircases" with 15 levels described in A335616.
Then we label the five double-staircases (k = 1..5) as shown below:
_
_| |_
_| _ |_
_| | | |_
_| _| |_ |_
_| | _ | |_
_| _| | | |_ |_
_| | | | | |_
_| _| _| |_ |_ |_
_| | | _ | | |_
_| _| | | | | |_ |_
_| | _| | | |_ | |_
_| _| | | | | |_ |_
_| | | _| |_ | | |_
_| _| _| | _ | |_ |_ |_
|_ _ _ _ _ _ _ _|_ _ _|_ _|_|_|_|_ _|_ _ _|_ _ _ _ _ _ _ _|
1 2 3 4 5
.
Stage 2 (Debugging):
We remove the fourth double-staircase as it does not have at least one step at level 1 of the diagram starting from the base, as shown below:
_
_| |_
_| _ |_
_| | | |_
_| _| |_ |_
_| | _ | |_
_| _| | | |_ |_
_| | | | | |_
_| _| _| |_ |_ |_
_| | | | | |_
_| _| | | |_ |_
_| | _| |_ | |_
_| _| | | |_ |_
_| | | | | |_
_| _| _| _ |_ |_ |_
|_ _ _ _ _ _ _ _|_ _ _|_ _ _|_|_ _ _|_ _ _|_ _ _ _ _ _ _ _|
1 2 3 5
.
Note that the number of steps in the successive double-staircases gives [29, 13, 7, 0, 1], the same as the 15th row of triangle A196020 (whose alternate sums equals sigma(15) = A000203(15) = 24).
Stage 3 (Annihilation):
We delete the second double-staircase and the steps of the first double-staircase that are just above the second double-staircase.
As a result of this geometric algorithm a new diagram is obtained which in this case has two double-staircases and two simple-staircases as shown below:
_
| |
_ | | _
_| | _| |_ | |_
_| | | | | |_
_| | | | | |_
_| | _| |_ | |_
_| | | | | |_
_| | | | | |_
_| | _| _ |_ | |_
|_ _ _ _ _ _ _ _|_ _ _|_ _ _|_|_ _ _|_ _ _|_ _ _ _ _ _ _ _|
1 3 5
.
The diagram is called here "ziggurat of order 15".
Now we calculate the total area (or the total number of cells) under the staircases with multiplicity using polygonal numbers as shown below:
The area under the staircase labeled 1 is equal to A000217(8) = 36. There are a pair of this staircases, so the total area of this pair is equal to 2*36 = 72.
The area under the double-staircase labeled 3 is equal to A000326(4) + A000326(3) = 22 + 12 = 34.
The area under the double-staircase labeled 5 is equal to A000566(1) + A000566(0) = 1 + 0 = 1.
Therefore the total area is a(15) = 72 + 34 + 1 = 107.
The connection with the symmetric representation of sigma(15) or "SRS(15)" is as follows:
The total number of steps is equal to A000203(15) = 24, equaling the total area (or number of cells) in the SRS(15).
The number of parts in the diagram is equal to A237271(15) = 3 equaling the number of parts in the SRS(15).
The number of double-staircases (also the number of steps in the central column in the diagram) is equal to A067742(15) = 2, equaling the number of central subparts in the SRS(15).
The number of simple-staircases is equal to A281009(15) = 2, equaling the total number of equidistant subparts in the SRS(15).
The total number of staircases is qual to A001227(15) = 4, equaling the number of subparts in the SRS(15).
The number of columns in the diagram is equal to 2*15 - 1 = 29 equaling the number of "widths" in the SRS(15) (cf. A249351).
The number of steps in the successive parts of the diagram are [8, 8, 8], the same as the 15th row of triangle A237270, matching the successive parts in the SRS(15).
The number of steps in the successive staircases from left to right are respectively [8, 7, 1, 8], the same as the 15th row of triangle A280851, matching the successive subparts in the SRS(15).
a(15) = 107 is also the number of cubic cells in the three-dimensional version of the structure whose base is the SRS(15).
The number of polycubes in the structure is equal to A237271(15) = 3, equaling the number of parts in the SRS(15).
The top view of the 3D-Ziggurat of order 15 and the symmetric representation of sigma(15) with subparts look like this:
_ _
|_| | |
|_| | |
|_| | |
|_| | |
|_| | |
|_| | |
|_| | |
_ _ _|_| _ _ _|_|
_ _|_| 36 _ _| | 8
|_|_|_| | _ _|
_|_|_| _| |_|
|_|_| 1 |_ _| 1
| 34 | 7
_ _ _ _ _ _ _ _| _ _ _ _ _ _ _ _|
|_|_|_|_|_|_|_|_| |_ _ _ _ _ _ _ _|
36 8
.
Top view of the 3D-Ziggurat. The symmetric representation of
The ziggurat is formed by 3 of sigma(15) is formed by 3 parts.
polycubes with a(15) = 107 cubes It has 4 subparts with 24 cells in
in total. It has 4 staircases total. It is the base of the ziggurat.
with 24 steps in total.
.
Cf.
A279387 (definition of subpart).
Cf.
A000079,
A000203,
A000217,
A000290,
A000326,
A000396,
A001227,
A002378,
A065091,
A067742,
A131576,
A196020,
A235791,
A236104,
A237270,
A237271,
A237591,
A237593,
A245092,
A246955,
A249351,
A262626,
A280850,
A280851,
A281009,
A296508,
A296512,
A296513,
A335616,
A338721,
A347273,
A347361,
A347529,
A351819.
A339275
Irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists the terms of A040000: 1, 2, 2, 2, ... interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.
Original entry on oeis.org
1, 2, 2, 1, 2, 0, 2, 2, 2, 0, 1, 2, 2, 0, 2, 0, 0, 2, 2, 2, 2, 0, 0, 1, 2, 2, 0, 0, 2, 0, 2, 0, 2, 2, 0, 0, 2, 0, 0, 2, 2, 2, 2, 0, 1, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 2, 2, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 2, 2, 2, 2, 0, 0, 1, 2, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 2, 0, 0, 2, 0, 2
Offset: 1
Triangle begins (rows 1..28):
1;
2;
2, 1;
2, 0;
2, 2;
2, 0, 1;
2, 2, 0;
2, 0, 0;
2, 2, 2;
2, 0, 0, 1;
2, 2, 0, 0;
2, 0, 2, 0;
2, 2, 0, 0;
2, 0, 0, 2;
2, 2, 2, 0, 1;
2, 0, 0, 0, 0;
2, 2, 0, 0, 0;
2, 0, 2, 2, 0;
2, 2, 0, 0, 0;
2, 0, 0, 0, 2;
2, 2, 2, 0, 0, 1;
2, 0, 0, 2, 0, 0;
2, 2, 0, 0, 0, 0;
2, 0, 2, 0, 0, 0;
2, 2, 0, 0, 2, 0;
2, 0, 0, 2, 0, 0;
2, 2, 2, 0, 0, 2;
2, 0, 0, 0, 0, 0, 1;
...
For an illustration of the rows of triangle consider the infinite "double-staircases" diagram defined in A335616.
The first 15 levels of the structure looks like this:
.
Level "Double-staircases" diagram
n _
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|
.
For n = 15, in the 15th level of the diagram we have that the first largest double-staircase has two horizontal steps, the second double-staircase has two steps, the third double-staircase has two steps, there are no steps in the fourth double-stairce and the fifth double-staircase has only one step, so the 15th row of triangle is [2, 2, 2, 0, 1].
The number of positive terms in row n is
A001227(n).
Cf.
A196020,
A236104,
A237048,
A237270,
A237591,
A237593,
A249351,
A280850,
A296508,
A299484,
A338721.
Showing 1-6 of 6 results.
Comments