|
|
A360260
|
|
a(0) = 0, and for any n > 0, let k > 0 be as small as possible and such that T(3) + ... + T(2+k) >= n (where T(m) denotes A000073(m), the m-th tribonacci number); a(n) = k + a(T(3) + ... + T(2+k) - n).
|
|
2
|
|
|
0, 1, 3, 2, 5, 6, 4, 3, 8, 10, 9, 6, 7, 5, 4, 12, 11, 14, 15, 13, 8, 9, 11, 10, 7, 8, 6, 5, 16, 17, 15, 14, 19, 21, 20, 17, 18, 10, 11, 13, 12, 15, 16, 14, 9, 10, 12, 11, 8, 9, 7, 6, 21, 23, 22, 19, 20, 18, 17, 25, 24, 27, 28, 26, 21, 22, 24, 23, 12, 13, 15
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
See A356895 for the corresponding k's.
See A360259 for the Fibonacci variant.
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|