login
A392906
Number of odd terms in row n of A393283.
1
0, 1, 2, 1, 1, 1, 2, 2, 3, 2, 4, 4, 4, 5, 6, 5, 4, 7, 9, 5, 9, 10, 10, 10, 14, 8, 11, 10, 10, 7, 13, 12, 17, 18, 16, 11, 14, 14, 18, 22, 16, 23, 22, 15, 18, 20, 19, 14, 26, 26, 24, 17, 24, 19, 24, 22, 22, 22, 25, 27, 26, 30, 28, 25, 30, 29, 32, 30, 33, 29, 29, 31, 32, 35, 37, 40
OFFSET
0,3
COMMENTS
Also the row sum from a triangular array where each value is the sum of points adjacent to the ray connecting the value to the apex of the triangle mod 2, with first rows terms [0], [1,0]. The ray tracks a sum for all nearby points, where the ray intersects a previous point, this value is included in the sum, where the ray passes between two points both values are included. This sum is recorded in mod 2. The sequence a(n) = the sum of the values in row(n).
The triangular array has the following initial rows:
[0]
[1, 0]
[1, 1, 0]
[0, 1, 0, 0]
[0, 0, 1, 0, 0]
[0, 0, 1, 0, 0, 0]
[0, 0, 0, 1, 1, 0, 0]
[0, 0, 0, 1, 1, 0, 0, 0]
[0, 0, 1, 0, 0, 1, 1, 0, 0]
[0, 0, 0, 0, 1, 0, 1, 0, 0, 0]
[0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0]
FORMULA
a(n) = Sum_{k=0..n} (A393283(n,k) mod 2).
PROG
(Python)
import numpy as np
tri = [[0], [1, 0]]
for i in range(2, 100):
N = i + 1
row = []
for j in range(N):
ray = 0
for prev in tri:
L = len(prev)
if L == 1:
ray += prev[0]
continue
x = j * (L - 1) / (N - 1)
left = int(np.floor(x))
right = int(np.ceil(x))
ray += prev[left]
if right != left:
ray += prev[right]
row.append(ray % 2)
tri.append(row)
print(tri)
seq=[]
for r in tri:
sum=0
for t in range(len(r)):
sum+=r[t]
seq.append(sum)
print(seq)
CROSSREFS
Cf. A393283.
Sequence in context: A379731 A035439 A059111 * A103502 A127950 A069545
KEYWORD
nonn,easy
AUTHOR
STATUS
approved