login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #10 Feb 02 2023 14:43:53

%S 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,

%T 17,15,14,19,21,20,17,18,10,11,13,12,15,16,14,9,10,12,11,8,9,7,6,21,

%U 23,22,19,20,18,17,25,24,27,28,26,21,22,24,23,12,13,15

%N 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).

%C See A356895 for the corresponding k's.

%C See A360259 for the Fibonacci variant.

%H Rémy Sigrist, <a href="/A360260/b360260.txt">Table of n, a(n) for n = 0..10609</a>

%F a(A027084(n)) = n - 1.

%e The first terms, alongside the corresponding k's, are:

%e n a(n) k

%e -- ---- ---

%e 0 0 N/A

%e 1 1 1

%e 2 3 2

%e 3 2 2

%e 4 5 3

%e 5 6 3

%e 6 4 3

%e 7 3 3

%e 8 8 4

%e 9 10 4

%e 10 9 4

%e 11 6 4

%e 12 7 4

%e 13 5 4

%e 14 4 4

%e 15 12 5

%o (PARI) tribonacci(n) = ([0,1,0; 0,0,1; 1,1,1]^n)[2,1]

%o { 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]));); }

%Y Cf. A000073, A027084, A356895, A360259.

%K nonn,look

%O 0,3

%A _Rémy Sigrist_, Jan 31 2023