OFFSET
1,1
COMMENTS
LINKS
FORMULA
Empirically:
- T(n, 1) = 2*n + 1,
- T(n, (3^(n-1) + 1)/2) = A001333(n+1),
- T(n, 3^(n-1)) = 2*n + 1.
EXAMPLE
The first rows are:
3
5, 7, 5
7, 11, 9, 13, 17, 11, 11, 13, 7
PROG
(PARI) M = [[1, -2, 2; 2, -1, 2; 2, -2, 3], [1, 2, 2; 2, 1, 2; 2, 2, 3], [-1, 2, 2; -2, 1, 2; -2, 2, 3]];
T(n, k) = my (t=[3; 4; 5], d=digits(3^(n-1)+k-1, 3)); for (i=2, #d, t = M[d[i]+1] * t); return (sqrtint(t[2, 1] + t[3, 1]))
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Rémy Sigrist, Nov 22 2018
STATUS
approved