OFFSET
0,5
COMMENTS
This sequence is a variant of A357743: we can build this sequence:
- by starting from an isosceles right triangle with values 0, 1, 1:
0 <- right angle
/ \
/ \
1-----1
- and repeatedly applying the following substitution to each isosceles right triangle:
t t
/ \ --> /|\
/ \ / | \
u-----v u-u+v-v
^
| right angles
The sequence presents rich patterns (see Links section).
LINKS
Rémy Sigrist, Colored representation of the first 512 antidiagonals (where the color is function of A(n, k) mod 2)
Rémy Sigrist, Colored representation of the first 512 antidiagonals (where the color is function of A(n, k) mod 3)
Rémy Sigrist, Colored representation of the first 512 antidiagonals (where the color is function of A(n, k) mod 5)
Rémy Sigrist, Nonperiodic tilings related to Stern's diatomic series and based on tiles decorated with elements of Fp, arXiv:2301.06039 [math.CO], 2023.
EXAMPLE
Array A(n, k) begins:
n\k | 0 1 2 3 4 5 6 7 8 9 10
----+---------------------------------------
0 | 0 1 1 2 1 3 2 3 1 4 3
1 | 1 2 3 3 4 4 5 4 5 5 7
2 | 1 3 2 5 3 6 3 7 4 8 4
3 | 2 3 5 4 5 5 8 6 7 7 10
4 | 1 4 3 5 2 7 5 8 3 9 6
5 | 3 4 6 5 7 6 9 7 8 8 11
6 | 2 5 3 8 5 9 4 9 5 10 5
7 | 3 4 7 6 8 7 9 6 7 7 12
8 | 1 5 4 7 3 8 5 7 2 9 7
9 | 4 5 8 7 9 8 10 7 9 8 13
10 | 3 7 4 10 6 11 5 12 7 13 6
.
The first antidiagonals are:
0
1 1
1 2 1
2 3 3 2
1 3 2 3 1
3 4 5 5 4 3
2 4 3 4 3 4 2
3 5 6 5 5 6 5 3
1 4 3 5 2 5 3 4 1
4 5 7 8 7 7 8 7 5 4
PROG
(PARI) A(n, k) = { my (nn = n\2, kk=k\2); if (n<=1 && k<=1, n+k, n%2==0 && k%2==0, A(n/2, k/2), n%2==0, A(n/2, k\2)+A(n/2, k\2+1), k%2==0, A(n\2, k\2)+A(n\2+1, k\2), A(n\2+1, k\2+(1+(-1)^(n\2+k\2))/2) + A(n\2, k\2+(1-(-1)^(n\2+k\2))/2)); }
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Rémy Sigrist, Dec 04 2022
STATUS
approved