A271342
Sum of all even divisors of all positive integers <= n.
Original entry on oeis.org
0, 2, 2, 8, 8, 16, 16, 30, 30, 42, 42, 66, 66, 82, 82, 112, 112, 138, 138, 174, 174, 198, 198, 254, 254, 282, 282, 330, 330, 378, 378, 440, 440, 476, 476, 554, 554, 594, 594, 678, 678, 742, 742, 814, 814, 862, 862, 982, 982, 1044, 1044, 1128, 1128, 1208, 1208, 1320, 1320, 1380, 1380, 1524, 1524, 1588, 1588, 1714, 1714
Offset: 1
For n = 6 the divisors of all positive integers <= 6 are [1], [1, 2], [1, 3], [1, 2, 4], [1, 5], [1, 2, 3, 6] and the even divisors of all positive integers <= 6 are [2], [2, 4], [2, 6], so a(6) = 2 + 2 + 4 + 2 + 6 = 16. On the other hand the sum of all the divisors of all positive integers <= 6/2 are [1] + [1 + 2] + [1 + 3] = A024916(3) = 8, so a(6) = 2*8 = 16.
For n = 10, (floor(10/2) = 5) numbers have divisor 2, (floor(10/4) = 2) numbers have divisor 4, ..., (floor(10/10) = 1) numbers have divisor 10. Therefore, a(10) = 5 * 2 + 2 * 4 + 1 * 6 + 1 * 8 + 1 * 10 = 42. - _David A. Corneth_, Jun 06 2017
-
Accumulate@ Array[DivisorSum[#, # &, EvenQ] &, 65] (* Michael De Vlieger, Jun 06 2017 *)
-
a(n) = sum(k=1, n, sumdiv(k, d, (1-d%2)*d)); \\ Michel Marcus, Jun 05 2017
-
a(n) = 2 * sum(k=1, n\2, k*(n\(k<<1))) \\ David A. Corneth, Jun 06 2017
-
def A271342(n): return sum(k*((n>>1)//k) for k in range(1, (n>>1)+1))<<1 # Chai Wah Wu, Apr 26 2023
-
from math import isqrt
def A271342(n): return -(s:=isqrt(m:=n>>1))**2*(s+1) + sum((q:=m//k)*((k<<1)+q+1) for k in range(1,s+1)) # Chai Wah Wu, Oct 21 2023
A266072
Number of ON (black) cells in the n-th iteration of the "Rule 3" elementary cellular automaton starting with a single ON (black) cell.
Original entry on oeis.org
1, 1, 1, 5, 1, 9, 1, 13, 1, 17, 1, 21, 1, 25, 1, 29, 1, 33, 1, 37, 1, 41, 1, 45, 1, 49, 1, 53, 1, 57, 1, 61, 1, 65, 1, 69, 1, 73, 1, 77, 1, 81, 1, 85, 1, 89, 1, 93, 1, 97, 1, 101, 1, 105, 1, 109, 1, 113, 1, 117, 1, 121, 1, 125, 1, 129, 1, 133, 1, 137, 1, 141
Offset: 0
From _Michael De Vlieger_, Dec 21 2015: (Start)
First 12 rows, replacing "0" with "." for better visibility of ON cells, followed by the total number of 1's per row:
1 = 1
1 . . = 1
. . . 1 . = 1
1 1 1 1 . . 1 = 5
. . . . . . 1 . . = 1
1 1 1 1 1 1 1 . . 1 1 = 9
. . . . . . . . . 1 . . . = 1
1 1 1 1 1 1 1 1 1 1 . . 1 1 1 = 13
. . . . . . . . . . . . 1 . . . . = 1
1 1 1 1 1 1 1 1 1 1 1 1 1 . . 1 1 1 1 = 17
. . . . . . . . . . . . . . . 1 . . . . . = 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 . . 1 1 1 1 1 = 21
(End)
- S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
-
rule = 3; rows = 30; Table[Total[Table[Take[CellularAutomaton[rule, {{1},0},rows-1,{All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]]], {k,1,rows}]
A266537
Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the twice odd numbers (A016825) interleaved with 2*k-1 zeros, and the first positive element of column k is in the row A002378(k), with T(1,1) = 0.
Original entry on oeis.org
0, 2, 0, 6, 0, 10, 2, 0, 0, 14, 0, 0, 0, 18, 6, 0, 0, 22, 0, 2, 0, 0, 0, 26, 10, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 34, 14, 6, 0, 0, 0, 38, 0, 0, 2, 0, 0, 0, 0, 42, 18, 0, 0, 0, 0, 0, 0, 46, 0, 10, 0, 0, 0, 0, 0, 50, 22, 0, 0, 0, 0, 0, 0, 54, 0, 0, 6, 0, 0, 0, 0, 58, 26, 14, 0, 2
Offset: 1
Triangle begins:
0;
2;
0;
6;
0;
10, 2;
0, 0;
14, 0;
0, 0;
18, 6;
0, 0;
22, 0, 2;
0, 0, 0;
26, 10, 0;
0, 0, 0;
30, 0, 0;
0, 0, 0;
34, 14, 6;
0, 0, 0;
38, 0, 0, 2;
0, 0, 0, 0;
42, 18, 0, 0;
0, 0, 0, 0;
46, 0, 10, 0;
0, 0, 0, 0;
50, 22, 0, 0;
0, 0, 0, 0;
54, 0, 0, 6;
0, 0, 0, 0;
58, 26, 14, 0, 2;
...
For n = 12 the divisors of 12 are 1, 2, 3, 4, 6, 12 and the sum of even divisors of 12 is 2 + 4 + 6 + 12 = 24. On the other hand, the 12th row of the triangle is 22, 0, 2, so the alternating row sum is 22 - 0 + 2 = 24, equaling the sum of even divisors of 12.
A380231
Alternating row sums of triangle A237591.
Original entry on oeis.org
1, 2, 1, 2, 1, 4, 3, 4, 5, 4, 3, 6, 5, 4, 7, 8, 7, 8, 7, 10, 9, 8, 7, 10, 11, 10, 9, 12, 11, 14, 13, 14, 13, 12, 15, 16, 15, 14, 13, 16, 15, 18, 17, 16, 19, 18, 17, 20, 21, 22, 21, 20, 19, 22, 21, 24, 23, 22, 21, 24, 23, 22, 25, 26, 25, 28, 27, 26, 25, 28, 27, 32, 31, 30, 29, 28, 31, 30, 29
Offset: 1
For n = 14 the 14th row of A237591 is [8, 3, 1, 2] hence the alternating row sum is 8 - 3 + 1 - 2 = 4, so a(14) = 4.
On the other hand the 14th row of A237593 is the 14th row of A237591 together with the 14 th row of A237591 in reverse order as follows: [8, 3, 1, 2, 2, 1, 3, 8].
Then with the terms of the 14th row of A237593 we can draw a Dyck path in the first quadrant of the square grid as shown below:
.
(y axis)
.
.
. (4,14) (14,14)
._ _ _ . _ _ _ _ .
. |
. |
. |_
. |
. |_ _
. C |_ _ _
. |
. |
. |
. |
. . (14,4)
. |
. |
. . . . . . . . . . . . . . | . . . (x axis)
(0,0)
.
In the example the point C is the point (9,9).
The three line segments [(4,14),(9,9)], [(14,4),(9,9)] and [(14,14),(9,9)] have the same length.
The points (14,14), (9,9) and (4,14) are the vertices of a virtual isosceles right triangle.
The points (14,14), (9,9) and (14,4) are the vertices of a virtual isosceles right triangle.
The points (4,14), (14,14) and (14,4) are the vertices of a virtual isosceles right triangle.
Other alternating row sums (ARS) related to the Dyck paths of
A237593 and the stepped pyramid described in
A245092 are as follows:
-
row235791(n) = vector((sqrtint(8*n+1)-1)\2, i, 1+(n-(i*(i+1)/2))\i);
a(n) = my(orow = concat(row235791(n), 0)); vecsum(vector(#orow-1, i, (-1)^(i+1)*(orow[i] - orow[i+1]))); \\ Michel Marcus, Apr 13 2025
Showing 1-4 of 4 results.
Comments