OFFSET
0,3
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10609
FORMULA
a(A027084(n)) = n - 1.
EXAMPLE
The first terms, alongside the corresponding k's, are:
n a(n) k
-- ---- ---
0 0 N/A
1 1 1
2 3 2
3 2 2
4 5 3
5 6 3
6 4 3
7 3 3
8 8 4
9 10 4
10 9 4
11 6 4
12 7 4
13 5 4
14 4 4
15 12 5
PROG
(PARI) tribonacci(n) = ([0, 1, 0; 0, 0, 1; 1, 1, 1]^n)[2, 1]
{ t = k = 0; print1 (0); for (n = 1, #a = vector(70), if (n > t, t += tribonacci(2+k++); ); print1 (", "a[n] = k+if (t==n, 0, a[t-n])); ); }
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Jan 31 2023
STATUS
approved