OFFSET
0,5
COMMENTS
- by starting from an equilateral triangle with values 0, 1, 1:
0
/ \
1---1
- and repeatedly applying the following substitution:
t
/ \
t / \
/ \ --> t+u---t+v
u---v / \ / \
/ \ / \
u----u+v----v
The sequence reduced modulo an odd prime number presents rich nonperiodic patterns (see illustrations in Links section).
LINKS
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)
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 5 5 4 5 7 8
2 | 1 3 2 5 3 6 3 7 4 9 5
3 | 2 3 5 6 5 5 8 9 7 8 11
4 | 1 4 3 5 2 7 5 8 3 9 6
5 | 3 5 6 5 7 10 11 9 8 11 11
6 | 2 5 3 8 5 11 6 11 5 10 5
7 | 3 4 7 9 8 9 11 10 7 7 12
8 | 1 5 4 7 3 8 5 7 2 9 7
9 | 4 7 9 8 9 11 10 7 9 14 17
10 | 3 8 5 11 6 11 5 12 7 17 10
.
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 5 3 6 3 5 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) = { if (n==0 && k==0, 0, n==1 && k==0, 1, n==0 && k==1, 1, n%2==0 && k%2==0, A(n/2, k/2), n%2==0, A(n/2, (k-1)/2) + A(n/2, (k+1)/2), k%2==0, A((n-1)/2, k/2) + A((n+1)/2, k/2), A((n+1)/2, (k-1)/2) + A((n-1)/2, (k+1)/2)); }
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Rémy Sigrist, Nov 29 2022
STATUS
approved